Skip to main content
GET
Get Task
If you passed notify_hook on submission, the same content as the fetch result is POSTed there when the task ends. Notifications can be lost on the network, so fetch the task if one doesn’t arrive in time.

Authorizations

Authorization
string
header
required

Send your API key in the Authorization: Bearer YOUR_API_KEY header.

Headers

X-Billing-Detail
boolean

Pass true to get the X-Billing-Currency and X-Billing-Amount response headers (what this task actually cost) once the task has finished; the response body does not change. If you also send it when submitting the task, later queries return them without the header, and the callback request sent when the task finishes carries them as request headers too.

Path Parameters

task_id
string
required

The task ID returned when you submitted the task.

Response

OK

task_id
string
required

Task ID.

action
string
required

Action name, e.g. imagine, upscale.

status
enum<string>
required

Task status, see the table above.

Available options:
submitted,
in_progress,
success,
failure
created_at
integer
required

Created at (Unix seconds).

speed
string

The speed tier chosen on submit: relax, fast or turbo, which is also the tier you are billed for. Describe has no speed, so it is omitted.

prompt
string

The prompt that was submitted.

images
string[]

Image URLs in index order (the first one is index: 1). An image that failed content review is an empty string.

videos
string[]

Video URLs (video endpoints) in index order.

descriptions
string[]

Image descriptions (describe).

seed
integer

Seed.

actions
string[]

Operations you can run next on this task, e.g. ["upscale", "variation", "reroll"]. Pass one as action to POST /midjourney/action together with task_id; per-image operations also take index, reroll doesn't.

fail_reason
string

Failure reason.

finished_at
integer

Finished at (Unix seconds).

usage
object

Usage, returned only on success, e.g. {"type": "call", "multiplier": 2}. multiplier is the spec multiplier on the unit price of the selected speed tier in the price table: 2 for HD, 0.5 for a V7 draft; videos depend on resolution and count. Account discounts are not included; see the X-Billing-Amount response header (query with X-Billing-Detail: true) for what the task actually cost.