Skip to main content
POST
Generate images

Authorizations

Authorization
string
header
required

Enter the API key with the Bearer: prefix, e.g. "Bearer "

Path Parameters

workspaceID
string
required

The workspace ID

Pattern: ^[a-f0-9]{24}$

Body

application/json
prompt
string
required

Text description of the desired image

model
string
default:openai/gpt-image-1
required

Image generation model ID. Supported models:

  • google/gemini-2.5-flash-image
  • google/gemini-3-pro-image-preview
  • openai/gpt-image-2
  • openai/gpt-image-1.5
  • openai/gpt-image-1
  • openai/gpt-image-1-mini
n
number

Number of images to generate (1-10)

size
string

Image size. OpenAI: auto, 1024x1024, 1536x1024, 1024x1536. Gemini: aspect ratios like 1:1, 2:3, 16:9.

quality
string

Image quality. OpenAI: auto, low, medium, high. Gemini: 1K, 2K, 4K.

background
string

Background setting

moderation
string

Content moderation level

output_format
enum<string>

Output image format

Available options:
png,
jpeg,
webp
output_compression
number

Compression level for jpeg/webp

partial_images
number

Number of partial images for progressive loading

response_format
string

Response format (url or b64_json)

stream
boolean

Enable streaming

style
string

Image style

user
string

End-user identifier

Response

Successful response

id
string

Log ID

created
integer<unix-timestamp>
data
object[]
usage
object