- 01
Turn on a per-image model
Under Providers & models, enable an image model that has a listed price, such as gpt-image-2. A model with no price returns model_not_priced and is not sent.
- 02
Name the size, the quality, and n
Set all three. The reservation is then that row times n, plus the prompt. The settled charge is the listed price, which can sit slightly above what OpenAI bills. That keeps the ceiling on the safe side.
images.tsawait client.images.generate({ model: "gpt-image-2", prompt: "A small brass fuse on a workbench", size: "1024x1024", quality: "low", n: 1, }); - 03
Give image calls their own key cap
A loop that asks for ten images at the top quality will walk through a daily budget quickly. A Fuse key used only for images, with its own daily cap, stops that loop and leaves chat traffic alone.
- 04
Handle 402 before you retry
A refused generation did not reach OpenAI and did not produce an image. Queue it or tell the user. Retrying spends nothing more at the provider and does not yield a picture.
What the OpenAI image generation API costs
Updated November 2026
Image generation is not a token guess. For the models Fuse can price, the cost is the listed amount for the size and quality you request, multiplied by n, plus the prompt text. n can be up to 10. Leave size or quality on auto, or omit them, and the reservation uses the dearest listed option, because that is the worst case. A size or quality with no listed price is refused.
Some image models are billed only from tokens generated after the fact. gpt-image-2.5 is one of them. Fuse cannot know that cost from the request, so those models are not forwarded. Image edits are not forwarded either. What remains is a per-image price you can put under the same ceiling as chat.
Questions
Why was my request refused before any image existed?
Either the worst-case price would have crossed a ceiling, or the size, quality, or model has no listed price. model_not_priced and unsupported_in_v1 are configuration. fuse_blown is the budget.
Does streaming image generation work?
No. stream: true on image generation is unsupported. Speech and moderation are separate endpoints; moderation is free and still counts as a request.