OmwAIOmwAI
API GuideAPI ReferenceProgramming Tools
Midjourney

Image Actions

Midjourney action endpoint (upscale/variation/reroll, etc.)

Runs an action on a finished task (status must be SUCCESS): UPSCALE, VARIATION, REROLL, PAN, ZOOM, etc. A new task ID is returned, so poll Query Task Result again for the new outcome.

Billing models

This endpoint is billed per action: mj_upscale, mj_variation, mj_reroll, mj_high_variation, mj_low_variation, mj_pan, mj_zoom. Configure group prices for the relevant models on the channel.

Prerequisites

taskId must belong to the current caller and the original task must be finished (status of SUCCESS). The action reuses the original task's channel; if that channel is disabled the action cannot run.

POST
/mj/submit/change

Authorization

BearerAuth

AuthorizationBearer <token>

使用你在 OmwAI 中创建的 API 令牌认证。 格式: Authorization: Bearer sk-xxxxxx 令牌需开通对应 Midjourney 模型的调用权限。

In: header

Request Body

application/json

taskId*string

原生成任务的任务 ID(jobId),须属于当前调用者

action*string

要执行的动作

Value in"UPSCALE" | "VARIATION" | "REROLL" | "HIGH_VARIATION" | "LOW_VARIATION" | "PAN" | "ZOOM"
index*integer

动作下标:UPSCALE/VARIATION 取 1-4(四宫格);PAN 取 1-4(方向);其余动作传 1

state?string

自定义状态字段,查询结果时原样返回

notifyHook?string

任务完成后的回调通知地址(若系统启用回调通知)

Response Body

application/json

curl -X POST "https://www.omwai.xyz/mj/submit/change" \  -H "Content-Type: application/json" \  -d '{    "taskId": "24e93809-e443-46c5-9ecc-06fdadd8c09b",    "action": "UPSCALE",    "index": 2  }'
{
  "code": 1,
  "description": "success",
  "result": "9a3f2d1e-5c6b-4a8d-9e0f-2b1c3d4e5f60",
  "properties": {}
}

Simple change

For quick actions use the variant endpoint POST /mj/submit/simple-change with a single content field in the format "<taskId> <action>": u1-u4 upscale, v1-v4 variation, r reroll. Example: "24e93809-e443-46c5-9ecc-06fdadd8c09b u2".

How is this guide?

Last updated on