Kuai API

Execute Action

Endpoint: POST https://api.kuai.host/mj/submit/action

Official docs: https://docs.midjourney.com/hc/en-us/articles/32804058614669-Upscalers

Execute Upscale, Variation, Reroll, Pan, and other actions on an existing task.

In the model marketplace and usage logs, this endpoint is shown as one of the following, depending on the action: mj_upscale, mj_variation, mj_high_variation, mj_low_variation, mj_reroll, mj_zoom, mj_custom_zoom, mj_pan, mj_inpaint.

The model marketplace also lists mj_fast_* (e.g. mj_fast_variation) and mj_relax_* names. Calls are currently billed under the names above, not as mj_fast_* / mj_relax_*; prices follow the names above.

Request body (application/json)

  • customId (string, required): Action id from task detail buttons[].customId. Determines zoom/variation/pan/redraw etc. Do not invent values.
  • taskId (string, required): Source task ID (the task whose image you want to act on).
  • notifyHook (string): Callback URL; falls back to the global notifyHook when empty
  • state (string): `Custom parameter`

Request example

{
  "botType": "MID_JOURNEY",
  "customId": "MJ::JOB::upsample::1::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "taskId": "1743326750223591"
}