- 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
- Midjourney
- Face Swap
- Dream Machine
- Kling
Imagine
POST
https://api.piapi.ai/mj/v2/imagine
/imagine
command from the offical Midjourney.Image2image - how can I avoid the latency incurred from uploading my images to a server, your team fetches that image, and upload the image onto the Discord server?
If you upload your images onto the servers with the following domains, we will not transfer them again to the Discord serverimgur.space img.goodfon.ru goo.gl fb-cd.fanbook.cn i.ibb.co fanbook.cn cdn.midjourney.com
1.
2.
3.
4.
5.
6.
7.
Request
Header Params
X-API-KEY
string
required
Example:
{{x-api-key}}
Body Params application/json
prompt
string
required
skip_prompt_check
boolean
optional
process_mode
string
optional
aspect_ratio
string
optional
webhook_endpoint
string
optional
webhook_secret
string
optional
bot_id
integer
optional
Example
{
"prompt": "a cute puppy",
"process_mode": "relax",
"aspect_ratio": "4:3",
"webhook_endpoint": "",
"webhook_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/mj/v2/imagine' \
--header 'X-API-KEY: {{x-api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "a cute puppy",
"process_mode": "relax",
"aspect_ratio": "4:3",
"webhook_endpoint": "",
"webhook_secret": ""
}'
Responses
🟢200OK
application/json
Body
task_id
string
optional
status
string
optional
message
string
optional
Example
{
"task_id": "5b01d63a**************812323adf8e1",
"status": "success",
"message": ""
}
🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Modified at 2024-10-23 07:10:56