v3

OpenAPI 3.1.0MIT2026-07-31192456807.8 KB
Images

Create image

Use an image model to generate an image for a given prompt.

post/images/generations

Request body

promptstring required

A description of the desired images. Maximum length varies by model.

stepsinteger

Number of generation steps.

image_urlstring

URL of an image to use for image models that support it.

seedinteger

Seed used for generation. Can be used to reproduce image generations.

ninteger

Number of image results to generate.

heightinteger

Height of the image to generate in number of pixels.

widthinteger

Width of the image to generate in number of pixels.

negative_promptstring

The prompt or prompts not to guide the image generation.

response_format'base64' | 'url'

Format of the image response. Can be either a base64 string or a URL.

guidance_scalenumber

Adjusts the alignment of the generated image with the input prompt. Higher values (e.g., 8-10) make the output more faithful to the prompt, while lower values (e.g., 1-5) encourage more creative freedom.

output_format'jpeg' | 'png'

The format of the image response. Can be either be jpeg or png. Defaults to jpeg.

reference_imagesstring[]

An array of image URLs that guide the overall appearance and style of the generated image. These reference images influence the visual characteristics consistently across the generation.

disable_safety_checkerboolean

If true, disables the safety checker for image generation.

Example request

{
  "prompt": "cat floating in space, cinematic"
}

Response

Image generated successfully

idstring required
modelstring required
object'list' required

The object type, which is always list.