Request
Provide your bearer token in the Authorization header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Example:Bearer {{YOUR_API_KEY}}
Body Params application/json
Text description of the required image. The maximum length is 1000 characters.
A model used for image generation.
The number of images to be generated. It must be between 1 and 10.
Generate the size of the image. It must be one of 256x256, 512x512, or 1024x1024.
{
"model": "flux",
"prompt": "A cute baby sea otter",
"n": 1,
"size": "1024x1024"
}
Request samples
curl --location -g --request POST '{{BASE_URL}}/v1/images/generations' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "flux",
"prompt": "A cute baby sea otter",
"n": 1,
"size": "1024x1024"
}'
Responses
application/json {
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}
Modified at 2025-03-30 03:37:00