Light Mode
Pan
POST
/api/v1/taskThis endpoint from PiAPI's Midjourney API expands the image towards a chosen direction while preserving original image content and using the new prompt to fill in the expanded space. The endpoint corresponds to the Pan
tool 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:
pan
input
object
required
origin_task_id
string
required
The task ID of the parent task
direction
enum<string>
required
Use this parameter to assign the direction for the image expansion.
Allowed values:
updownleftright
prompt
string
required
Use this parameter to fill in the expanded portion of the image
skip_prompt_check
boolean
required
Use this parameter to skip our internal prompt check.
Default:
false
Example
{
"model": "midjourney",
"task_type": "pan",
"input": {
"origin_task_id": "eae12d21-2fde-44bf-9233-aa6b28b0a050",
"direction": "down",
"prompt": "flying city, night",
"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": "97c1bc6b-bf9b-4bae-9819-566b97651fce",
"model": "midjourney",
"task_type": "pan",
"status": "pending",
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "",
"secret": "123456"
}
},
"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