// AGENT MEDIA · CLAUDE CODE

Claude Code image generation: the command Claude is missing

Claude Code cannot make pictures on its own — Anthropic’s own help centre says Claude "doesn’t generate photos or illustrations" the way image tools do. Clize adds the missing command. Install it once and clize gen image "a matte black kettle on concrete" --out ./hero.png writes a real PNG to your working directory. You do not sign up for OpenAI or Google, you do not paste a key: the hosted path carries the provider credential. Run the command bare and it only quotes — about $0.05 an image — and nothing is charged until you add --confirm. A failed generation is refunded. Up to sixteen reference images cost nothing extra. And because the bytes land on disk instead of in the transcript, Claude can Read the file back, decide it is wrong, and try again.

No provider key$0.05 an imageQuote before it spendsRefunded when it fails

Claude does not draw, and the official answer stops there

The top result for this search is Anthropic’s own help article, and it is honest: Claude builds diagrams and interactive visuals out of HTML and SVG, and it can look at images you upload, but it does not produce photographs or illustrations. That is the correct answer to can Claude produce images. It is not an answer to the question people are actually typing, which is: I am already inside Claude Code, my session has a shell and a filesystem, so what do I install so that a PNG appears?

The rest of the results page answers that question, badly. One vendor’s landing page walks you through connecting its own image service and, halfway down, admits Claude Code users would be better off with a CLI — then still asks you to open an account there. A well-written tutorial gets you to a working command in fifteen minutes by having you sign up for a hosting platform, generate a gateway key and export it into your shell profile. Both work; both trade one verb for a second vendor relationship and a secret to keep.

Clize is that with the account and the key removed. A CLI plus a skill: the skill teaches Claude when to reach for the command, the CLI does the work, and the credential for the image models belongs to the platform rather than to you.

Install once, and the verb exists

Three lines, and the next Claude Code session knows how to make a picture:

$ npm i -g @clize/clize
$ clize login
$ clize install --claude

The last command writes four skill folders into Claude Code’s personal skills directory. Run it with --dry-run first if you want to see exactly what it touches before it touches anything:

$ clize install --dry-run --claude

clize install · dry run (--dry-run, no files written)

▸ Claude Code
    skill · up to date · clize → ~/.claude/skills/clize/SKILL.md
    skill · up to date · clize-seo → ~/.claude/skills/clize-seo/SKILL.md
    skill · up to date · clize-site-build → ~/.claude/skills/clize-site-build/SKILL.md
    skill · up to date · clize-site-debug → ~/.claude/skills/clize-site-debug/SKILL.md
    mcp   · skipped (default; add --mcp for the structured tool layer)

Notice the last line. The MCP server is optional and off by default, and for this particular job it is not the route at all: image, video and music generation have no MCP tools — they are CLI verbs that the skill knows how to call. That is a deliberate boundary and worth stating plainly on a page that ranks next to a dozen "image generation MCP" listings. If you want the structured tool layer for the other half of Clize — mail, domains, deploys, the store — registering the MCP server takes one line, and it changes nothing about how images get made.

Nothing else needs configuring. No restart flag, no manifest to edit, no per-project setup. If a session does not seem to know the skill, ask it to list its skills; the folder is on disk and named clize.

There is no key to get

This is the part that reads as marketing and is not. The hosted path holds one platform credential for the image provider, set once by the operator; your machine never sees it. There is no OPENAI_API_KEY to export, no gateway token in a shell profile, no .env for a teammate to leak, no second bill at the end of the month. What you have instead is a Clize balance, the same one that pays for domains and deploys, printed on demand by clize balance.

For an agent specifically it is more than convenience. A key in an environment variable is a key an agent can read, echo into a log, or paste into a file it is writing — a category of accident no amount of prompting reliably prevents. The credential the session does hold buys only what Clize sells, and every purchase prints a price first.

The picture lands on disk, not in the transcript

Here is the whole thing, once:

$ clize gen image "a matte black kettle on raw concrete, soft window light, 3/4 view" --out ./hero.png --confirm

and here is the part that decides whether the next command can use it. Clize does not return an image into the conversation. It writes bytes to a path — ./clize-assets/<id>_<i>.png by default, or wherever --out says — and returns metadata: the job id, the model, the state, the file list, the cost, and a one-line hint telling the agent what it may now do with the file.

Chat-window image generation cannot do this. A picture that exists only as an attachment in a transcript has to be downloaded by a human before anything else can touch it. A picture at ./hero.png is an argument: it goes straight into a page you publish with a Claude Code static deploy, or onto an email as clize email send --attach ./hero.png, which still stops for your approval before sending.

Two consequences. Only metadata comes back through stdout, so a batch never floods the context window. And every asset stays listed: clize gen list --modality image replays what has been made, with model, prompt, path and cost per row.

Let Claude look at what it made

Because the output is a file, Claude Code can open it. The hint the command returns says so in as many words — the image was written to disk, Read it and judge for yourself, and once you are happy, deploy it or attach it. That closes a loop that is normally open:

  1. Claude writes a prompt and runs clize gen image.
  2. Claude reads the PNG back with its own Read tool and actually looks at it.
  3. It notices the kettle handle is cropped, rewrites the prompt, and runs the command again.

The honest limit: this works for stills because a vision model can see a still. It does not extend to video or music, and Clize says so at the point of use rather than in the small print — the video command returns a different hint entirely.

