gpt-image-2-2k
GPT Image 2 · 2K targets higher-resolution OpenAI image output.
Auth: Authorization: Bearer sk-… from the Console. Use this model id exactly in the model field.
Only parameters relevant to gpt-image-2-2k are listed below.
| Field | Type | Req | Description |
|---|---|---|---|
| model | string | ✓ | gpt-image-2-1k | gpt-image-2-2k | gpt-image-2 (legacy 1K alias) | doubao-seedream-5.0 | grok-4-image | grok-4.2-image — exact catalog ids only |
| prompt | string | ✓ | Text description of the image |
| size | string | — | gpt-image-2-1k / gpt-image-2-2k: aspect ratio 1:1 | 16:9 | 9:16 | 4:3 | 3:4 | 3:2 | 2:3 | … (or legacy WxH — gateway maps to ratio). gpt-image-2 (legacy alias for 1K). grok-4*: alias for aspect_ratio. doubao-seedream-5.0: aspect ratio + resolution 2K|3K|4K |
| aspect_ratio | string | — | grok-4-image / grok-4.2-image: 1:1 | 16:9 | 9:16 | 4:3 | 3:4 (default 1:1). Alias: size. |
| resolution | string | — | gpt-image-2-1k → 1k; gpt-image-2-2k → 2k; gpt-image-2 legacy alias → 1k (optional resolution extra for 4k). grok-4*: 1k (default) | 2k. Prefer gpt-image-2-1k / gpt-image-2-2k. |
| n | integer | — | Images to generate. gpt-image-2: fixed 1. grok-4*: 1–10. Billed per successful image. |
| quality | string | — | grok-4*: low (default) | medium | high. Ignored for gpt-image-2. |
| image_urls | string[] | — | Img2img reference (gpt-image-2 only). Up to 16 URLs or data URIs (gateway may enforce lower limits). Grok: use POST /v1/images/edits instead. |
| image | string | string[] | — | Legacy alias — gateway maps to image_urls for gpt-image-2. seedream: still accepts image. |
| strength | number | — | Legacy img2img field — not used for gpt-image-2. |
| Field | Type | Req | Description |
|---|---|---|---|
| Img2img (gpt-image-2) | — | — | When image_urls or image is present, pass up to 5–16 reference URLs/data URIs (gateway enforces per-request limits). Prefer aspect-ratio size values such as 1:1 | 16:9 | 9:16. |
| Gateway only | — | — | Call ONLY https://api.lumeapi.site/v1 with your LumeAPI sk-… key. Do not call any third-party API host directly. |
| Sync response | — | — | GPT Image 2 & Grok Image: one HTTP response with standard OpenAI { data: [{ url }] } (30–90s typical). The gateway handles async work server-side. Do NOT call GET /v1/tasks/{id} on our gateway. |
| Unexpected task_id | — | — | If you get task_id back in ~0.3s with no url, contact support — your request format is likely correct; success looks like { data: [{ url }] } after 30–90s. |
| 2K tier | — | — | Use model id gpt-image-2-2k (not gpt-image-2 + quality=high). |
curl https://api.lumeapi.site/v1/images/generations \
-H "Authorization: Bearer sk-…" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2-2k",
"prompt": "Editorial fashion portrait, soft window light",
"size": "3:4",
"n": 1
}'curl https://api.lumeapi.site/v1/images/generations \
-H "Authorization: Bearer sk-…" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2-2k",
"prompt": "Same product in a modern mall scene, soft ambient light",
"image_urls": ["https://cdn.example.com/product-reference.jpg"],
"size": "9:16",
"n": 1
}'POST https://api.lumeapi.site/v1/images/generations or /v1/chat/completions with Authorization: Bearer sk-…. Obtain keys at the LumeAPI Console (/console). Catalog: GET /api/models on the LumeAPI portal API.
images/generations: gpt-image-2, gpt-image-2-2k, doubao-seedream-5.0, grok-4-image, grok-4.2-image. images/edits: grok-4-image, grok-4.2-image (multipart). chat/completions for Gemini Flash / Nano Banana: gemini-3.1-flash-image-preview, gemini-3.1-flash-image-preview-2k, google/gemini-3-pro-image-preview.
One POST returns sync OpenAI { data: [{ url }] } after the gateway finishes (typically 30–90s). Do NOT poll /v1/tasks yourself. size = aspect ratio (16:9); 2K → model gpt-image-2-2k. With image_urls: pass reference images (gateway enforces max). Grok: aspect_ratio or size; resolution 1k|2k; quality low|medium|high; n 1–10. For Grok edits use POST /v1/images/edits with one image file. HTTP read timeout ≥ 180s.
doubao-seedream-5.0: POST /v1/images/generations with aspect ratio size + resolution 2K (default). Sync { data: [{ url }] } after 30–90s. gemini-3.1-flash-image-preview*: POST /v1/chat/completions with modalities + image_config.
Flat USD per image (see pricing tables). 402 insufficient_user_quota when balance empty. Failed generations return 4xx/5xx with error message.
Contact support — success should be { data: [{ url }] } after 30–90s. Your request format is likely correct.