- Get Started
- Endpoints
- Flux
- AI Hug
- LLM
- Midjourney
- Faceswap
- TTS
- Song(Suno+Udio)
- Trellis
- Luma Dream Machine
- Kling
- Hailuo
- Skyreels
- WanX
- Hunyuan Video
- PiAPI Account Management
- Mmaudio
- DiffRhythm
- Tools
- Resources
- Legacy Documentation
Describe
POST
https://api.piapi.ai/api/v1/task
Describe
command from the official Midjourney.Request
Header Params
X-API-Key
string
required
Body Params application/json
model
enum<string>
required
Allowed value:
midjourney
task_type
enum<string>
required
Allowed value:
describe
input
object
required
image_url
string
required
process_mode
enum<string>
optional
Allowed values:
relaxfastturbo
bot_id
integer
optional
config
object
optional
webhook_config
object
optional
service_mode
enum<string>
optional
the user chose on the workspace setting of your account.
public
means this task will be processed under PAYG mode.private
means this task will be processed under HYA mode.Allowed values:
publicprivate
Example
{
"model": "midjourney",
"task_type": "describe",
"input": {
"image_url": "http://midjourney-guigu.oss-us-west-1.aliyuncs.com/images/75ed4202402292139294887.jpg",
"process_mode": "fast",
"bot_id": 0
},
"config": {
"service_mode": "",
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.piapi.ai/api/v1/task' \
--header 'X-API-Key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "midjourney",
"task_type": "describe",
"input": {
"image_url": "http://midjourney-guigu.oss-us-west-1.aliyuncs.com/images/75ed4202402292139294887.jpg",
"process_mode": "fast",
"bot_id": 0
},
"config": {
"service_mode": "",
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}'
Responses
🟢200OK
application/json
Body
code
integer
required
data
object
required
task_id
string
required
model
string
required
task_type
string
required
status
enum<string>
required
Allowed values:
CompletedProcessingPendingFailedStaged
input
object
required
output
object
required
meta
object
required
detail
null
required
logs
array [object]
required
error
object
required
message
string
required
Example
{
"code": 200,
"data": {
"task_id": "e7d57239-d490-4433-83b2-0e78a8cebf95",
"model": "midjourney",
"task_type": "describe",
"status": "pending",
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "",
"secret": ""
}
},
"input": {},
"output": {
"description": ""
},
"meta": {},
"detail": null,
"logs": [],
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
},
"message": "success"
}
🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Modified at 2024-10-18 10:59:29