v1
latestOpenAPI 3.1.02026-07-2219165126.1 KBImages
Generate images
Create one or more images from a text prompt.
post/v1/images/generations
Request body
Example request
{
"model": "gpt-image-1",
"prompt": "A cinematic watercolor fox reading in a lantern-lit library.",
"response_format": "url",
"size": "1024x1024"
}Response
Successful Response
Example response
{
"created": 1743393600,
"data": [
{
"url": "https://api.naga.ac/outputs/example-image.png"
}
],
"usage": {
"input_tokens": 42,
"output_tokens": 1024,
"total_tokens": 1066
}
}