Skip to main content
POST
Image Generations

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

OpenAI-compatible POST /v1/images/generations request body.

model
string
required

provider/model, e.g. 'openai/gpt-image-2'

prompt
string
required
Required string length: 1 - 32000
n
integer | null
Required range: 1 <= x <= 10
size
string | null

Provider-specific size string. OpenAI accepts '1024x1024', '1536x1024', '1024x1536', 'auto'. Vertex Imagen accepts square or aspect-ratio strings. Validation is delegated to the provider.

user
string | null

End-user identifier for abuse tracking.

metadata
Metadata · object | null

Arbitrary metadata attached to the request.

extra_headers
Extra Headers · object | null

Additional HTTP headers forwarded to the provider API. Credential headers (Authorization, x-api-key, ...) are rejected.

quality
string | null

Provider-specific quality string (e.g. 'low', 'medium', 'high', 'standard', 'hd', 'auto'). Accepted values depend on the model.

response_format
string | null

Legacy DALL-E parameter. Ignored by gpt-image-* and forwarded to the provider for any model that still honors it.

Response

Successful Response

OpenAI-compatible image response + Eden cost / provider fields.

Shared by POST /v3/images/generations and POST /v3/images/edits — the wire shape is identical.

cost
number | null
provider
string | null
created
integer | null
data
ImageDataItem · object[]
usage
Usage · object | null