Images

Generate an image

Generate images through the synchronous OpenAI Images-compatible endpoint. Supported public model names are gpt-image-2, gpt-image-2.5-flare, and gpt-image-2.5-sunburst. Additional compatible JSON fields are forwarded unchanged. Streaming and asynchronous mode are not supported on this endpoint.

post/v1/images/generations

Request

  • Base URL: https://api.sandbase.ai
  • URL: https://api.sandbase.ai/v1/images/generations
  • Auth: HTTP bearer

Request body

model'gpt-image-2' | 'gpt-image-2.5-flare' | 'gpt-image-2.5-sunburst' required
promptstring required
ninteger
sizestring

Output size supported by the selected model, such as 1024x1024, 1024x1536, 1536x1024, or auto.

qualitystring

Output quality supported by the selected model, such as low, medium, high, or auto.

backgroundstring

Background setting such as transparent, opaque, or auto.

output_formatstring

Output encoding such as png, webp, or jpeg.

output_compressioninteger
moderationstring
userstring
streamfalse

Streaming is not supported by this SandBase endpoint.

mode'sync'

Response

Generated images and authoritative token usage

createdinteger

Changes

No recorded changes to this operation across all 1 revision of this API.