v1
latestOpenAPI 3.1.0MIT2026-07-262861121.0 KBCreates an image generation for the provided prompt (OpenAI-compatible). For unauthenticated accountless x402 quote requests, include x-x402: true.
post/v1/images/generations
Headers
x-x402'true'
Set to true on unauthenticated accountless x402 quote requests. Without this header, unauthenticated requests return 401 missing_api_key.
Request body
Example request
{
"size": "1024x1024",
"imageDataUrl": "data:image/jpeg;base64,/9j/4AAQ...",
"imageDataUrls": [
"data:image/jpeg;base64,/9j/4AAQ...",
"data:image/png;base64,iVBORw0KGgo..."
],
"maskDataUrl": "data:image/png;base64,iVBORw0KGgo...",
"seed": 42
}Response
Image generation response. Each data[i] contains either { url } or { b64_json }. When requesting response_format: "url", the API may fall back to returning { b64_json } if URL generation (upload/presign) fails.
Example response
{
"data": [
{
"url": "https://...signed-url..."
}
]
}