OpenAI logo

GPT Image 2.5 Flare

by OpenAI
openai/gpt-image-2.5-flare

GPT Image 2.5 Flare is a image model from OpenAI, callable through the AgentSky API as openai/gpt-image-2.5-flare and billed per token (Single image generation: 1024x1024 (default): $0.0247 · 1360x768: $0.0247 · 768x1360: $0.0247 · 2048x2048: $0.0297 · 2736x1536: $0.0297 · 1536x2736: $0.0297 · 2880x2880: $0.033 · 3840x2160: $0.033 · 2160x3840: $0.033 · Other requests (example): Text input: $4.675 / 1M tokens · Cached text input: $1.16875 / 1M tokens · Image input: $7.48 / 1M tokens · Cached image input: $1.87 / 1M tokens · Text output: $0 / 1M tokens · Image output: $28.05 / 1M tokens).

Generate or edit images with text and optional reference images.

Overview

Generate images, or provide images for editing and composition. Billing depends on the request and configured pricing route. Consult pricing_routes for eligible flat-price generation; other requests use native token billing with separate text, image and cached input rates. Without streaming, poll the run until COMPLETED; acceptance alone does not indicate completion. With input.stream=true, POST /v1/run returns gateway SSE: image_generation.partial_image previews followed by run.completed containing the final run, or run.failed. This is the gateway run protocol, not the OpenAI Images or Responses API. Streaming currently requires n=1. Reusing an Idempotency-Key replays the saved run without regenerating previews or charging twice. The complete request is limited to 32 MiB; an encoded result or individual SSE event is limited to 27 MiB and a stream to 108 MiB. Large batches or PNG outputs can exceed the result limit; prefer fewer images or JPEG/WebP compression. Interrupted or unverified results remain pending for reconciliation; never resubmit with a new key to recover a known run.

Decode run.output.data[].b64_json after COMPLETED. Token-priced routes report text/image input, cached input and image output token counts. Flat-price routes report no token usage.

Input

These go in the input object of the run request.

FieldTypeRequiredDescription
promptstringYesDescribe the image or the requested edit.
Maximum: 32000
imagesarrayNoFor editing, 1–16 objects containing image_url (HTTP(S) or image data URL) or b64. Each remote image is at most 50 MiB; inline images and masks together must fit the 32 MiB complete request limit.
maskobjectNoOptional editing mask with image_url or b64. Must be PNG with alpha and match the first input image dimensions.
nintegerNoNumber of output images.
Default: 1
Minimum: 1
Maximum: 10
sizestringNoauto or WIDTHxHEIGHT; sides multiples of 16, longest at most 3840, ratio at most 3:1 and 655360–8294400 pixels. Sizes above 2560x1440 are experimental.
Default: "auto"
qualitystringNoRendering quality; higher settings can consume more output tokens.
Allowed: low, medium, high, xhigh, max, auto
Default: "auto"
output_formatstringNoGenerated image encoding.
Allowed: png, jpeg, webp
Default: "png"
output_compressionintegerNoJPEG/WebP compression only.
Minimum: 0
Maximum: 100
moderationstringNoContent moderation setting.
Allowed: auto, low
Default: "auto"
backgroundstringNoEditing background; transparent is unsupported.
Allowed: auto, opaque
input_fidelitystringNoEditing fidelity is fixed at high.
Allowed: high
response_formatstringNoOnly base64 output is supported.
Allowed: b64_json
streambooleanNoGeneration only: return gateway run SSE with validated image previews and a final run.completed or run.failed event. Requires n=1 and no images input. The current supplier rejects streaming edits; use stream=false for edits.
Default: false
partial_imagesintegerNoMaximum preview images; nonzero requires stream=true. Previews are not separate billable generations.
Default: 0
Minimum: 0
Maximum: 3

Requests up to 34 MB, prompt up to 32,000 characters.

Example

Use your own API key and a saved idempotency key for each new job. Replace image or media placeholders with your own publicly reachable HTTPS URLs. Keep the same key and request body when recovering a timeout.

# Set once per job; reuse this key and the identical body after a timeout.
: "${AGENTSKY_IDEMPOTENCY_KEY:?Set a unique, saved key for this job}"
curl --fail-with-body https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -H "Idempotency-Key: $AGENTSKY_IDEMPOTENCY_KEY" \
  -d '{"provider":"openai","endpoint":"gpt-image-2.5-flare","input":{"prompt":"A blue ceramic bowl on a white table","size":"1024x1024","quality":"low","output_format":"jpeg"}}'
# If status is READY/RUNNING, poll GET /v1/runs/{runId} with the same API key.

Pricing

Prices by supplier route and resolution, using your plan when signed in. Read the final customer charge from price.amount.value after the run finishes. A RUNNING response is not the final bill.

Single image generation

Flat price for prompt, one of the listed exact sizes, and quality auto, low, medium or high (auto when omitted), with no additional fields. 4K square is 2880x2880.

Input conditionsAvailabilityUSD per image
1024x1024 (default)AvailableOfficial price: $0.0264Sale price: $0.0247
1360x768AvailableOfficial price: $0.0264Sale price: $0.0247
768x1360AvailableOfficial price: $0.0264Sale price: $0.0247
2048x2048AvailableOfficial price: $0.0317Sale price: $0.0297
2736x1536AvailableOfficial price: $0.0317Sale price: $0.0297
1536x2736AvailableOfficial price: $0.0317Sale price: $0.0297
2880x2880AvailableOfficial price: $0.0353Sale price: $0.033
3840x2160AvailableOfficial price: $0.0353Sale price: $0.033
2160x3840AvailableOfficial price: $0.0353Sale price: $0.033

Other requests — used by the example

All other supported requests use native token pricing, including editing and streaming.

Input conditionsAvailabilityUSD per million tokens
other (default)AvailableText input / 1M tokensOfficial price: $5.00Sale price: $4.675Cached text input / 1M tokensOfficial price: $1.25Sale price: $1.16875Image input / 1M tokensOfficial price: $8.00Sale price: $7.48Cached image input / 1M tokensOfficial price: $2.00Sale price: $1.87Text output / 1M tokensPrice: $0Image output / 1M tokensOfficial price: $30.00Sale price: $28.05

Questions