APIMODELSAPIMODELS

GPT Image 2.6 GIF and SVG output via API

TL;DR Short answer: yes. On apimodels.app, call gpt-image-2.6-flare or gpt-image-2.6-sunburst with output_format "gif" (plus frame_count 2 to 16 and frame_duration_ms) or "svg". SVG is text-to-image only, one image per call, a flat $0.0315. A GIF is billed per token at 10% below OpenAI's rates; six low-quality frames cost about 3.4 cents in our test.

Model pages: GPT Image 2.6 Flare API · GPT Image 2.6 Sunburst API — pricing, specs and the playground

A GIF is drawn as one sheet that holds every frame, so the more frames you ask for, the smaller each one gets: up to 1920 px a side at 3 to 4 frames, and 960 px at 9 to 16. Pass only aspect_ratio and resolution and apimodels.app shrinks each frame to the largest size that fits; an exact frame size is sent as it is and shrunk, keeping its ratio, only if it does not fit. In our 7 November 2026 tests a 4 to 16 frame GIF took 10 to 24 seconds.

An SVG is a static vector file with no scripts, external resources or embedded bitmaps, on a canvas of about 1024x1024 at most. It suits icons, logos and flat illustrations. It cannot turn an existing bitmap into a vector, because SVG output takes no reference image. One SVG took about 40 seconds in our tests.

For sticker-style GIFs, ask for a flat green-screen background: when every frame's edge is a solid green screen, apimodels.app keys it out to transparent and the result stays a GIF with the same frames and timing. Pass background "opaque" to keep the green. GIF pixels are either fully transparent or fully opaque, so soft, semi-transparent edges are not possible.

The parameters

FieldValuesNotes
output_formatgif / svg (or png / jpeg / webp)Picks the file type
frame_count2 to 16, default 9GIF only; more than 16 fails
frame_duration_ms20 to 2000, default 200GIF only; milliseconds per frame
aspect_ratio + resolutione.g. 1:1 + 1KFrames are shrunk to fit the sheet automatically
image_urlsup to 16 referencesGIF yes; SVG no (text-to-image only)
n1 to 10SVG must be 1
backgroundauto / transparent / opaqueGIF: opaque keeps a green screen instead of keying it out
maskimage URLNot with GIF (returns 400)
qualitylow / medium / highNo effect on SVG

How big each GIF frame can be

The whole sheet must stay within 3840 px on its longest edge and 8,294,400 pixels in total, and frame_count times the pixels of one frame must be at least 655,360 (four 512x512 frames work, four 256x256 frames do not).

FramesGridPer-frame limitExample sizes
22x1the doubled side up to 1920, the other up to 38401920x1088
3 to 42x2both sides up to 19201440x1440
5 to 84x2short side up to 960, long side up to 1920960x960, 1344x768
9 to 164x4both sides up to 960720x720, 944x528

What it costs

An SVG is a flat $0.0315 per image, whatever the quality. A GIF is billed by the tokens it uses, at 10% below OpenAI's rates (image output $27 per million tokens against OpenAI's $30), so frame count, frame size, quality and references all move the price. In our tests a six-frame low-quality GIF cost about 3.4 cents, and a GIF made from a reference image at default quality about 9 cents. Failed calls are not charged, and Flare and Sunburst share the same GIF and SVG prices.

What it is not good at

Do not expect a photographic scene in an SVG, or a vector tracing of your logo file: SVG output is drawn from the prompt alone. Do not plan large GIFs: past eight frames each frame is at most 960 px. GIF cannot be combined with a mask, so make a local edit on a still image first and animate that. And a GIF's edges stay hard because it has no partial transparency; for soft edges deliver APNG or WebP from your own pipeline.

Quick start

cURL

# SVG: text-to-image only, n = 1, flat $0.0315
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", "output_format": "svg" }'

# Animated GIF: 12 frames, 120 ms each, green screen keyed out to transparent
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 cartoon cat waving, solid #00FF00 background, loopable", "aspect_ratio": "1:1", "resolution": "1K", "output_format": "gif", "frame_count": 12, "frame_duration_ms": 120 }'

# Both return { "data": { "taskId": "..." } }; poll GET /v1/images/generations?task_id=...

Python

import os, time, requests

B = "https://api.apimodels.app/v1"
H = {"Authorization": f"Bearer {os.environ['APIMODELS_API_KEY']}"}

r = requests.post(f"{B}/images/generations", headers=H, json={
    "model": "gpt-image-2.6-flare",
    "prompt": "a cartoon cat waving, solid #00FF00 background, loopable",
    "aspect_ratio": "1:1", "resolution": "1K",
    "output_format": "gif", "frame_count": 12, "frame_duration_ms": 120,
})
task_id = r.json()["data"]["taskId"]

while True:
    d = requests.get(f"{B}/images/generations", headers=H, params={"task_id": task_id}).json()["data"]
    if d["state"] in ("completed", "failed"):
        print(d.get("resultUrls") or d.get("failMsg"), d.get("credits")); break
    time.sleep(3)

FAQ

Can the OpenAI SDK return a GIF?

Use a plain HTTP request for GIF and SVG. The SDK's images.generate with a size takes the one-call path, which is for ordinary PNG, JPEG and WebP images; GIF, SVG, masks and markup-guided edits go through the task endpoint, where you create a task and poll for the result.

How many frames can one GIF have?

Two to sixteen, nine by default. Asking for more returns an error; the "2 to 64 frames" figure still quoted online is out of date.

Can I turn a PNG logo into an SVG?

No. SVG output is text-to-image only and takes no reference image, so it draws a new vector from your prompt rather than tracing an existing file. Describe the logo in words, or use a dedicated vectorizer for tracing.

Flare or Sunburst for GIFs?

Both support GIF and SVG at the same prices. Flare is the default, faster tier and the one to build a pipeline on; Sunburst spends more time per image for finer detail, which matters more on stills than on small GIF frames.

Can GPT Image 2 or 2.5 make GIFs?

No. GIF and SVG output are new in GPT Image 2.6. GPT Image 2 is also retired by OpenAI on February 10, 2027, with 2.6 named as its replacement.

Related

Мы на
APIMODELS on Product HuntAPIMODELS featured on ToolifyAPIMODELS featured on There's An AI For That