A working image feature needs to know what happens between submission and delivery. GPT Image 2.5 Flare and Sunburst are available on RouterBase; this guide focuses on that request lifecycle.
Explore RouterBase: https://routerbase.com/
Start with a minimal payload
Use openai/gpt-image-2.5-flare-t2i for this example. Set n to 1, choose size: "1024x1024", and provide a concrete prompt such as: “A ceramic cup on a pale tabletop, soft window light, generous empty space on the right.” Keep your API key in a server-side environment variable.
{
"model": "openai/gpt-image-2.5-flare-t2i",
"prompt": "A ceramic cup on a pale tabletop, soft window light, generous empty space on the right",
"n": 1,
"size": "1024x1024"
}
Store state before rendering the result
Treat the submission response as a job record. Store its ID with your own request record, and display a pending state in the interface. Show the returned image only after the task has succeeded. Keep submission errors separate from generation failures so users can tell whether their request was accepted.
A dropped connection needs particular care. Keep the same idempotency key for a retry of the same job; a deliberate new generation needs a new key. Set an application timeout and a reasonable polling interval rather than continuously submitting duplicate work.
Review the first successful output
Check that the file opens, that its dimensions suit your placement, and that the scene matches the brief. Record the payload and the returned task ID so you can investigate an issue later. This sample is a request shape, not a completed generation. Once the lifecycle works, change one parameter at a time to evaluate size, quality, or the Sunburst variant.
Choose the task and collect the result
RouterBase lists GPT Image 2.5 Flare and Sunburst with separate text-to-image and edit IDs. For a new image, submit to /v1/images/generations. The response supplies a generation ID while the task is pending. Save it, then poll /v1/images/generations/{id}. When the status is success, read data[0].url; when it is failed, inspect the error. Use an Idempotency-Key when retrying the same submission.
Read the RouterBase implementation guide.
Disclosure: This article was drafted with AI assistance and reviewed against RouterBase's public documentation. The examples describe proposed requests; no generation test results are presented.
Top comments (0)