OpenAI's GPT Image 2.6 can return a still, an animated GIF, or an SVG from the same model. This tutorial calls it through APIMODELS: one API key, an OpenAI-compatible endpoint, and only the fields on the GPT Image 2.6 API page. It does not invent an official OpenAI per-image price for 2.6 — APIMODELS does not publish one.

What 2.6 adds, and which model ID to send

Compared with 2.5, 2.6 adds animated GIF (2–16 frames), SVG from a text prompt, markup-image edits (circles, arrows and notes on a transparent PNG), masks (white = change), up to 10 images per call, reasoning_effort, and exact sizes with a long edge of at most 3840.

Two IDs take the same parameters: gpt-image-2.6-flare is the default volume tier (gpt-image-2.6 aliases it); gpt-image-2.6-sunburst is the precision tier and spends longer per image. They share 1K and 2K per-image prices and the same per-token rates; only 4K differs.

Authenticate with Authorization: Bearer YOUR_API_KEY at https://api.apimodels.app/v1. The OpenAI SDK works against that base_url for the synchronous Images-style calls.

The size field picks the request style:

  1. Synchronous if you pass an OpenAI-style WxH size (both sides multiples of 16, such as 1024x1024 or 1536x1024). The response carries b64_json and a url, matching images.generate() / images.edit(). Set the client timeout to at least 300 seconds.
  2. Asynchronous if you omit that WxH size. Create returns a taskId. Poll until state is completed and read resultUrls, or pass callback_url. GIF, markup images, masks and num_images use this path, as does SVG without a WxH size.

1. A still image, billed per image

A plain PNG, JPEG or WebP at a set size is billed from a table, whatever the token count. The cheapest row is 1K low at $0.01; 2K high is $0.045. Flare and Sunburst cost the same at 1K and 2K. Omit quality and the image renders at medium. Allowed values are low, medium, high, xhigh, max and auto; auto is charged at the high price. xhigh and max apply only to plain PNG, JPEG or WebP — combined with GIF, a mask, a markup image or a transparent background they return 400.

A text-to-image request with no size defaults to 1024×768, counts as 1K, and is async. To stay on the sync Images API, pass a WxH size:

curl -X POST https://api.apimodels.app/v1/images/generations \ -H "Authorization: Bearer $APIMODELS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2.6-flare", "prompt": "a ceramic coffee cup on a linen tablecloth, morning window light", "size": "1536x1024", "quality": "medium" }' 

data[0] has b64_json and a url on https://r2.apimodels.app/..., plus a top-level usage object. 1536x1024 is in the 1K band (up to 1.7 megapixels; examples include 1024×1024, 1360×768 and 1536×1024). At medium that still is $0.02 before any account discount. usage.cost.amount is the pre-discount price; charged is what was deducted and equals credits. On plain stills, token counts are informational — billing follows the table.

The same call with the OpenAI Python SDK:

import os from openai import OpenAI client = OpenAI( api_key=os.environ["APIMODELS_API_KEY"], base_url="https://api.apimodels.app/v1", ) resp = client.images.generate( model="gpt-image-2.6-flare", prompt="a ceramic coffee cup on a linen tablecloth, morning window light", size="1536x1024", quality="medium", ) print(resp.data[0].url) 

JavaScript, with fetch so the JSON matches the curl request:

