Light Mode
Reroll
POST
/api/v1/taskThis endpoint from PiAPI's Midjourney API regenerates the images based on the new prompt and the parent task. This endpoint corresponds to the Re-run
or Re-roll
button from the offcial 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:
reroll
input
object
required
origin_task_id
string
required
The task ID of the parent task.
prompt
string
optional
Use this parameter to modify the original prompt from the parent task.
aspect_ratio
string
optional
This parameter dictates the ouput image's aspect ratio value.
Default:
1:1
skip_prompt_check
boolean
optional
Use this parameter to skip our internal prompt check.
Default:
false
Example
{
"model": "midjourney",
"task_type": "reroll",
"input": {
"origin_task_id": "4b12f7bf-028b-417e-9bcd-b600a6b0a03c",
"prompt": "angry cat wearing hat, smoking",
"aspect_ratio": "16:9",
"skip_prompt_check": false
},
"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": "ed4b09f0-1989-41f1-80ab-11570897096e",
"model": "midjourney",
"task_type": "reroll",
"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: 11 days ago