A fuel gauge draining glowing token-coins into a swirling vortex of HTML and SVG brackets, beside one calm finished framed picture.
Hero image generated with ChatGPT Images (openai/gpt-image-2) via Mesh API. A bounded, flat-cost pixel job, exactly the kind of work you want to keep away from a code agent.
While putting Claude Design through a real build this week, we ran into something worth writing up. We asked it to build a website design, a video editing portfolio with four or five menus, and handed it a few screenshots of the work in progress. Claude told us to come back in five minutes. When we came back, it had been grinding away for thirty to forty minutes straight. One follow up to change the logo ran another five to ten. By the end it had spent an entire five hour quota plus eight dollars of extra usage credits, all from basically one prompt and one edit.
The design came out great, and honestly it was impressive that it just did the work. But there's a question sitting underneath that bill: why does Claude Design cost so much when a normal image generator would've spit out a picture for a fraction of that? That's the whole point of this post, and the answer changes how you build anything visual with AI.
What actually happened in that prompt
Here's the short version of the confusion. It's easy to assume Claude Design works like an image generator: hand it a prompt and some assets, get a finished design back. Even when you feed it your own SVG and PNG files, you'd figure it isn't generating any SVGs itself.
That assumption is the trap. Claude Design isn't an image generator at all, and that one fact explains the entire bill.
Here's what our testing made clear, put bluntly: Claude's agentic design mode generates SVGs, and generating SVGs is basically generating code. The way we've been working around the cost at Mesh API is to do the heavy visual lifting with a separate image model, then ask Claude Design only to convert the result into SVG. This post is the long version of that.
The real answer: code generation is not image generation
Step back and you'll notice "AI image generation" has quietly split into two different things, and they bill in completely different ways.
Split composition: on the left a photographic landscape dissolving into a bounded grid of pixels, on the right the same scene rebuilt from stacked glowing lines of code.
Two approaches, one gateway: this split-frame came from Google's imagen-4-ultra via Mesh API. The left half is what pixel models give you, a finished, bounded raster. The right half is what a code agent builds: structure assembled out of markup.
Pixel generation is the diffusion approach. Models like OpenAI's ChatGPT Images 2.0 and Google's Gemini Nano Banana 2 paint a raster image, a grid of pixels saved as a PNG or JPG. Producing one image is a bounded job. The model runs a fixed set of steps and stops. Cost is roughly flat per image, whether the prompt is simple or wild.
Code generation is what Claude does. Anthropic says it plainly on their own support page: Claude doesn't produce photos or illustrations the way image tools do. Instead it builds diagrams, charts, and visuals using HTML and SVG. Claude Design extends that into full prototypes, wireframes, decks, and landing pages. The output is markup that a browser renders, not pixels.
So when Claude Design "makes a design," it's writing code. And code generation bills by the token, not by the image. That one difference is the whole story behind the quota burn.
Why agentic design eats tokens
A diffusion model does one pass and returns a file. Claude Design runs an agent. That's why one of them ran for forty minutes.
An isometric loop track with stages plan, write code, render, critique, rewrite circling a central clock reading forty minutes, with tokens flying off as sparks.
The agentic loop, generated with Google's imagen-4 via Mesh API. Every lap around the track (plan, write, render, critique, rewrite) is more model calls and more output tokens. A forty-minute run is a lot of laps.
To build a multi page website design from a prompt, the agent does a loop. It plans the layout, writes thousands of lines of HTML and SVG markup, renders the result, critiques its own work, rewrites sections, and repeats until the design holds together. Every cycle is more model calls and more output tokens. A run that goes thirty to forty minutes is doing a lot of those cycles back to back.
Token billing means cost scales with complexity and iteration. A simple one element graphic is cheap. A full portfolio site with four or five menus, consistent styling, and a logo swap is a mountain of generated code, and the bill follows the token count. This is also why it never behaves this way in Claude Code for routine maintenance. A small code fix is a small number of tokens. A complete design built from scratch is not.
One more thing worth clearing up, because it trips everyone up. Handing Claude your own SVG and PNG assets doesn't make it cheaper the way you'd expect. Those files become inputs the agent places inside the design. The expensive part is still the generation: reasoning about layout and writing all the markup that arranges your assets into a working page. The assets are ingredients. The cooking is still code generation.
Pixel vs code: the cost profiles compared
| Factor | Pixel generation (ChatGPT Images 2.0, Gemini Nano Banana 2) | Code generation (Claude Design) |
|---|---|---|
| What it produces | Raster file (PNG, JPG) | HTML and SVG markup |
| How it bills | Roughly flat per image | Per token, plus reasoning |
| Cost predictability | High and bounded | Variable, scales with complexity |
| Runtime | Seconds | Seconds to tens of minutes |
| Best for | Photos, art, posters, creatives | Prototypes, decks, dashboards, editable visuals |
| Editability | Repaint the whole image | Edit elements directly, data stays live |
| Risk | Flat file you cannot easily change | Runaway usage on complex jobs |
Neither column is better. They solve different problems. The mistake is using the expensive one for a job the cheap one could finish in seconds.
The fix: a hybrid workflow
A single glowing API gateway hub routing a stream of finished pixel images on one side and a stream of structured code blocks on the other, merging into one polished webpage.
The hybrid workflow, generated with openai/gpt-image-2 via Mesh API. One gateway routes the raster work to a fast pixel model and the structural work to a code model. Every image in this post was made that way.
Here's the workflow that keeps cost sane, and it's the one we've been running.
- Do the heavy visual work with a pixel model. When you need a hero image, a textured background, an illustration, or anything photographic, generate it with a diffusion model. The cost is fixed and the result lands in seconds.
- Use Claude only for the structural step you actually need code for. Hand the generated visuals to Claude Design and ask it to assemble or convert them into editable SVG and a clean layout. You're paying for the part that genuinely needs code, not for the agent to dream up a picture from nothing.
- Cap the agentic loop. Give Claude tighter, smaller instructions instead of one giant open ended brief. A logo change as its own scoped request is cheaper than letting it re evaluate the whole site.
The principle is simple. Match the tool to the job. Use pixels where you need a picture. Use code where you need structure. Stop paying token prices for pixel work.
How to keep cost predictable when you build
If your product touches both worlds, and most do, the operational problem becomes integration. A pixel model for creatives, a code model for product visuals, maybe a third model next quarter, each with its own keys, billing, and behavior. That sprawl is where build time and budget quietly leak.
This is exactly why unified gateways exist. At Mesh API we run a single LLM gateway so you can route the raster work to a fast image model and the structural work to Claude through one integration. You see usage in one place, switch models without a rewrite, and run the hybrid workflow above instead of stitching providers together by hand. In my experience working with Indian AI first teams, predictable cost isn't a nice to have, it's the difference between shipping and stalling.
Common mistakes to avoid
Treating Claude Design like a cheap image generator. It's a code generating agent. Brief it like one, and scope the work.
Letting the agent run unbounded. One enormous open prompt invites a forty minute loop. Break the job into smaller scoped requests.
Using one model for everything. A diffusion model can't give you an editable layout, and a code agent shouldn't be painting your hero image. Split the work.
Ignoring the asset assumption. Giving Claude your own files doesn't turn off code generation. Plan for the generation cost regardless.
Frequently asked questions
Why did Claude Design use so much usage in one prompt?
Because Claude Design generates code, not images, and code generation bills by the token. Building a full multi page design means the agent writes thousands of lines of HTML and SVG and iterates on them for many cycles, sometimes for tens of minutes. Token consumption scales with that complexity, which is how one prompt can spend a full quota plus extra credits.
Does giving Claude my own SVG and PNG assets reduce usage?
Not as much as you'd hope. Your files become inputs placed inside the design, but the costly part is still the generation: reasoning about layout and writing all the markup that arranges those assets. The assets are ingredients, and assembling them into a working page is still code generation.
Is pixel image generation cheaper than Claude Design?
For producing a finished picture, usually yes. Diffusion models like ChatGPT Images 2.0 and Gemini Nano Banana 2 run a bounded process and bill roughly flat per image. Claude Design bills per token and scales with how complex the design is, so a large design can cost far more than a single generated image.
What is the cheapest way to generate designs at scale?
Use a hybrid workflow. Generate the visual heavy elements with a fast diffusion model at fixed cost, then use Claude Design only to convert and assemble them into editable SVG and layout. Scope each request tightly so the agent doesn't re run the whole job.
Can I use one API for both image models and Claude?
Yes. A unified gateway like Mesh API lets you call diffusion image models and Claude through a single integration, so you can route raster work to one model and structural work to another without managing separate keys, billing, or SDKs. Every image in this article was generated that way: ChatGPT Images and Google Imagen, routed through one Mesh API key.
Conclusion
That bill wasn't a glitch. It was the predictable result of using a code generating agent for a job people assume is image generation. Here's what to take away:
- Claude Design generates code, not pictures, and code bills by the token.
- Agentic design runs a loop, so cost scales with complexity and can balloon on big jobs.
- Pixel models bill roughly flat per image and finish in seconds.
- The cheap path is hybrid: pixels for visuals, Claude for the structure you actually need as code.
- A unified gateway lets you run that hybrid through one integration with cost in one view.
If you're building anything visual with AI and want control over what it costs, stop forcing one model to do every job. Try Mesh API and route each task to the right model through a single integration, so a logo change never costs you a whole quota again.
Sources
- OpenAI. "Introducing ChatGPT Images 2.0." April 2026.
- Google. "Image generation with Gemini (Nano Banana 2)."
- Anthropic. "Can Claude produce images?" Anthropic Help Center.
- Anthropic. "Claude Design." Anthropic Labs.
Last updated: seventh june twenty twenty-six.