Sixteen reference images, a mask, and the flag that lies to you

Nobody searching this phrase wants one picture of a kettle. They want a set that looks like it came from the same shoot: one product across nine angles, one character across a storyboard. That is a reference-image problem, and it is where the models differ from each other far more than they differ in price.

gpt-image-2 (default)nano-banana-2
Reference images per callUp to 16Up to 14
Images per job1 — it runs on the async pathSeveral, with --n
Inpainting with --maskNot supportedSupported, and needs a base image via --ref
Price$0.05$0.05

Pass references as a comma-separated list, and note that they are free — the quote is calculated from the number of images you asked for and nothing else, so sixteen product shots cost exactly what a bare prompt costs:

$ clize gen image "the same kettle, top-down on a linen cloth" --ref shot1.png,shot2.png,shot3.png --confirm

The size ceiling is per file and per request: about 10MB for any one reference and roughly 80MB in total once encoded, with a readable error rather than a silent truncation if you go over.

The flag that lies to you is --n. It looks like "give me four variants" and on the default model it is not that at all. Run it and you get a refusal before anything is charged:

$ clize gen image "four variants" --n 4
❌ [400] gpt-image-2 uses the async path and makes 1 image per job; run several jobs
    for more, or use --model nano-banana-2.

So: four variants means four jobs on the default model, or one job on nano-banana-2, where four images quote at $0.19 rather than four times $0.05 — the per-image arithmetic rounds in your favour on a batch. If you want to see that arithmetic against published third-party rates before committing, the image cost calculator does it in the browser.

A quote first, five cents after, nothing when it fails

Every paid command in Clize behaves the same way, and this one is the cheapest place to see it. Run it without --confirm and no money moves:

$ clize gen image "a matte black kettle on raw concrete"
{
  "quote": {
    "model": "gpt-image-2",
    "modality": "image",
    "estUsd": 0.05,
    "currency": "USD"
  },
  "message": "📋 Quote about $0.05 (image). Add --confirm to generate."
}

Three properties follow, and they are the ones worth trusting an agent with:

  • The price is shown before it is spent, on every call. There is no pre-approved allowance to run through and no monthly ceiling you can set yourself — the gate is per command, which is blunt but has no failure mode where a loop quietly drains a budget.
  • A failure is refunded, not billed. The charge lands before generation and is credited back if the provider errors or returns nothing, so the retry everyone else prices into their estimates costs zero here.
  • Every model is the same price. $0.05 whichever image model you name, which makes the choice a capability question rather than a cost one.

Every command that can spend is listed in the reference, and each of them quotes first.

The same install also makes video and music

Once the skill is on disk, Claude Code can run all three modalities. They behave differently enough that each gets its own page — a clip is a minutes-long job with an eight-second ceiling, and a track is something the agent cannot judge at all.

If you are choosing between hosts rather than capabilities, the same command inside Codex installs into a different directory and is invoked differently — the underlying verbs are identical.

// FAQ

Can Claude Code generate images?

Not on its own — Anthropic’s help centre states that Claude does not produce photographs or illustrations, only HTML and SVG diagrams. With the Clize skill installed it can: clize gen image "<prompt>" --out ./hero.png --confirm writes a real PNG into the working directory, and Claude can then read that file back and iterate on it.

Do I need my own OpenAI or Google API key?

No. The hosted path carries a platform credential for the image provider, set once by the operator, so nothing goes into your shell profile or a .env file and your agent never handles a provider secret. The only account involved is your Clize login, and the only thing it can spend is your Clize balance.

How much does one image cost from Claude Code?

About $0.05, and the same for every image model, so the model choice is about capability rather than price. Batching on nano-banana-2 rounds down slightly: four images in one job quote at $0.19. Run the command without --confirm and the exact quote is printed before anything is charged.

Where does the generated image go?

To a file. By default ./clize-assets/<id>_<i>.png in the current directory, or wherever --out points. Only metadata comes back through stdout — job id, model, state, file paths, cost — so a batch never floods the context window, and clize gen list --modality image replays everything made so far with its path and cost.

Can I give it reference images to keep a product or character consistent?

Yes, with --ref taking a comma-separated list: up to 16 files on gpt-image-2 and up to 14 on nano-banana-2, about 10MB each and roughly 80MB in total after encoding. References are free — the quote is computed from the number of images requested and nothing else, so sixteen product shots cost the same as a bare prompt.

Can it edit part of an existing image?

Yes, on the nano-banana models. Pass the picture you are editing with --ref and the mask with --mask; the mask only applies to a base image, so --mask without --ref is refused before anything is charged. The default gpt-image-2 path does not support inpainting and says so rather than failing silently.

What happens if a generation fails or comes back unusable?

A provider error or an empty result is refunded to your balance automatically, so failed attempts cost nothing. An image that arrives but is simply wrong is a different case: it was generated, so it was billed, and the fix is to have Claude read the file, change the prompt and run again at another $0.05.

clize gen image — a PNG on disk in one command

Give Claude Code the verb it is missing.

Install once, and the next session can make a picture, look at it, redo it, and drop it straight into the page it is building — without a provider key and without spending a cent you were not shown first.

$ npm i -g @clize/clize && clize login
$ clize install --claude
$ clize gen image "a matte black kettle on raw concrete" --out ./hero.png
[ Agent Media → ]