const res = await fetch("https://api.apimodels.app/v1/images/generations", { method: "POST", headers: { Authorization: `Bearer ${process.env.APIMODELS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "gpt-image-2.6-flare", prompt: "a ceramic coffee cup on a linen tablecloth, morning window light", size: "1536x1024", quality: "medium", }), }); const body = await res.json(); console.log(body.data[0].url); 

Edits can use the same sync shape on POST /v1/images/edits as multipart form data (image=@product.png, size=1024x1024). An edit that passes a size or resolution is billed from the per-image table; one that keeps the source size (size omitted or auto) is billed per token.

2. An SVG, billed at a flat $0.0315

Set output_format to svg. This is text-to-image only: no reference images, and n must be 1. Quality has no effect on price or output. Streaming and output_compression are not supported. The canvas follows your aspect ratio at up to about 1024×1024; larger sizes are scaled down (vectors scale without loss). With no size, or with auto, the canvas is 1024×768. The file is a static vector with no scripts, external resources or embedded raster, meant for icons, logos and flat illustrations rather than photographs.

The official example omits a WxH size, so the call is async and returns a taskId:

curl -X POST https://api.apimodels.app/v1/images/generations \ -H "Authorization: Bearer $APIMODELS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2.6-flare", "prompt": "a flat two-color icon of a coffee cup with steam, the word OPEN below it", "output_format": "svg" }' 

Poll with the same path and a task_id query parameter:

curl "https://api.apimodels.app/v1/images/generations?task_id=TASK_ID" \ -H "Authorization: Bearer $APIMODELS_API_KEY" 

A completed task looks like { "code": 200, "data": { "taskId": "...", "state": "completed", "resultUrls": ["https://r2.apimodels.app/..."], "credits": ... } }. SVG, GIF, markup, mask, transparent-background, and failed tasks return no usage block. A 1024×1024 SVG took about 40 seconds in the 7 November 2026 measurements.

Python, create then poll:

import os, time, requests BASE = "https://api.apimodels.app/v1" HEADERS = { "Authorization": f"Bearer {os.environ['APIMODELS_API_KEY']}", "Content-Type": "application/json", } created = requests.post( f"{BASE}/images/generations", headers=HEADERS, json={ "model": "gpt-image-2.6-flare", "prompt": "a flat two-color icon of a coffee cup with steam, the word OPEN below it", "output_format": "svg", }, timeout=60, ) created.raise_for_status() task_id = created.json()["data"]["taskId"] while True: poll = requests.get( f"{BASE}/images/generations", headers={"Authorization": HEADERS["Authorization"]}, params={"task_id": task_id}, timeout=60, ) poll.raise_for_status() data = poll.json()["data"] if data.get("state") == "completed": print(data["resultUrls"], "credits=", data.get("credits")) break time.sleep(3) 

Treat only the documented completed state as done. For any other state, keep polling and inspect the payload rather than guessing field names.

JavaScript:

const BASE = "https://api.apimodels.app/v1"; const headers = { Authorization: `Bearer ${process.env.APIMODELS_API_KEY}`, "Content-Type": "application/json", }; const created = await fetch(`${BASE}/images/generations`, { method: "POST", headers, body: JSON.stringify({ model: "gpt-image-2.6-flare", prompt: "a flat two-color icon of a coffee cup with steam, the word OPEN below it", output_format: "svg", }), }); const taskId = (await created.json()).data.taskId; for (;;) { const poll = await fetch( `${BASE}/images/generations?task_id=${encodeURIComponent(taskId)}`, { headers: { Authorization: headers.Authorization } }, ); const data = (await poll.json()).data; if (data.state === "completed") { console.log(data.resultUrls, "credits=", data.credits); break; } await new Promise((r) => setTimeout(r, 3000)); } 

3. An animated GIF, billed per token

GIF is new in 2.6. Set output_format to gif. frame_count is 2–16 (default 9); frame_duration_ms is 20–2000 (default 200). A mask on a GIF request returns 400, as does quality xhigh or max.

Frames sit on one sheet: the count is rounded up to a power of two and fills a grid. The sheet must stay within 3840 px on the long edge and 8,294,400 pixels in total. If you pass only aspect_ratio and resolution, or no size, each frame is shrunk to the largest size that fits (6 frames at 1:1 1K come back at 960×960; 12 frames at 720×720). There is a floor: frame_count × frame pixels must be at least 655,360 (4×512×512 works; 4×256×256 does not).

GIF — and requests with a mask, markup image or transparent background — is billed by tokens used, at 10% below OpenAI's official per-token rates: image output $27 / 1M, image input $7.20 (cached $1.80), text input $4.50 (cached $1.125), text output $9, rounded up to $0.0001. Quality, size, frames, references and prompt length all change the token count. On 5 November 2026, 6 frames at 832×832 low cost about $0.0278; 12 frames at 720×720 low about $0.0451; 9 frames at 960×960 low about $0.0750 (a 3×3 sheet at the pixel cap). On 7 November 2026, 4–16-frame GIFs took 10–24 seconds.

The docs' 12-frame example:

curl -X POST https://api.apimodels.app/v1/images/generations \ -H "Authorization: Bearer $APIMODELS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2.6-flare", "prompt": "a paper boat bobbing on small waves, loopable", "aspect_ratio": "1:1", "resolution": "1K", "output_format": "gif", "frame_count": 12, "frame_duration_ms": 120 }' 

Create returns { "code": 200, "data": { "taskId": "..." } }. Reuse the SVG poll helper and download resultUrls.

If a frame comes back on a solid green screen, the green is keyed to transparency automatically (including a darker green shadow under a character). Keying is free; frame count, duration and loop stay the same. Already-transparent GIFs, or ones whose background is not a solid green screen, are left as they are. Pixels are fully transparent or fully opaque — no soft edges — and details like water drops can keep a trace of green. To keep the green, pass "background": "opaque". Allowed values: auto, transparent, opaque.

Pricing at a glance, and a few limits

Plain stills (and edits that pass a size or resolution), low / medium / high / xhigh / max:

Per image 1K 2K 4K Flare 4K Sunburst
low $0.01 $0.03 $0.03 $0.03
medium $0.02 $0.035 $0.045 $0.085
high $0.03 $0.045 $0.08 $0.16
xhigh $0.07 $0.08 $0.17 $0.28
max $0.08 $0.15 $0.30 $0.47

n images cost n times the per-image price (num_images / n is 1–10; SVG is 1 only). Account discounts apply on top. An upper bound is held when the request is accepted and settled when the image is ready; failed requests are not charged. Result files are deleted after 30 days. reasoning_effort is optional (low, medium, high); omit it and the default is high; xhigh and max run as high; any other value returns 400. Omit output_format and opaque images are delivered as JPEG. output_compression (0–100) applies to JPEG and WebP only.

On 5 November 2026 (16:9), a plain 1K text-to-image took about 20 seconds at low and about 27 seconds at high; a 1K low edit with one reference took 22–58 seconds; 2K and 4K, including high quality, took 13–25 seconds.

The GPT Image 2.6 Flare model page has the same price table and GIF / SVG rules; the docs page is the parameter reference for every field here. The same key can call other models on this endpoint. This walk-through stays on 2.6: a still from $0.01, a $0.0315 SVG, and a token-billed GIF, without the mixes that return 400.