v1

latestOpenAPI 3.1.02026-07-2675394318.9 KB
inference

Generate

post/v1/images/generations

Query parameters

ai_project_idstring nullable

current project ID

current project ID

Request body

modelstring required

ID of the model to use.

promptstring required

A text description of the desired image(s).

widthinteger

The width of the generated image(s) in pixels.

heightinteger

The height of the generated image(s) in pixels.

num_inference_stepsinteger nullable

Number of denoising steps in the diffusion process. Higher values generally result in higher quality images but take longer to generate.

seedinteger

Random seed for image generation. Use -1 for a random seed.

guidance_scalenumber nullable

Guidance scale for the model. Higher values make the image adhere more closely to the prompt.

negative_promptstring

A text description of the non-desired image(s).

response_extension'webp' | 'jpg' | 'png'
response_format'b64_json' | 'url'

Example request

{
  "model": "black-forest-labs/flux-schnell"
}

Response

Successful Response

idstring required