# GPT Image 2.5 Flare > Generate images from a text prompt — precise multi-part instruction-following and legible in-image text across full-page layouts, at roughly half the latency of GPT Image 2. ## Overview - **Endpoint**: `https://queue.modelrunner.run/openai/gpt-image-2.5/flare/text-to-image` - **Model ID**: `openai/gpt-image-2.5/flare/text-to-image` - **Category**: text-to-image - **Kind**: inference - **Tags**: text-to-image, openai, gpt, image-generation, typography, gpt-image-2.5, flare ## Pricing - **Price**: $0.0362 per output ## Request Lifecycle This model runs on the ModelRunner **asynchronous queue API** — a single POST does not return the output. Every call requires an `Authorization: Key $MODEL_RUNNER_KEY` header. Run three steps: 1. **Submit** — `POST https://queue.modelrunner.run/openai/gpt-image-2.5/flare/text-to-image` with a JSON body holding the input fields at the top level. The body may also include a reserved top-level `metadata` object — a flat string map (max 16 keys, key ≤64 / value ≤512 chars) stored on the request for your own tagging. It is never sent to the model; filter your request history with `GET https://queue.modelrunner.run/requests?metadata=` (exact key=value matches, AND-ed). The response carries request handles only (no output yet): ```json { "status": "IN_QUEUE", "request_id": "<21-char id>", "status_url": "https://queue.modelrunner.run/openai/gpt-image-2.5/flare/text-to-image/requests//status", "response_url": "https://queue.modelrunner.run/openai/gpt-image-2.5/flare/text-to-image/requests/", "cancel_url": "https://queue.modelrunner.run/openai/gpt-image-2.5/flare/text-to-image/requests//cancel" } ``` 2. **Poll status** — `GET ` until `status` is `COMPLETED`. Possible values are `IN_QUEUE`, `IN_PROGRESS`, `COMPLETED`, `FAILED`, `CANCELLED`. A `FAILED` request responds with HTTP 400 and an `error` field. 3. **Read result** — `GET `. Returns the finished request, including the generated `output`: ```json { "id": "", "status": "COMPLETED", "output": ..., "input": ... } ``` The JavaScript and Python SDKs below perform steps 2–3 for you. In any language without an SDK (Swift, Go, Kotlin, etc.) you must implement the polling loop and the final result fetch yourself — see the cURL example for the full flow. ### Input Schema - **`prompt`** (`string`, _required_): The text prompt describing the image to generate. Put any wording you want rendered inside the image in quotes and say where it should appear. - **`image_size`** (`ImageSizeEnum`, _optional_): The aspect ratio and framing of the generated image. - Default: `"landscape_4_3"` - Options: `"square_hd"`, `"square"`, `"portrait_4_3"`, `"portrait_16_9"`, `"landscape_4_3"`, `"landscape_16_9"` - **`num_images`** (`integer`, _optional_): How many images to generate from this prompt. Each image is charged as its own generation. - Default: `1` - Range: `1` to `4` - **`output_format`** (`OutputFormatEnum`, _optional_): The file format of the generated image. - Default: `"png"` - Options: `"jpeg"`, `"png"`, `"webp"` ### Output Schema _No `Output` schema properties are available._ ## Default Example **Input** ```json { "prompt": "Scene: a farmers-market artisan bakery stall poster pinned to a weathered wooden board. Subject: a rustic sourdough loaf resting on a linen cloth with steam rising, warm morning light. Details: across the top in bold hand-lettered script the headline reads \"SUNDAY MARKET\"; centered mid-poster inside a rounded price tag the text reads \"$6 A LOAF\"; along the bottom edge in small serif capitals the text reads \"OPEN 8AM-1PM SATURDAYS\". Constraints: warm autumn color palette, textured paper background, all three quoted lines rendered exactly as written and legible at normal viewing size.", "image_size": "landscape_4_3", "num_images": 1, "output_format": "png" } ``` **Output** ```json [ "https://media.modelrunner.ai/3J9pomnQWvmaWA0b9xkqW.png" ] ``` ## Usage Examples ### cURL The queue API is asynchronous: submit the request, poll `status_url` until it is `COMPLETED`, then read the result from `response_url`. Requires `jq`. ```bash # 1. Submit the request (returns request handles, not the output) SUBMIT=$(curl --silent --request POST \ --url https://queue.modelrunner.run/openai/gpt-image-2.5/flare/text-to-image \ --header "Authorization: Key $MODEL_RUNNER_KEY" \ --header "Content-Type: application/json" \ --data '{ "prompt": "Scene: a farmers-market artisan bakery stall poster pinned to a weathered wooden board. Subject: a rustic sourdough loaf resting on a linen cloth with steam rising, warm morning light. Details: across the top in bold hand-lettered script the headline reads \"SUNDAY MARKET\"; centered mid-poster inside a rounded price tag the text reads \"$6 A LOAF\"; along the bottom edge in small serif capitals the text reads \"OPEN 8AM-1PM SATURDAYS\". Constraints: warm autumn color palette, textured paper background, all three quoted lines rendered exactly as written and legible at normal viewing size.", "image_size": "landscape_4_3", "num_images": 1, "output_format": "png" }') STATUS_URL=$(echo "$SUBMIT" | jq -r '.status_url') RESPONSE_URL=$(echo "$SUBMIT" | jq -r '.response_url') # 2. Poll until the request leaves the queue / in-progress state while true; do STATUS=$(curl --silent --url "$STATUS_URL" \ --header "Authorization: Key $MODEL_RUNNER_KEY" | jq -r '.status') echo "Status: $STATUS" case "$STATUS" in COMPLETED) break ;; FAILED|CANCELLED) echo "Request $STATUS"; exit 1 ;; esac sleep 1 done # 3. Read the finished request, including the generated output curl --silent --url "$RESPONSE_URL" \ --header "Authorization: Key $MODEL_RUNNER_KEY" ``` ### JavaScript ```javascript import { modelrunner } from "@modelrunner/client"; const result = await modelrunner.subscribe("openai/gpt-image-2.5/flare/text-to-image", { input: { "prompt": "Scene: a farmers-market artisan bakery stall poster pinned to a weathered wooden board. Subject: a rustic sourdough loaf resting on a linen cloth with steam rising, warm morning light. Details: across the top in bold hand-lettered script the headline reads \"SUNDAY MARKET\"; centered mid-poster inside a rounded price tag the text reads \"$6 A LOAF\"; along the bottom edge in small serif capitals the text reads \"OPEN 8AM-1PM SATURDAYS\". Constraints: warm autumn color palette, textured paper background, all three quoted lines rendered exactly as written and legible at normal viewing size.", "image_size": "landscape_4_3", "num_images": 1, "output_format": "png" } }); console.log(result.data); ``` ### Python ```python import asyncio import modelrunner_ai async def main(): response = await modelrunner_ai.submit_async( "openai/gpt-image-2.5/flare/text-to-image", arguments={ "prompt": "Scene: a farmers-market artisan bakery stall poster pinned to a weathered wooden board. Subject: a rustic sourdough loaf resting on a linen cloth with steam rising, warm morning light. Details: across the top in bold hand-lettered script the headline reads \"SUNDAY MARKET\"; centered mid-poster inside a rounded price tag the text reads \"$6 A LOAF\"; along the bottom edge in small serif capitals the text reads \"OPEN 8AM-1PM SATURDAYS\". Constraints: warm autumn color palette, textured paper background, all three quoted lines rendered exactly as written and legible at normal viewing size.", "image_size": "landscape_4_3", "num_images": 1, "output_format": "png" } ) result = await response.get() print(result["output"]) asyncio.run(main()) ``` ## Additional Resources - [Playground](https://modelrunner.ai/models/openai/gpt-image-2.5/flare/text-to-image) - [OpenAPI Schema](https://modelrunner.ai/models/openai/gpt-image-2.5/flare/text-to-image/openapi.json) - [LLM Instructions](https://modelrunner.ai/models/openai/gpt-image-2.5/flare/text-to-image/llms.txt)