Follow-up ActionsMidjourney
Upsample
Separate one image out of a completed Midjourney grid at full resolution (U1–U4).
POST /v2/images/midjourney/action — action: "upsample"
Equivalent to Midjourney's U1–U4 buttons: picks one of the 4 images from a completed Midjourney generation and renders it as a standalone full-resolution image.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
parentJobId | string (uuid) | Yes | ID of the completed Midjourney job to act on |
action | string | Yes | "upsample" |
index | integer | Yes | Which image of the grid to upsample (1–4, matching U1–U4) |
webhookUrl | string | No | HTTPS URL that receives a JSON POST when the job reaches a subscribed event — see Webhooks for payload formats |
webhookEvents | string[] | No | Events to be notified about: "progress", "completed", "failed". Defaults to ["completed", "failed"] when webhookUrl is set |
The parent must be a Midjourney generation or variations job with status
COMPLETED. Upsampling or varying an already-upsampled image returns 400 —
but upsampled images support Inpaint,
Outpaint, and
Pan. Parents created before follow-up
actions were introduced return 409.
Credits
4 credits per upsample.
Example result
Once the job is COMPLETED, the result object on
GET /v2/jobs/:id contains a single image and no
gridUrl:
{
"images": [
"https://cdn2.apiframe.ai/images/a1b2c3d4-e5f6-7890-abcd-ef1234567890-1.png"
]
}Code examples
curl -X POST https://api.apiframe.ai/v2/images/midjourney/action \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"parentJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"action": "upsample",
"index": 2
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/images/midjourney/action",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"parentJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"action": "upsample",
"index": 2,
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/images/midjourney/action", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
parentJobId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
action: "upsample",
index: 2,
}),
});
console.log(await response.json());body := `{
"parentJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"action": "upsample",
"index": 2
}`
req, _ := http.NewRequest("POST", "https://api.apiframe.ai/v2/images/midjourney/action",
strings.NewReader(body))
req.Header.Set("X-API-Key", "afk_your_api_key_here")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)Try it
POST
/v2/images/midjourney/actionTry it