Skip to main content
POST
Generate images from text prompt

Authorizations

Authorization
string
header
required

API key for programmatic access (Authorization: Bearer sk-<api_key>)

Body

application/json

Request for image generation

model
string
required

Model ID to use for generation

prompt
string
required

Text prompt describing the image to generate

n
integer<int32> | null

Number of images to generate (1-10, default: 1)

quality
string | null

Quality of the generated image: "standard" or "hd" ("quality" parameter is not supported for verifiable models)

response_format
string | null

Response format: "b64_json" or "url" (only "b64_json" is supported for verifiable models)

size
string | null

Size of the generated images in WxH format (e.g., "1024x1024", "512x512")

style
string | null

Style of the generated image: "vivid" or "natural" ("style" parameter is not supported for verifiable models)

Response

Image generated successfully

Response from image generation

created
integer<int64>
required

Unix timestamp of when the generation was created

data
object[]
required

Generated images