- Home
- Learn
- Deep Dives
- Claude Code Image Generation: Make App Assets From Your Terminal
Claude Code Image Generation: Make App Assets From Your Terminal
Claude Code can't draw, but it can call an image model over MCP and save the file in your repo. Setup, prompts, Nano Banana and GPT Image costs.
Published 19-11-2026. Last verified 19-11-2026: image model prices and Claude Code's MCP settings change often, and we re-check this page monthly.
Quick answer: can Claude Code generate images?
Claude Code image generation works, but not on its own. Claude Code is a coding agent built on a language model, so it writes the markup for a hero image without being able to paint the pixels. Connect an image model as an MCP tool and Claude Code can generate the image, edit it and save it straight into your project, for example as public/og/pricing.png. This guide is for developers and small product teams who build in Claude Code and need real assets, such as hero images, Open Graph cards, icons and game sprites, without switching to a browser tab. We cover four routes, the exact setup with project scope for a team, which model fits which asset and what an asset pack costs, with prices checked on 19-11-2026. For the broader question across the Claude apps, see our explainer on Claude image generation.
How we checked this
Our method in three lines: we read Anthropic's Claude Code documentation on MCP, we opened the top three US search results for "claude code image generation", and we read every price and model on our image tools pages on the day of writing.
Our gate: a route counts only if Claude Code itself ends with an image file on disk in your project, and its cost or requirement is documented on a page we read on 19-11-2026. Two approaches did not pass as a general answer. Asking Claude Code to "just draw it" without a tool failed for photos and illustrations: it can only write SVG or canvas code, which we keep as a separate route for icons and diagrams. And a Claude Code plugin that drives an image web app through Chrome browser automation, which ranks in the top three, failed for team use: it depends on a consumer web page's layout and a browser extension, so one redesign of that page breaks your build step.
We did not run test generations for this article. Prices are starting prices from our tools pages and the asset-pack cost is our own calculation, so image quality and exact cost per run are not tested by us.
Can Claude Code generate images?
Not by itself. Every source we read agrees on this, including the Claude Code plugin in the search results that states in its README that Claude Code has no built-in image generation.
What Claude Code does have is the ability to call tools. Anthropic's Claude Code MCP documentation shows on 19-11-2026 how to add a remote server with one command: claude mcp add --transport http followed by a name and a URL. Once an image tool is connected, Claude Code has everything it needs to write a good prompt: it has read your copy, it knows the component is 1200 by 630, and it knows your brand colours from the CSS. That is the real advantage over a separate image app. The context is already in the session.
Four ways to generate images in Claude Code
We rank these from the route we set up for most teams to the one we would only use for one specific job.
1. Image tools over MCP
Connect one MCP server that exposes several image models, and Claude Code picks the model per asset. Through Agensi, our image generation tools page listed 29 image tools on 19-11-2026, from FLUX Schnell at $0.0039 per image and GPT Image 2 at $0.0156 to Nano Banana Pro at $0.195. You need no Google, OpenAI or Black Forest Labs account or API key, because Agensi runs the models on its own accounts. Claude Code gets the exact price before a run, you pay the actual cost and never more, and a failed generation is free.
This is where we send almost every developer, because the alternative is one key per vendor in your environment and one bill per vendor. Skills for working with these models sit in our image generation collection.
To be fair to the alternatives: the same tools page marks FLUX, MiniMax and Topaz Labs as brands with an official MCP server. For Nano Banana, our Nano Banana tools page notes that most MCP servers are community projects that want your own Gemini key, and that Google's open-source genmedia servers are marked as not an officially supported product. If you only ever use FLUX and already have that account, its own server is a fine choice.
2. Your own API key in a script
Claude Code can write a small script that calls an image API with your key and writes the file. This is the right route if image generation becomes part of your product, for example user avatars generated at sign-up, because then the call belongs in your code, not in your agent. It is the wrong route for twenty marketing assets, because you manage keys, quotas and errors per vendor. Skills for API work sit in our frontend and web apps collection.
3. Code-drawn SVG and canvas
For icons, simple illustrations, charts and diagrams, Claude Code can write the SVG itself. No model and no cost per run. The result is editable and sharp at every size. favicon set generator, free, builds a full favicon and PWA icon set from one logo file. It does not do photos or textured illustrations; that is where route 1 takes over.
4. Browser automation of a web app
The plugin from the search results drives a consumer image site through Chrome. It works for a one-off, but it failed our gate for teams, as explained above.
| Route | What you need | Cost on 19-11-2026 | Best for |
|---|---|---|---|
| Image tools over MCP | One connection and a balance | From $0.0039 per image | Photos, illustrations, edits, OG cards |
| Own API key in a script | A key per vendor and code | The vendor's API price | Image generation inside your product |
| Code-drawn SVG | Nothing extra | Free per run | Icons, favicons, diagrams |
| Browser automation | Chrome, an extension, a web account | The web app's plan | One-off experiments |
How to set it up, step by step
The MCP route in five steps, as we would set it up for a three-person product team.
- Add the server. In your project folder, run the command from our setup guide: claude mcp add --transport http agensi https://mcp.agensi.io/mcp/auth. Then open /mcp inside Claude Code and choose Authenticate. Our guide to claude mcp add explains every flag.
- Pick the scope on purpose. Anthropic's MCP docs describe three scopes on 19-11-2026. Local is the default and stays private to you in that project. Project writes the server to .mcp.json in your repo, so the team gets it through git. User makes it available in all your projects. For a team repo we use project scope, so the next developer only has to sign in.
- Set a budget. Top-ups start at $5 according to our docs on 19-11-2026, and every account gets $0.99 of free credit once for tools. In Dashboard, Balance you can set limits per use, per day and per month, which we recommend before anyone runs a batch.
- Prompt with a path, a size and a purpose. Claude Code is good at prompts once it knows the target. Name the file path, the pixel size, the format and where the asset will be seen.
- Check the file, then commit. Ask Claude Code to confirm the file exists with its dimensions and size, then reference it in the component. Depending on the tool, the image comes back as a download link or inline; either way, have Claude Code write it to the path you named. Agensi download links work for 7 days, so save what you keep.
Sample prompt: "Create a 1200x630 Open Graph image for /pricing using our brand colours from tailwind.config.js, flat illustration, no text. Use GPT Image, show me the price first, save it as public/og/pricing.png and add it to the page metadata."
Claude Code counts as its own agent on Agensi: our setup docs state that only the newest signed-in app per account stays connected, so if you switch between Claude.ai and Claude Code you reconnect. For which other servers belong in a Claude Code setup, see our list of the best MCP servers for Claude Code.
Which image model for which asset?
Pick the model by the asset, not by the hype. Our order, from the model we reach for most in a web project, with starting prices from our image tools page on 19-11-2026:
| Model | Best for | Starting price |
|---|---|---|
| GPT Image 2.5 Sunburst | Logos, icons, stickers on a transparent background | $0.0156 per image |
| Nano Banana 2 | Everyday images and edits, 512px to 4K | $0.065 per image |
| Nano Banana 2 Lite | Drafts to find the right prompt, 1K only | $0.052 per image |
| Nano Banana Pro | The hero image a customer studies, up to 4K | $0.195 per image |
| FLUX Schnell | Many quick placeholders | $0.0039 per image |
GPT Image 2.5 is first because transparent backgrounds are what most UI assets need, and at $0.0156 it is cheap enough to retry. Nano Banana 2 is second because it covers every size from a thumbnail to a 4K banner and edits from a reference image, which keeps a product looking like your product. Nano Banana 2 Lite is third because it is for finding the prompt, not for shipping. Nano Banana Pro is fourth only on price; for the one hero image on your homepage it is where we would spend. FLUX Schnell is last because it is the placeholder tool: fine for a prototype, rarely the final asset.
If an image carries text, such as a poster or a pricing graphic, our image tools page recommends Alibaba Cloud Generate and Edit Images (Qwen Image) at $0.052, which renders small text in 12 languages. Check every word before you ship. For a wider comparison of image apps outside Claude Code, see our list of the best AI tools for image generation.
What does Claude Code image generation cost?
Less than the time it takes to find a stock photo. Our calculation for a landing page asset pack, on starting prices from 19-11-2026:
- 6 drafts on Nano Banana 2 Lite to find the hero prompt: $0.312
- 1 final hero image on Nano Banana Pro: $0.195
- 3 Open Graph cards on GPT Image 2: $0.0468
- 1 logo mark on GPT Image 2.5 Sunburst: $0.0156
- 1 product cut-out with Topaz Labs Remove Image Background: $0.13
That is about $0.70 for eleven generated files, as our calculation, not a measured run. Bigger sizes and higher quality settings cost more, and Claude Code tells you the exact cost of each run. Compare that with the alternative the top search results describe: your own API key per vendor, at two to nine cents an image according to one of them when we read it on 19-11-2026, plus the time to manage the keys.
Skills that turn this into an asset pipeline
A model makes one image. A skill gives Claude Code a method for a whole set, so the tenth asset matches the first.
- AI Image Generator: On-Brand Images, No API Keys, free, makes Claude Code work like an art director with a brief, drafts and a check against your brand colours; its skill page lists Nano Banana 2 Lite and FLUX Schnell and states no API keys are needed. Branding skills sit in our branding and design collection.
- Nano Banana: Gemini Image Generation and Editing, $5, teaches six-slot prompts, reference chaining for consistent characters and a scored quality check, on Nano Banana 2.
- AI Web App UI Mockup Generator, $7.99, turns a product brief into an interface blueprint with GPT Image 2 renders. UI skills sit in our UX and UI design collection.
- Game Sprite Sheet Pipeline: On-Model 2D Sprites and Atlases, $15, keeps a character on-model across animations and packs the atlas, on GPT Image 2. More in our game development collection.
- App Icon Set Generator: iOS + Android From One PNG, $7, turns one PNG into 16 iOS and Android icon files with a placement guide. It works on a file you already have, so pair it with a generated logo. Mobile skills sit in our mobile development collection.
- og image generator, free, builds 1200x630 share images and audits your Open Graph tags.
We order these by how often a web team needs them, not by price.
Troubleshooting
The image result is too large. Anthropic's MCP docs state on 19-11-2026 that tool results with image data are subject to MAX_MCP_OUTPUT_TOKENS, which defaults to 25,000 tokens. If a big inline image fails, ask for a smaller size first or raise that variable.
The file lands in the wrong folder. Always name the full path in the prompt and ask Claude Code to list the folder afterwards.
Agensi disconnected after you used Claude.ai. One agent per account stays connected; reconnect in Claude Code with /mcp.
The image has wrong text. Use a text-capable model, or keep the text in HTML on top of the image, which is better for accessibility anyway.
If you are new to how Claude Code runs tools at all, start with our explainer what is Claude Code.
Your next step
We sell skills and pay-per-call tools that your agent uses through one MCP connection, and we name ours above. No vendor paid to be listed.
Connect Agensi in Claude Code once through our MCP page with project scope, and generate one Open Graph card for a real page. At $0.0156 on GPT Image 2 you will know within a minute whether this belongs in your workflow.
Written by Samuel Rose, Founder of Agensi. Next scheduled review: 19-12-2026.