GPT Image 2.5 Medium · Images API
GPT Image. GPT Image follows a long prompt literally and writes readable text. Low is for drafts, High for the final frame.
POST https://api.synesta.ai/v1/generations
Model ID: gpt-image-2.5-medium
Notes
- Price from $0.06 per run (from 0.94 credits).
POST /estimategives the exact price for your parameters. - References: up to 16 images (
reference_ids, upload withPOST /references). - Prompt up to 32000 characters.
Quick start
Start a generation and fetch the result, as in the Quickstart. The key is in the SYNESTA_API_KEY variable.
bash
curl -X POST https://api.synesta.ai/v1/generations \
-H "Authorization: Bearer $SYNESTA_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"type":"image","model":"gpt-image-2.5-medium","prompt":"A lighthouse at dawn"}'
# then poll until status is done or failed
curl https://api.synesta.ai/v1/generations/GENERATION_ID \
-H "Authorization: Bearer $SYNESTA_API_KEY"python
import os, time, uuid, requests
BASE = "https://api.synesta.ai/v1"
headers = {"Authorization": f"Bearer {os.environ['SYNESTA_API_KEY']}"}
res = requests.post(
f"{BASE}/generations",
headers={**headers, "Idempotency-Key": str(uuid.uuid4())},
json={
"type": "image",
"model": "gpt-image-2.5-medium",
"prompt": "A lighthouse at dawn",
},
)
data = res.json()["data"]
while data["status"] not in ("done", "failed"):
time.sleep(3)
data = requests.get(f"{BASE}/generations/{data['id']}", headers=headers).json()["data"]
print(data["status"], [o["url"] for o in data["outputs"]])js
const BASE = 'https://api.synesta.ai/v1';
const headers = { Authorization: `Bearer ${process.env.SYNESTA_API_KEY}` };
const start = await fetch(`${BASE}/generations`, {
method: 'POST',
headers: { ...headers, 'Content-Type': 'application/json', 'Idempotency-Key': crypto.randomUUID() },
body: JSON.stringify({
"type": "image",
"model": "gpt-image-2.5-medium",
"prompt": "A lighthouse at dawn"
}),
});
let { data } = await start.json();
while (data.status !== 'done' && data.status !== 'failed') {
await new Promise((r) => setTimeout(r, 3000));
({ data } = await (await fetch(`${BASE}/generations/${data.id}`, { headers })).json());
}
console.log(data.status, data.outputs.map((o) => o.url));Input schema
Body of POST /generations. An extra field or a wrong type gives 422 invalid_parameters, a field the model does not take gives 422 unsupported_input.
| Field | Type | Required | Default | Values and limits |
|---|---|---|---|---|
type | string | yes | — | image |
model | string | yes | — | — |
prompt | string | yes | — | max length 32000 |
aspect | string | — | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9 | |
resolution | string | — | 1K, 2K, 4K | |
reference_ids | array<integer> | — | items 0 … 16; Reference id from POST /references. | |
max_credits | number | — | min 0 | |
webhook_url | string | — | max length 2048; format uri |
Full JSON schema
json
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"model",
"prompt"
],
"properties": {
"type": {
"type": "string",
"enum": [
"image"
]
},
"model": {
"type": "string"
},
"prompt": {
"type": "string",
"maxLength": 32000
},
"aspect": {
"type": "string",
"enum": [
"1:1",
"16:9",
"9:16",
"4:3",
"3:4",
"3:2",
"2:3",
"21:9"
]
},
"resolution": {
"type": "string",
"enum": [
"1K",
"2K",
"4K"
]
},
"reference_ids": {
"type": "array",
"items": {
"type": "integer"
},
"maxItems": 16
},
"max_credits": {
"type": "number",
"minimum": 0
},
"webhook_url": {
"type": "string",
"maxLength": 2048,
"format": "uri"
}
}
}Response
The example shows the "from" price: the final price depends on the parameters, POST /estimate returns it.
Accepted · 202
Right after the start. Credits are charged, there is no result yet.
json
{
"data": {
"id": 12345,
"type": "image",
"model": "gpt-image-2.5-medium",
"status": "queued",
"prompt": "A lighthouse at dawn",
"cost_credits": 0.94,
"cost_usd": 0.05875,
"refunded": false,
"credits_refunded": 0,
"created_at": "2026-01-15T10:00:00Z",
"finished_at": null,
"outputs": [],
"error": null,
"queue": {
"queued_at": "2026-01-15T10:00:00Z"
},
"partial_refund": null,
"applied": {
"model": "gpt-image-2.5-medium"
}
},
"meta": {
"replayed": false
}
}Done · GET /generations/{id}
When status is done. The links in the example are placeholders.
json
{
"data": {
"id": 12345,
"type": "image",
"model": "gpt-image-2.5-medium",
"status": "done",
"prompt": "A lighthouse at dawn",
"cost_credits": 0.94,
"cost_usd": 0.05875,
"refunded": false,
"credits_refunded": 0,
"created_at": "2026-01-15T10:00:00Z",
"finished_at": "2026-01-15T10:00:42Z",
"outputs": [
{
"url": "https://storage.example.com/result.png",
"kind": "image",
"mime": "image/png",
"preview_url": null,
"thumb_url": "https://storage.example.com/result-thumb.webp"
}
],
"error": null,
"queue": {
"queued_at": "2026-01-15T10:00:00Z"
},
"partial_refund": null,
"applied": {
"model": "gpt-image-2.5-medium"
}
}
}Other models
GPT Image family
- GPT Image 2 High · from $1.25 per run
- GPT Image 2 Low · from $0.13 per run
- GPT Image 2 Medium · from $0.38 per run
- GPT Image 2 · Inpaint · from $0.38 per run
- GPT Image 2.5 High · from $0.23 per run
- GPT Image 2.5 Low · from $0.03 per run
Images
- Flux 2 Flex · from $0.57 per run
- Flux 2 Pro · from $0.44 per run
- Grok Imagine · from $0.13 per run
- Grok Imagine Img2Img · from $0.13 per run