v1

latestOpenAPI 3.1.02026-07-2219165126.1 KB
Images

Generate images

Create one or more images from a text prompt.

post/v1/images/generations

Request body

modelstring required

Image generation model identifier.

promptstring required

Prompt describing the image to generate.

qualitystring nullable
sizestring nullable
ninteger nullable
response_format'url' | 'b64_json'

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

createdinteger required

Example response

{
  "created": 1743393600,
  "data": [
    {
      "url": "https://api.naga.ac/outputs/example-image.png"
    }
  ],
  "usage": {
    "input_tokens": 42,
    "output_tokens": 1024,
    "total_tokens": 1066
  }
}