v1
latestOpenAPI 3.1.0Apache-2.02026-07-13136499.6 KBImages
Create image
This endpoint processes requests to generate images using AI models by forwarding them to the appropriate AI node. The request metadata and compute units have already been validated by middleware before reaching this handler.
Errors
- Returns various status codes based on the underlying handle_image_generation_response:
- INTERNAL_SERVER_ERROR - If there's an error communicating with the AI node
post/v1/images/generations
Request body
Example request
{
"model": "black-forest-labs/FLUX.1-schnell",
"n": 1,
"prompt": "A cute baby sea otter floating on its back",
"quality": "hd",
"response_format": "url",
"size": "1024x1024",
"style": "vivid",
"user": "user-1234"
}Response
Image generations
Example response
{
"created": 1677649420,
"data": [
{
"revised_prompt": "A stunning image of a baby sea otter floating on its back in crystal clear blue water, with gentle ripples surrounding it. The otter's fur appears soft and well-detailed, and its expression is peaceful and content.",
"url": "https://oaidalleapiprodscus.blob.core.windows.net/private/image.png"
}
]
}