curl --request POST \
--url https://api.ephone.ai/midjourney/action \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "upscale",
"task_id": "mj-6f1c2b0e9a7d4e2fb1c3d5e7f9a1b2c3",
"index": 2
}
'{
"task_id": "mj-7a2d3c1f0b9e4d8a8c6b5a4f3e2d1c0b",
"action": "upscale",
"status": "submitted",
"created_at": 1792000000
}{
"error": {
"code": "invalid_request",
"message": "index must be between 1 and 4"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient balance"
}
}{
"error": {
"code": "task_not_found",
"message": "Task not found"
}
}{
"error": {
"code": "task_not_finished",
"message": "The task has not succeeded yet"
}
}{
"error": {
"code": "queue_full",
"message": "Queue is full, please try again later"
}
}{
"error": {
"code": "upstream_error",
"message": "The service is temporarily unavailable, please retry"
}
}Image Actions
Keep working on an image in an existing task: upscale, vary, remix, reroll, zoom out, pan, inpaint, enhance, animate or extend a video.
curl --request POST \
--url https://api.ephone.ai/midjourney/action \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "upscale",
"task_id": "mj-6f1c2b0e9a7d4e2fb1c3d5e7f9a1b2c3",
"index": 2
}
'{
"task_id": "mj-7a2d3c1f0b9e4d8a8c6b5a4f3e2d1c0b",
"action": "upscale",
"status": "submitted",
"created_at": 1792000000
}{
"error": {
"code": "invalid_request",
"message": "index must be between 1 and 4"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient balance"
}
}{
"error": {
"code": "task_not_found",
"message": "Task not found"
}
}{
"error": {
"code": "task_not_finished",
"message": "The task has not succeeded yet"
}
}{
"error": {
"code": "queue_full",
"message": "Queue is full, please try again later"
}
}{
"error": {
"code": "upstream_error",
"message": "The service is temporarily unavailable, please retry"
}
}action | What it does |
|---|---|
upscale | Upscale one image of a set to 2x resolution, in subtle or creative style. |
variation | Generate four variations of one image, strong or subtle. |
remix | Remix one image with a new prompt while keeping its structure. |
reroll | Run the same prompt again for a fresh set, optionally with a changed prompt. |
zoom | Zoom out of an image, filling in the surroundings. |
pan | Extend an image in one direction. |
inpaint | Repaint only a selected region of an image. |
enhance | Pick one draft and re-render it at full quality. |
video | Turn an image into a 5-second video, with 480p / 720p, motion level and batch size. |
video-extend | Extend a video by 4 seconds, up to 21 seconds total. |
actions, so you can keep chaining. Operations not listed in actions return unsupported_action.
POST /v1/task/submit with model set to midjourney-upscale and the parameters inside input (no action needed). Both behave and bill the same.Authorizations
Send your API key in the Authorization: Bearer YOUR_API_KEY header.
Body
- upscale
- variation
- remix
- reroll
- zoom
- pan
- inpaint
- enhance
- video
- video-extend
Always upscale.
upscale Task ID: The task to continue from (the task_id returned on submit). It must have succeeded.
Image Index: Which image to use, starting at 1 (1–4 for a grid, up to 24 for V8 drafts). Optional when the parent has a single image.
1 <= x <= 24Upscale Type: subtle (default) or creative.
subtle, creative Speed: relax is cheapest but queues longer; turbo is fastest at 2x price. You can also write --relax / --fast / --turbo in the prompt; this field wins. Defaults to fast.
relax, fast, turbo Notify hook: when the task ends, the same content as the fetch result is POSTed to this URL (a public http / https URL). Omit it to poll instead.
Was this page helpful?