GPT Image generation (2 / 2.5 / 2.6)

Endpoint
POST/v1/images/generations

TeamoRouter exposes the GPT Image family (2.6 / 2.5 / 2) through the OpenAI-compatible Images API. For image editing with uploaded files, see Edit images (POST /v1/images/edits).

What's new in GPT Image 2.6: adds the complexity parameter, animated output_format: "gif", vector output_format: "svg", and markup annotation edits. See GPT Image 2.6 API for version highlights.

Available models

Model ID Generation Notes
gpt-image-2.6-flare GPT Image 2.6 Fast and cost-efficient; supports complexity, GIF, SVG, and markup edits
gpt-image-2.6-sunburst GPT Image 2.6 Flagship fidelity for complex layouts and dense text; supports all 2.6 parameters
gpt-image-2.5-flare GPT Image 2.5 Fast 2.5 tier with PNG / JPEG / WebP and transparent backgrounds
gpt-image-2.5-sunburst GPT Image 2.5 High-fidelity 2.5 tier
gpt-image-2 GPT Image 2 Initial release; default when model is omitted

Authentication

http
Authorization: Bearer sk-teamo-xxxxxx
Content-Type: application/json

Generate an image

Minimal request:

bash
curl https://api.teamorouter.com/v1/images/generations \
  -H "Authorization: Bearer sk-teamo-xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.6-flare",
    "prompt": "An orange tabby cat typing on a mechanical keyboard, editorial illustration"
  }'

With explicit size and quality:

json
{
  "model": "gpt-image-2.6-flare",
  "prompt": "An orange tabby cat typing on a mechanical keyboard, editorial illustration",
  "size": "2048x2048",
  "quality": "high"
}

Request parameters

Parameter Description
model gpt-image-2.6-flare, gpt-image-2.6-sunburst, gpt-image-2.5-flare, gpt-image-2.5-sunburst, or gpt-image-2 (defaults to gpt-image-2 if omitted).
prompt Text description of the image to generate.
size auto or <width>x<height>, e.g. 1024x1024, 2048x2048, 3840x2160.
quality low, medium, high, or auto.
n Number of images to generate (default 1).
output_format png, jpeg, or webp; GPT Image 2.6 also supports gif and svg.
output_compression Compression level 0–100 for JPEG/WebP.
background transparent, opaque, or auto. Use png or webp when requesting transparency.
moderation Moderation strictness: low or auto.
stream Set true for SSE streaming: intermediate events have object: "image.generation.chunk", the final event has object: "image.generation.result" with data[0].b64_json, followed by data: [DONE].
partial_images 0 to 3.
user Optional end-user identifier forwarded as-is.

Dimension constraints: longest edge ≤ 3840 px, both width and height divisible by 16, aspect ratio ≤ 3:1, total pixels between 655,360 and 8,294,400. Pass exact pixel dimensions rather than 1k / 2k / 4k strings.

GPT Image 2.6 additions (GIF, SVG, complexity)

Parameter Endpoints Details
complexity Generations, Edits low, medium, or high (default high): planning budget before rendering. Does not change pricing.
output_format: "gif" Generations only Animated GIF. frame_count 2–64 (default 9); frame_duration_ms 20–2000 (default 200); size sets per-frame dimensions.
output_format: "svg" Generations only Vector SVG output. Requires n: 1; streaming, partial images, and output_compression are not supported.
markup Edits only Transparent annotation overlay marking regions to edit (see Edit images).

Animated GIF example:

bash
curl https://api.teamorouter.com/v1/images/generations \
  -H "Authorization: Bearer sk-teamo-xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.6-flare",
    "prompt": "A pixel-art fox waving, looping back to the first pose",
    "output_format": "gif",
    "frame_count": 12,
    "frame_duration_ms": 120
  }'

Decode data[0].b64_json from Base64 to save the resulting .png, .gif, or .svg file. Image generation can take longer than text completions—set a client timeout of at least 300 seconds.

Size tiers & billing

Images are billed per image based on the actual output image's longest edge:

Actual longest edge Billing tier
≤ 1024 px 1K
≤ 2048 px 2K
> 2048 px 4K

Billing follows the returned image's actual pixel dimensions, not the requested size parameter. When size is auto or omitted, the tier matches what the model produces; pass an explicit size for predictable billing. See the live pricing table for current per-tier rates.

FAQ

Image generation fails inside Codex with "unavailable" or connection errors?

Codex restricts outbound network access under default permissions. Switch to Full access from the permission selector in the bottom-left corner of the Codex composer (or under Settings → General → Permissions) and retry.

Select Full access from the Codex composer permission menu

How does billing work? Can I pay with USDT?

Image generation shares the same prepaid balance as text models. If Pay with crypto is shown in the top-up dialog, you can top up with USDT, USDC, or ETH from an exchange app (starting at $5 on BEP20) with no browser wallet required. See Pay for Claude and GPT APIs with USDT.

4K outputs on this site are upscaled. Enterprise customers who need native 4K or custom image quotas can contact support via the QR code at the bottom-right of the homepage.

Ready? Three steps to startLog in to the console · top up · create an API key
DiscordDapatkan bantuan komunitas secara instan