Skip to content
Trang này chưa có bản dịch sang ngôn ngữ của bạn, nên hiện đang được hiển thị bằng tiếng Anh.

Upscale

Pick one of U1–U4 from an Imagine grid to produce a single image; composed locally and usually returns instantly

Toàn bộ tài liệu
POST/v1/midjourney/generations/upscale
json
{
  "error": {
    "code": 502,
    "message": "Bad gateway. The server is temporarily unavailable",
    "type": "bad_gateway"
  }
}

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

Ví dụ request

curl --request POST \
  --url https://api.apisea.ai/v1/midjourney/generations/upscale \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
    "index": 1,
    "speed": "fast"
  }'

Parameters

FieldTypeNotes
task_idstringParent task ID (must be a SUCCESS imagine / variation / reroll, etc.)
nsfw_checkbooleanOptional; defaults to false. Run content moderation before submitting a Midjourney task. • true: use omni-moderation-latest to review prompts and input images • false: skip moderation without adding moderation cost or latency
indexintWhich tile (U1–U4), range 1–4; 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:

json
{
  "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
  "index": 1,
  "speed": "fast"
}

Pass a button directly:

json
{
  "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 1–4; 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 imagine
upsample_v7_2x_creativev7 imagine

HD upscale example

json
{
  "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.

Phản hồi

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}

Phát hiện lỗi trong tài liệu này? Gửi email đến support@apisea.ai.