API reference
Authenticate, submit a generation, and follow it through completion.
Quickstart
Send your API key as a Bearer token. Keep it on your server and give every submission a unique idempotency key so a network retry cannot create a duplicate job. Fast and Relax cost 1 credit per generation; Turbo costs 2. Batches cost the sum of their prompts. Each generation returns four images.
curl --request POST https://api.midjourneyapi.ai/v1/generate \ --header "Authorization: Bearer $MIDJOURNEY_API_KEY" \ --header 'Content-Type: application/json' \ --header "Idempotency-Key: gen_$(uuidgen)" \ --data '{ "prompt": "A quiet observatory above the clouds", "mode": "fast", "config": { "aspectRatio": "1:1" }}'Generation lifecycle
Submit
POST a prompt and save the returned job ID.
Poll
Check status until the job succeeds or reaches a final error.
Download
Read the artifact manifest, then fetch the image you need.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/generate | Submit one generation. |
| GET | /v1/status/:jobId | Read the current generation state. |
| GET | /v1/result/:jobId | Read the verified result when the job succeeds. |
| GET | /v1/artifacts/:jobId | List the generated image artifacts. |
| GET | /v1/events/:jobId | Inspect durable lifecycle events. |
| GET | /v1/history | List your account's generations, newest first. |