# GPT Image 2.5 Flare API on TokenRa Model ID: `gpt-image-2.5-flare` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > GPT Image 2.5 Flare generates and edits images through the OpenAI-compatible image endpoints. A request returns finished images in about 30 seconds, base64-encoded by default. - Provider: OpenAI - Type: Image model - Input: Text, image (edits) - Output: PNG image - Billing: Per request ## Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `gpt-image-2.5-flare`: $0.02 per request ## Capabilities & endpoints Both endpoints are OpenAI-compatible, so the OpenAI SDKs work with `base_url=https://tokenra.io/v1`. Both were called successfully on 2026-10-23. - `POST https://tokenra.io/v1/images/generations`: Text to image. JSON body. Returns finished images in the response. - `POST https://tokenra.io/v1/images/edits`: Image to image and editing. `multipart/form-data` with the source image in `image`. ## Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/images/generations \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2.5-flare", "prompt": "A watercolor fox reading a book under a desk lamp", "size": "1024x1536", "quality": "low", "response_format": "url" }' ``` ## Request parameters ### Generate: POST /v1/images/generations | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | Model ID: `gpt-image-2.5-flare`. | | `prompt` | string | Yes | What to draw. | | `size` | string | No | `auto` (default) or a size such as `1024x1536`. With `auto` the test returned a 1254x1254 image. | | `quality` | string | No | `auto` (default), `low`, `medium` or `high`. | | `n` | integer | No | Number of images, default 1. `n: 2` was tested. | | `response_format` | string | No | `b64_json` (default) returns base64 data; `url` returns a temporary link. | ### Edit: POST /v1/images/edits | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | Model ID: `gpt-image-2.5-flare`. | | `prompt` | string | Yes | How to change the image. | | `image` | file | Yes | Source image (PNG tested). | | `response_format` | string | No | `b64_json` (default) or `url`, as for generation. | ## Response format **Example response (base64 shortened)** ```json { "created": 1792766203, "data": [ {"b64_json": "iVBORw0KGgoAAAANSUhEUgAABOYAAATm..."} ], "background": "auto", "output_format": "png", "quality": "auto", "size": "auto", "usage": { "input_tokens": 180, "input_tokens_details": {"image_tokens": 0, "text_tokens": 180}, "output_tokens": 1056, "total_tokens": 1236 } } ``` | Field | Type | Description | | --- | --- | --- | | `created` | integer | Unix timestamp. | | `data[].b64_json` | string | Base64 PNG (default). Decode and save it. | | `data[].url` | string | Temporary link when `response_format` is `url`. Download it promptly. | | `size / quality / output_format` | string | Settings that were applied. | | `usage` | object | Token usage reported by the model. | ## Errors & limits ### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ### Limits and notes - Each request took about 30 seconds in testing. Set the client timeout to at least 120 seconds. - A base64 PNG is roughly 1-3 MB of JSON. Use `response_format: "url"` if you only need a link. - Billing is per request, not per token. See the live rate in the Model Square. ## More - [GPT Image 2.5 Flare API docs page](https://tokenra.io/docs/gpt-image-2.5-flare.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [GPT Image 2.5 Flare overview and pricing page](https://tokenra.io/models/gpt-image-2-5.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/gpt-image-2.5-flare/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/gpt-image-2.5-flare/llms.txt