Light Mode
Upscale
POST
/api/v1/taskThis endpoint from PiAPI's Midjourney API upscales the resolution of the chosen image (and isolates it). This endpoint corresponds to the upscale
command from the official Midjourney.
Request
Header Params
X-API-Key
string
required
Insert your API Key here
Body Params application/json
model
enum<string>
required
Allowed value:
midjourney
task_type
enum<string>
required
Allowed value:
upscale
input
object
required
origin_task_id
string
required
The task ID of the parent task.
index
enum<string>
required
The parameter upscales the selected image.
Light/beta are available for V4 model UPSCALED tasks only; 2x/4x for V5 model UPSCALED tasks only; subtle/creative for V6 UPSCALED tasks models only.
Allowed values:
1234lightbeta2x4xsubtlecreative
Example
{
"model": "midjourney",
"task_type": "upscale",
"input": {
"origin_task_id": "ee6f1989-5de2-4e4a-b860-b059ad57a023",
"index": "3"
},
"config": {
"service_mode": "",
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}
Request samples
Responses
OK(200)
Bad Request(400)
Unauthorized(401)
Server Error(500)
HTTP Code: 200
Content Type : JSONapplication/json
OK - Successful response
Data Schema
object {0}
Example
{
"code": 200,
"data": {
"task_id": "f82d8ace-xxxx-xxxx-xxxx-xxxxxx72038d",
"model": "midjourney",
"task_type": "upscale",
"status": "pending",
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "",
"secret": ""
}
},
"input": {},
"output": {
"image_url": "",
"image_urls": null,
"temporary_image_urls": null,
"discord_image_url": "",
"actions": [],
"progress": 0,
"intermediate_image_urls": null
},
"meta": {},
"detail": null,
"logs": [],
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
},
"message": "success"
}
Last modified: 2 days ago