Integration guides · 2026-11-05
GPT Image 2.6 API: Flare or Sunburst, and your first request
Call the GPT Image 2.6 API on LLMTR from Python: Flare or Sunburst, the first generation request, quality and complexity, and a per-image cost table.
Short answer: model openai/gpt-image-2.6-flare or openai/gpt-image-2.6-sunburst, endpoint https://llmtr.com/v1/images/generations
LLMTR is a gateway that gives access to AI models from different providers through one OpenAI-compatible API. The GPT Image 2.6 API is called on LLMTR with two model ids: openai/gpt-image-2.6-flare and openai/gpt-image-2.6-sunburst. A generation request goes to https://llmtr.com/v1/images/generations; an API key created in your llmtr.com account and a funded balance are all you need. The price is the same on both models: per 1M tokens, $5 text input, $8 image input and $30 image output.
Both models generate images and animated GIFs from text and edit existing images. They also produce SVG; an SVG is billed differently, so the documentation covers it separately. The image comes back as base64 in the response's data[0].b64_json field, and its format is in data[0].mime_type. This article covers the generation request, the choice between the two models, the quality and complexity fields and the cost; GIFs and edits are the subject of the other article.
How do you send a first request to the GPT Image 2.6 API?
Three steps are enough. First create an API key on llmtr.com and top up your balance under Dashboard > Billing. Then put the key in the LLMTR_API_KEY environment variable. Finally send a JSON body carrying the model and prompt fields to https://llmtr.com/v1/images/generations, with Bearer and your key in the Authorization header.
The example below generates two images from the same prompt: a draft on Flare at quality low, then a version on Sunburst at quality high. Each call decodes the image from base64, writes it to a file and prints the token counts in the usage field. Fields you leave out use their defaults: quality medium, size 1024x1024, complexity high and output_format png. Complex prompts can take up to two minutes, which is why the timeout in the example is 300 seconds.
Python example that sends the same prompt to https://llmtr.com/v1/images/generations on Flare and then on Sunburst, and writes the images to files.
import base64
import os
import requests
URL = "https://llmtr.com/v1/images/generations"
PROMPT = "A ceramic coffee cup on a wooden table, natural light, product photo"
DRAFT = {
"model": "openai/gpt-image-2.6-flare",
"prompt": PROMPT,
"size": "1024x1024",
"quality": "low",
"complexity": "low",
"output_format": "webp",
}
FINAL = {
"model": "openai/gpt-image-2.6-sunburst",
"prompt": PROMPT,
"size": "1024x1024",
"quality": "high",
"complexity": "medium",
"output_format": "webp",
}
def generate(body, out_path):
response = requests.post(
URL,
headers={"Authorization": "Bearer " + os.environ["LLMTR_API_KEY"]},
json=body,
timeout=300,
)
response.raise_for_status()
data = response.json()
image = data["data"][0]
with open(out_path, "wb") as f:
f.write(base64.b64decode(image["b64_json"]))
usage = data["usage"]
print(out_path, image["mime_type"], usage["input_tokens"], usage["output_tokens"])
# 1. A draft with Flare
generate(DRAFT, "draft.webp")
# 2. The same prompt with Sunburst, when the detail matters
generate(FINAL, "final.webp")
Flare or Sunburst?
OpenAI's image generation guide describes Sunburst for detailed visual work and Flare for fast iteration. Its image prompting guide suggests starting a new workflow with Flare if response time matters most, and with Sunburst if the image must meet demanding requirements for detail, layout or precise edits. The two models take the same fields and prices, and changing the model id is enough to switch. So the choice depends on the kind of work, not on the price.
See which model fits on your own data: send your own prompts and kinds of image to both models and put the results side by side. If an image goes to a customer or into print, have a person look at the result, and check any text in the image and the placement of its elements in particular.
- Flare: work where response time matters most, drafts and trial rounds, product visuals and posters. While you try several prompts, send quality low, then send the prompt you like again with a higher quality value. The result is a new image.
- Sunburst: work where detail, layout and precise edits matter, and work where characters, products and brand elements should stay consistent across edits. Choose a quality of medium or above for this.
- When you compare them, change the model id and nothing else. The same request does not return the same image every time, so repeat each request a few times and compare the results.
How do you choose quality and complexity?
The two fields set different things: quality sets how much detail goes into rendering, while complexity sets how much the model plans the scene before it renders. If you leave them out, quality is medium and complexity is high.
- quality: takes low, medium, high, xhigh, max and auto. An image's output cost varies with this value and with the size.
- complexity: takes low, medium and high, and has no separate fee.
- For focused work, such as changing a background, start with complexity low and check the surrounding details.
- For dense text, complex layouts and relationships between objects, start with the default high; higher values can take longer and introduce changes you did not ask for.
- size auto and quality auto: the highest likely amount is set aside from your balance before the request starts, and the real amount is charged afterwards; auto values are set aside at the highest possible amount. If you run on a low balance, write the size and quality explicitly.
What does an image cost?
Billing is per token: per 1M tokens, $5 text input, $8 image input and $30 image output. The table shows the approximate output cost per image at 1024x1024, according to OpenAI's calculator as of 5 November 2026, excluding input. Other sizes are in the Prices section of the documentation.
By this table, the output of the two calls in the example comes to about $0.025 and $0.053. The output of 100 images costs about $2.50 at low and about $21.10 at max. The input for a prompt of 100 tokens costs $0.0005; in an edit, the images you send also count at the image input price. OpenAI's price table lists a cached rate, but on LLMTR no cache discount applies on these models, and every request counts at the full input price. The exact amount is calculated from the usage field in the response.
| quality | Approximate output cost per image |
|---|---|
| low | $0.025 |
| medium | $0.043 |
| high | $0.053 |
| xhigh | $0.094 |
| max | $0.211 |
Common errors and how to fix them
Error responses carry a type and a message in the error field. The most common cases on a generation request:
- 400 invalid_request because the size is invalid: edges must be multiples of 16 and at most 3840, the ratio must not exceed 3:1, and the total must stay between 655,360 and 8,294,400 pixels. Fix the field in the message; this request is not billed.
- 400 invalid_request because the prompt is over 32,000 characters: shorten it.
- 400 unsupported_operation because stream: true or partial_images was sent: these fields are rejected on these models, so remove them.
- 400 content_filter because the request was blocked by the provider's content policy: change the prompt, and do not repeat the same request.
- 402 insufficient_credits because the balance does not cover this request: top up, write the size and quality explicitly, or choose a lower quality.
- 503 model_unavailable because the model cannot serve: try again later.
A first image with GPT Image 2.6 through LLMTR
Create an API key, send a prompt with openai/gpt-image-2.6-flare to https://llmtr.com/v1/images/generations, write data[0].b64_json to a file and read the usage field.
- Key. Create an API key on llmtr.com, top up your balance under Dashboard > Billing and put the key in the LLMTR_API_KEY environment variable.
- Request. Send a JSON body carrying the model, prompt, size, quality and complexity fields to https://llmtr.com/v1/images/generations; start with quality low.
- Check. Decode data[0].b64_json from base64 into a file, look at the token counts in the usage field, and choose the quality value after a person has looked at the result.
Frequently asked questions
Is there a price difference between GPT Image 2.6 Flare and Sunburst?
No. Both cost $5 text input, $8 image input and $30 image output per 1M tokens. They also share their fields, and changing the model id is enough to switch.
What happens if you leave out complexity?
Both models use high. complexity can be low, medium or high and has no separate fee; quality sets how much detail goes into rendering, and it changes the output cost.
What does a 1024x1024 image cost?
According to OpenAI's calculator, excluding input, about $0.025 at low, $0.043 at medium, $0.053 at high, $0.094 at xhigh and $0.211 at max. The exact amount is calculated from the usage field in the response.