POST /v1/images/generations
Image generation endpoint.
Inference APIs
Generate images through the gateway with upstream model selection, billing headers, and response passthrough.
POST/v1/images/generations
Request
- Auth: tenant auth when enabled; otherwise dev mode is open
- Content-Type:
application/json - Max body size: 1 MiB
Request fields
| Field | Type | Required | Notes |
|---|---|---|---|
prompt | string | yes | Required |
model | string | no | Defaults to openai/dall-e-3 when omitted |
n | integer | no | Number of images |
size | string | no | Passed upstream when present |
quality | string | no | hd is recognized for DALL-E 3 cost calculation |
style | string | no | Passed upstream when present |
response_format | string | no | url or b64_json depending on upstream support |
user | string | no | Passed upstream when present |
metadata or aramm | object | no | Attribution fields stripped before upstream dispatch |
Response schema
| Field | Type | Required | Notes |
|---|---|---|---|
created | int64 | yes | Unix timestamp |
data | array | yes | Generated image results |
data[].url | string | no | Present when the provider returns URLs |
data[].b64_json | string | no | Present when the provider returns base64 payloads |
data[].revised_prompt | string | no | Prompt rewrite returned by some providers |
Errors
| HTTP | Code | When |
|---|---|---|
400 | invalid_request_error | Malformed JSON, missing prompt, unknown model, or unsupported provider |
400 | provider_not_configured | Provider missing from config or unavailable |
502 | provider-specific | Upstream provider error normalized to the gateway envelope |
Notes
- The response body is passed through from the upstream provider.
- Gateway billing headers are added when available.
modeldefaults to DALL-E 3 when omitted.