GPT Image 2.5 API

OpenAI image model for precise editing and detailed visual work

1K
APIMart $0.0085 / image
Official≈$0.025266% less
2K
PackyAPI ≈$0.0285 / image
Official≈$0.038826% less
4K
PackyAPI ≈$0.0415 / image
Official≈$0.056526% less

Compare prices

Compare public channel prices for the same output specification

Output specificationProvidersPublished provider priceTypical timeTry it
Official reference quality
Official reference quality
1K
OpenAIOfficial
Typical time 15 sec
15 secTry it
Replicate
$0.0470 / image≈87% more
Reference price only; not available through Yir
WaveSpeedAI
$0.0240 / image
Reference price only; not available through Yir
APIMart · Standard
Typical time 18 sec
18 secTry it
PackyAPI
Typical time 19 sec
19 secTry it
KIE
$0.0150 / image≈40% less
Typical time 1.2 min
1.2 minTry it
Higgsfield App
≈$0.0150 / image≈40% less
Reference price only; not available through Yir
APIMart · Special
$0.0085 / image≈66% less
Typical time 44 sec
44 secTry it
2K
OpenAIOfficial
Typical time 26 sec
26 secTry it
KIE
$0.0500 / image≈29% more
Typical time 50 sec
50 secTry it
Replicate
$0.0470 / image≈21% more
Reference price only; not available through Yir
WaveSpeedAI
$0.0400 / image≈3% more
Reference price only; not available through Yir
APIMart · Standard
Typical time 24 sec
24 secTry it
APIMart · Special
$0.0300 / image≈23% less
Typical time 47 sec
47 secTry it
Higgsfield App
≈$0.0300 / image≈23% less
Reference price only; not available through Yir
PackyAPI
Typical time 23 sec
23 secTry it
4K
OpenAIOfficial
Typical time 31 sec
31 secTry it
KIE
$0.0800 / image≈42% more
Typical time 41 sec
41 secTry it
WaveSpeedAI
$0.0700 / image≈24% more
Reference price only; not available through Yir
APIMart · Standard
Typical time 33 sec
33 secTry it
PackyAPI
Typical time 34 sec
34 secTry it
APIMart · Special
$0.0400 / image≈29% less
Typical time 55 sec
55 secTry it
Higgsfield App
≈$0.0375 / image≈34% less
Reference price only; not available through Yir

Automatic routing and failover

Call GPT Image 2.5 with one model ID and Yir picks the channel for each job from OpenAI, APIMart, KIE, and PackyAPI: it goes to the eligible channel with the lowest estimated price and is billed at that channel's public price, with no markup. If an attempt is confirmed failed, Yir retries on another channel within your max_cost. No routing parameters needed in your request. Routing and fallback docs

Pricing notes

Billed by the channel that actually runs the job. Failover may switch channels, which can change cost and time.

Choose a version

Every version uses the same API with its own model ID; see each version’s price table for prices and supported specifications

Flare (Standard)

OpenAI image model for everyday generation and fast iteration

Model ID
openai/gpt-image-2.5-flare
Resolution
1K / 2K / 4K
Input mode
Text input · Image input

Sunburst (Precise)

OpenAI image model for precise editing and detailed visual work

Model ID
openai/gpt-image-2.5-sunburst
Resolution
1K / 2K / 4K
Input mode
Text input · Image input

Use the API

Hand the code to a coding agent, generate right in the chat with MCP or the Skill, or integrate yourself with the SDK or the OpenAI-compatible API.

Let a coding agent integrate it

Copy the integration prompt, or open it directly in Codex or Claude. The agent reads this page and the model contract, then writes submit, wait and result handling into your project.

Add the Yir MCP server

Connect it to ChatGPT, Claude or Cursor, then mention @Yir and ask for GPT Image 2.5 by name. It quotes first and only generates after you confirm.

https://gateway.yir.ai/mcp
Setup steps for each client

One command for Claude Code

Create an API key in the console, set it as YIR_API_KEY, then run:

claude mcp add --transport http yir https://gateway.yir.ai/mcp --header "Authorization: Bearer $YIR_API_KEY"

Install the Yir Skill

Set YIR_API_KEY where your agent runs, add the Skill to Claude Code, Codex or another coding agent, then say “use GPT Image 2.5 on Yir to make…”.

npx skills add yir-ai/skills
About the Yir Skill

Install the official SDK with your package manager, or copy the code snippet below to get started

$pnpm add @yir-ai/sdk
import { createNodeYirClient } from "@yir-ai/sdk/server";
 
// Reads YIR_API_KEY from the environment by default: process.env.YIR_API_KEY
const client = createNodeYirClient();
 
// 1. Submit an image generation job
const job = await client.submitImage({
model: "openai/gpt-image-2.5-sunburst",
input: {
type: "text",
prompt: "Create a citrus sparkling water product poster: a clear glass bottle and fresh oranges, cream background, soft natural light, and a crisp product label",
},
parameters: {
quality: "medium",
resolution: "1K",
aspect_ratio: "auto",
n: 1,
},
});
 
// 2. Wait for the job to finish and deliver its result
const result = await client.waitForJob(job.id);
console.log("Delivered files:", result.result);
if (result.result && "files" in result.result) {
for (const file of result.result.files) {
console.log("->", file.url);
}
}

Projects already on the OpenAI protocol, or gateways such as new-api, only need a new Base URL and key. OpenAI compatibility guide

OpenAI SDK base_url
https://gateway.yir.ai/openai/v1
new-api channel Base URL
https://gateway.yir.ai/openai
Key
Yir API key
Model ID
openai/gpt-image-2.5-sunburst
curl https://gateway.yir.ai/openai/v1/images/generations \
  -H "Authorization: Bearer $YIR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2.5-sunburst",
    "prompt": "Create a citrus sparkling water product poster: a clear glass bottle and fresh oranges, cream background, soft natural light, and a crisp product label",
    "resolution": "1K",
    "aspect_ratio": "auto",
    "quality": "medium"
  }'

Parameter overview

Common parameters; limits depend on the current model and selected channel

API docs
Resolution
resolution
  • 1K
  • 2K
  • 4K

Output resolution tier. Higher resolutions offer sharper pixel fidelity and scale pricing accordingly

Aspect ratio
aspect_ratio
  • auto
  • 1:1
  • 3:2
  • 2:3
  • 4:3
  • 3:4
  • 5:4
  • 4:5
  • 16:9
  • 9:16
  • 2:1
  • 1:2
  • 3:1
  • 1:3
  • 21:9
  • 9:21

Geometric aspect ratio. Choose according to target medium (portrait, banner, or square)

Input mode
input_mode
  • Text input
  • Image input

Reference limits and formats depend on the model and selected channel

References
references
  • reference_image ≤ 16

Reference limits across input modes depend on the selected channel. Counts in the price table are examples, not input limits or free allowances.

Frequently asked questions

Start building with GPT Image 2.5

Compare the same spec across providers and call multiple providers from one wallet.