获取 API Key 获取 API
文档

Upscale(放大选图)

对 Imagine 四宫格选取 U1–U4 中的一张得到单图,本地合成、通常瞬时返回

请求示例

curl --request POST \
  --url https://api.openveer.com/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"
    }
  ]
}

对父任务四宫格(grid_image_url)选取 U1–U4 中的一张,得到单图。通过从已有 4 张图里截取实现,本地合成、通常瞬时返回。

项目 内容
action UPSCALE
计费 midjourney@upscale[-version][-speed]
必填 task_id + index,或 task_id + custom_id
可选 speed、metadata

参数

字段 类型 说明
task_id string 父任务 ID(须为 imagine / variation / reroll 等 SUCCESS 任务)
index int 选第几张(U1–U4),范围 1–4;与 custom_id 二选一
custom_id string 直接传对应操作的按钮 ID;与 index 二选一,传了它就不按 index 匹配
speed string relax / fast / turbo(本地合成,实际无影响)
metadata object 自定义元数据

请求示例

按 index 选图:

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

直接传按钮:

{
  "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
  "custom_id": "MJ::JOB::upsample::1::xxxx"
}

响应

提交返回新 task_id,通常毫秒级即 SUCCESS。SUCCESS 后 image_urls 只有 1 个元素(单图),buttons 含可继续的操作(zoom / inpaint / pan / variation 等)。

注意

  • 父任务必须是 SUCCESS 状态,否则返回 400(task is not in SUCCESS state)。
  • index 必须 1–4,越界返回 400;custom_id 与 index 二选一,都传时 custom_id 优先。
  • 真正消耗资源的是 imagine 阶段,upscale 只是从已有图里挑,几乎不会失败。
  • upscale 后的单图可继续用 Zoom / Inpaint / Variation。

HD upscale(高清放大,输出 2x 单图)

普通 upscale 是本地合成——从父任务已有的 4 张图里截取其中一张,瞬时返回。如果后续要对单图做 zoom / inpaint 等精细操作,建议改用 HD upscale:执行真实放大,输出 2x 高清单图,约 60–120s 完成,产出的单图能更稳定地支持后续 zoom / inpaint。

HD upscale 通过 custom_id 指定放大命令,不同 imagine 版本对应不同命令:

customId 命令 适用版本
upsample_v5_2x v5 imagine
upsample_v5_4x v5 imagine
upsample_v6_2x_subtle v6 / v6.1 imagine
upsample_v6_2x_creative v6 / v6.1 imagine
upsample_v7_2x_subtle v7 / v8.1 imagine
upsample_v7_2x_creative v7 / v8.1 imagine

HD upscale 示例

{
  "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
  "custom_id": "MJ::JOB::upsample_v7_2x_subtle::1::xxxx"
}

完成后得到一张真正的 2x 高清单图任务,可继续对它做 zoom / inpaint。

与普通 upscale 对比

维度 普通 upscale HD upscale
实现 本地合成(截取) 真实放大处理
耗时 毫秒级 约 60–120s
输出 4 张里取第 N 张 2x 高清单图
后续 zoom / inpaint / variation zoom / inpaint 更稳定

⚠️ pan 仍不可用

即使是 HD upscale 产出的高清单图,pan 操作仍会被拒(返回"无效生图请求")——这是 Midjourney 对 pan 操作本身的限制,与放大方式无关。详见 Pan。