Skip to main content

Claude Code Image Generation: Three Ways to Get Real Images in Your Terminal

Can Claude Code generate images? Not on its own. Claude Code can read a screenshot you paste and write the code for an SVG, but it ships no image model. Connect one and it can.
Claude Imagine gives Claude Code a hosted MCP server, an open-source Skill and a plain HTTP API on one credit balance, with Nano Banana 2, GPT Image 2, Seedream 4.5, Flux 2 Pro and Z-Image behind them.

9 signup credits  ·  6 more on your first MCP connection  ·  No Google or OpenAI key needed  ·  Independent tool, not affiliated with Anthropic

Setup

Add Image Generation to Claude Code

Pick one path. The MCP server needs no key at all: the command opens a browser window for OAuth login and consent, then Claude Code has a generate_image tool for the rest of the session. The Skill and the API use a Claude Imagine API key and write files straight into your repo.

Hosted MCP

One command, then ask for an image in the session

claude mcp add --transport http claude-imagine https://claudeimagine.com/api/mcp

# inside Claude Code:
# > Generate a 16:9 hero image of a lime desk lamp on a walnut desk, soft morning light,
# > then download it to public/img/hero.png

Claude Code Skill

Save generated images into the repo

git clone https://github.com/lumian2015/nano-banana-claude-skill .claude/skills/nano-banana-claude
export CLAUDEIMAGINE_API_KEY="sk-..."
python3 .claude/skills/nano-banana-claude/scripts/generate.py "editorial hero image of a lime desk lamp on a walnut desk" --aspect 16:9 --out public/img/hero.png

HTTP API

Let Claude Code write the request itself

curl https://claudeimagine.com/api/v1/images/generations \
  -H "Authorization: Bearer $CLAUDEIMAGINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"nano-banana-2","prompt":"editorial hero image of a lime desk lamp on a walnut desk","aspect_ratio":"16:9"}'

Can Claude Code Generate Images? What It Does Natively

Claude Code inherits Claude's image boundary. Knowing which half is native saves you from asking for something it will never do.

Reads Images You Paste: Yes

Paste a screenshot or a mockup into the terminal and Claude Code can see it, describe it and act on it. Image understanding is native.

Writes SVG and HTML Visuals: Yes

Icons, charts, flowcharts and simple vector graphics come out as code. Useful for UI, useless for a photo or an illustration.

Writes the API Script: Yes

Give Claude Code an image endpoint and it will write the request, run it, save the file and open the result to check it. It is a strong front end for any image API.

Renders Raster Images: No

There is no image model inside Claude, so there is none inside Claude Code. Asking for a photo without a connected tool gets you a description or an SVG.

Edits Photos: Not Natively

Claude Code can tell you what to change in an image but cannot repaint it. Image-to-image editing runs in the Claude Imagine web editor today.

Reviews What It Generated: Yes

After a generation, Claude Code can open the file, compare it with the brief and regenerate with a tighter prompt. That review loop is where Claude earns its place.

MCP Server, Skill or API: Which Claude Code Image Generation Path to Use

All three hit the same generation service and the same credit balance. They differ in where the image lands and what you have to install.

Hosted MCP: Zero Install, Images in the Session

One claude mcp add command, OAuth in the browser, no API key. Claude Code gets generate_image, generate_video, list_models and get_credits. The image comes back as a URL Claude Code can download into your repo.

Skill: Files Written Straight Into the Repo

The open-source Nano Banana Claude Skill runs a Python script with your Claude Imagine API key and writes the image to the path you name. Best for build steps and asset pipelines.

API: Any Language, Any CI

POST /api/v1/images/generations with a bearer key. Claude Code can write the call in Node, Python or shell and wire it into a script that runs outside Claude Code too.

What About a Claude Code Plugin?

Claude Code plugins bundle skills, MCP servers and commands into one installable package. Claude Imagine does not ship a plugin yet; the one-line MCP command does the same job. The open-source image plugins on GitHub typically wrap a Gemini or OpenAI key that you supply and bill yourself.

One Balance Across All Three

MCP calls, Skill runs, API requests and the web generator draw from the same credits. Buy once, spend from any surface.

Failed Generations Are Refunded

Credits are charged when a task starts and returned automatically when the task reports a failed state, on every path.

Generate Images for Your Website From Claude Code

The most common reason people search for image generation in Claude Code is a site that needs a hero image, product shots or Open Graph cards. This is the loop that works.

1

Connect Once

Run the MCP command above, or clone the Skill and export your API key. Either takes under three minutes and is remembered for future sessions.

2

Ask With a Path and a Ratio

"Generate a 16:9 hero image of our lime desk lamp on a walnut desk, soft morning light, and save it to public/img/hero.png." Naming the path and the aspect ratio removes a round trip.

3

Let Claude Code Render and Save

Claude Code calls generate_image or the Skill script with Nano Banana 2 by default, downloads the result to the path you named and can drop the img tag into your page.

4

Review, Then Iterate Cheaply

Ask Claude Code to open the file and compare it with the brief. For rough drafts switch to Z-Image at 1 credit, or 0 credits on Pro and Studio plans, then finish with Nano Banana 2.

Credits and Limits for Image Generation in Claude Code

Numbers below come from the live pricing catalog and apply identically to MCP, Skill and API calls.

9 Signup Credits, Plus 6 for MCP

A new account starts with 9 credits, no card required. Your first authenticated MCP connection adds a one-time 6-credit bonus, for up to 15 free credits.

Nano Banana 2: 3 Credits

The default model on every path and the safest first choice for realistic images. Available on every plan.

GPT Image 2: 2 Credits

The cheapest full-quality option, available on every plan. Pass model gpt-image-2 in the Skill or API, or just say GPT Image 2 to Claude Code.

Seedream 4.5 and Flux 2 Pro: 4 and 5 Credits, Pro

Both require a Pro plan or above. Seedream 4.5 for photographic fidelity, Flux 2 Pro for detailed composition work.

Z-Image Drafts: 1 Credit, or 0 on Pro and Studio

The fast draft model for iterating on layout and framing before spending credits on the final render.

Concurrency by Plan

One generation at a time on free accounts, 2 on Basic, 3 on Pro and 8 on Studio. Extra requests wait instead of failing.

Claude Code Image Generation FAQ

Have another question? Email us at support@claudeimagine.com.









Commands and credit costs verified September 3, 2026 against the live MCP server, the open-source Skill repository and the pricing catalog. Claude Code MCP setup is documented at code.claude.com. The full connector walkthrough for claude.ai and Claude Desktop is on the MCP setup page.

Give Claude Code a Real Image Model

One command adds the MCP server. Your first authenticated connection unlocks 6 bonus credits on top of the 9 you start with.