Skip to main content
POST
/
v1
/
midjourney
/
generations
/
upscale
curl --request POST \
  --url https://api.apimart.ai/v1/midjourney/generations/upscale \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
    "index": 1,
    "speed": "fast"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}
curl --request POST \
  --url https://api.apimart.ai/v1/midjourney/generations/upscale \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
    "index": 1,
    "speed": "fast"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}
Picks one of U1–U4 from the parent grid (grid_image_url) to produce a single image. This is implemented by cropping from the existing 4 images, composed locally and usually returns instantly.
ItemValue
actionUPSCALE
Billingmidjourney@upscale[-version][-speed]
Requiredtask_id + index, or task_id + custom_id
Optionalspeed, metadata

Parameters

FieldTypeNotes
task_idstringParent task ID (must be a SUCCESS imagine / variation / reroll, etc.)
indexintWhich tile (U1–U4), range 14; one of index / custom_id
custom_idstringDirectly pass the button ID for the corresponding action; one of index / custom_id; when set, index matching is skipped
speedstringrelax / fast / turbo (no effect, since it is composed locally)
metadataobjectCustom metadata

Request examples

By index:
{
  "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
  "index": 1,
  "speed": "fast"
}
Pass a button directly:
{
  "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
  "custom_id": "MJ::JOB::upsample::1::xxxx"
}

Response

Submission returns a new task_id, usually SUCCESS within milliseconds. On SUCCESS, image_urls has a single element (one image), and buttons contains follow-up actions (zoom / inpaint / pan / variation, etc.).

Notes

  • The parent task must be in SUCCESS state, otherwise it returns 400 (task is not in SUCCESS state).
  • index must be 14; out of range returns 400. custom_id and index are mutually exclusive; if both are passed, custom_id wins.
  • The resource-consuming step is imagine; upscale only picks from existing images and rarely fails.
  • The single image after upscale can continue with Zoom / Inpaint / Variation.

HD upscale (HD enlargement, outputs a single 2x image)

A regular upscale is composed locally—it crops one of the 4 images already in the parent task and returns instantly. If you later want to perform fine-grained operations such as zoom / inpaint on a single image, we recommend using HD upscale instead: it performs a real enlargement, outputs a single 2x HD image, takes about 60–120s to complete, and the resulting single image more reliably supports subsequent zoom / inpaint. HD upscale specifies the enlargement command via custom_id; different imagine versions correspond to different commands:
customId commandApplicable version
upsample_v5_2xv5 imagine
upsample_v5_4xv5 imagine
upsample_v6_2x_subtlev6 / v6.1 imagine
upsample_v6_2x_creativev6 / v6.1 imagine
upsample_v7_2x_subtlev7 / v8.1 imagine
upsample_v7_2x_creativev7 / v8.1 imagine

HD upscale example

{
  "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
  "custom_id": "MJ::JOB::upsample_v7_2x_subtle::1::xxxx"
}
Once complete, you get a true single 2x HD image task, which you can continue to zoom / inpaint.

Comparison with regular upscale

DimensionRegular upscaleHD upscale
ImplementationComposed locally (cropping)Real enlargement processing
TimeMillisecond-levelAbout 60–120s
OutputPicks the Nth of 4 imagesSingle 2x HD image
Follow-upzoom / inpaint / variationzoom / inpaint more reliable

⚠️ pan is still unavailable

Even for the HD single image produced by HD upscale, pan operations are still rejected (returns “invalid image generation request”)—this is a Midjourney limitation on the pan operation itself, unrelated to the enlargement method. See Pan for details.