Become a founding member.

Can Claude Generate Images? How to Do It in Claude Code

Andrew Adams

Andrew Adams

·12 min read
Can Claude Generate Images? How to Do It in Claude Code
In this article▾
  1. Make Images From Claude With Wireflow
  2. Why Claude Code Cannot Generate Images Natively
  3. What You Need Before You Start
  4. Method 1: Add an Image Generation MCP Server
  5. Method 2: Let Claude Code Write the API Script Itself
  6. Method 3: Call a Hosted Workflow Endpoint
  7. Which Method Should You Use?
  8. Frequently Asked Questions
  9. Start Generating From Your Terminal

Can Claude generate images? Not natively, but Claude Code can call an image model for you. Here are 3 ways to add it, including Wireflow, with exact steps.

The same is true in the Claude app. Claude can read images and draw charts in code, but it can't make a photo or an illustration. To get real images, connect Wireflow to Claude or Claude Code once, then ask in plain words. One image costs 12 credits with GPT Image 2.5 Flare, and a new account gets up to 60 starter credits.

Claude Code cannot generate images on its own, but you can add image generation to it in under ten minutes with an MCP server, a short script, or a hosted workflow API. This guide walks through all three methods with exact steps, and Wireflow fits into the third one: it chains image models like FLUX and GPT Image into a single endpoint that Claude Code can call with one curl command. You can build that chain visually in Wireflow, an AI node editor with an API.

Make Images From Claude With Wireflow

You connect Wireflow once, then ask for images in plain words. Wireflow runs the image model and sends the picture back to Claude.

In the Claude app (web or desktop):

  1. Open Customize, then Connectors. Click + Add and choose Add custom connector.
  2. Name it Wireflow and paste https://www.wireflow.ai/api/mcp as the server URL.
  3. Click Continue twice. You don't need an API key.
  4. Click Add, then sign in to Wireflow and approve the access.

This works on every Claude plan. A free Claude account can add one custom connector, so Wireflow can be that one. On Team and Enterprise, an owner adds the connector for the organization first.

In Claude Code:

  1. Run claude mcp add --transport http wireflow https://www.wireflow.ai/api/mcp. Add --scope user to use it in every project.
  2. Type /mcp, choose wireflow, and sign in to Wireflow in your browser.

Then ask, for example:

Use Wireflow to make a 16:9 image of a mountain cabin at dusk with GPT Image 2.5 Flare. Tell me the credit cost and wait for my yes before you run it.

With that last line, Claude looks up the price and waits for your yes before it spends any credits. One image costs 12 credits with GPT Image 2.5 Flare or 20 credits with Nano Banana 2. A new account gets up to 60 starter credits and a free video.

The Claude app setup guide has every step. The same connector can also upscale images in Claude, make music in Claude or make Veo clips in Claude.

Try it yourself

Build this in Wireflow

Make the same kind of asset on a canvas you control, with a free account and no credit card.

Why Claude Code Cannot Generate Images Natively

Claude is a language model. It reads and writes text, reasons over code, and understands images you show it, but it has no diffusion or image synthesis model inside. Claude Code, the terminal agent built on Claude, inherits that limit. When people first try prompting it to "make me a logo," they get an SVG or HTML mockup at best. We covered the broader setup options in our guide to adding image generation to Claude Code; this article focuses on the fastest reliable paths. The same approach works for video, covered in Wireflow's guide to video editing MCP servers.

What Claude Code does exceptionally well is orchestrate. It can write the API call, run it from your shell, save the output file, open the result to review it visually, and iterate on the prompt until the image is right. That makes it a strong front end for any image generation API built for developers, even though the pixels are always produced by an external model.

What You Need Before You Start

  • Claude Code installed and authenticated in your terminal
  • An API key from an image provider (fal.ai, Replicate, OpenAI, or Google), or access to a hosted workflow endpoint
  • A folder in your project for generated assets, for example ./assets/generated

That is the whole list. You do not need a GPU, a Python environment, or any local model weights. For a hands-on look at wiring Claude Code to a production image pipeline, check out the AI API with Claude Code integration page, which shows the two-node setup this article's workflow uses.

Developer terminal running an AI image generation command

Method 1: Add an Image Generation MCP Server

MCP (Model Context Protocol) servers give Claude Code new tools it can call natively, so image generation becomes a first-class action instead of a script it has to write. We published a full MCP server image generation example if you want a deeper reference; the short version looks like this.

  1. Pick a provider with an MCP server. Replicate, ImagineArt, Stability AI, and several Gemini-based community servers all publish one. Choose based on the models you want access to.
  2. Register the server with Claude Code. The general shape is claude mcp add <name> -e PROVIDER_API_KEY=your-key -- npx -y <server-package>. You can also declare it in a .mcp.json file at the project root so teammates get the same tool.
  3. Restart Claude Code and prompt in plain English. Something like: "Generate a 16:9 image of a mountain cabin at dusk and save it to ./assets/generated/cabin.png."
  4. Verify the output. Ask Claude Code to open the file and describe it. Because Claude has vision, it can confirm the image matches the brief and regenerate if it does not.

The MCP route is the cleanest for daily use. The tradeoff is that each server exposes one provider's models, so switching from Stable Diffusion to GPT Image usually means installing a second server.

Method 2: Let Claude Code Write the API Script Itself

If you would rather not install anything, use the tool Claude Code already has: your shell. It can write and run a script that calls any image endpoint directly. This works with every major provider, from OpenAI's image API to the Stable Diffusion API tools ecosystem.

  1. Export your API key in the terminal session, for example export FAL_KEY=your-key.
  2. Describe the script you want. Prompt: "Write a Node script that POSTs a prompt to https://fal.run/fal-ai/flux/dev with my FAL_KEY, downloads the returned image, and saves it to ./assets/generated with a timestamped filename. Then run it with the prompt 'isometric illustration of a data pipeline'."
  3. Let it run and review. Claude Code executes the script, waits for the response, and saves the file.
  4. Iterate visually. Ask it to read the saved image and critique it against your brief, then adjust the prompt or parameters and rerun.

The script method is the most flexible and the easiest to commit to your repo, since the generation logic lives in your codebase rather than in tool configuration. It is also the simplest to parameterize for batch jobs, like generating twenty product variations in a loop.

AI workflow canvas chaining multiple image models

Method 3: Call a Hosted Workflow Endpoint

Single API calls cover single models. Real image pipelines usually chain steps: generate a base image, upscale it, remove the background, then composite text. Writing and maintaining that chain as a script gets messy fast, which is why chaining multiple AI models in one API call through a workflow platform is the standard approach for production use.

  1. Build the chain visually on a node-based image generation canvas: an input node for the prompt, one or more model nodes, and any post-processing steps.
  2. Publish the workflow so it gets a stable ID and an HTTP endpoint.
  3. Call it from Claude Code. One curl request with your prompt as the payload triggers the whole chain, and Claude Code can poll for the finished asset URL.
  4. Reuse it everywhere. The same endpoint works from CI jobs, backend services, and other agents, so the pipeline you tuned once stays consistent.

This method separates concerns nicely: the visual canvas owns model selection and chaining, while Claude Code owns when and why images get generated.

Finished AI generated marketing images arranged on a desk

Which Method Should You Use?

MethodSetup timeBest forMulti-model chains
MCP server~5 minutesDaily interactive use inside Claude CodeNo, one provider per server
API script~10 minutesBatch jobs and logic you want in your repoManual, you write the glue
Hosted workflow~10 minutesProduction pipelines and repeatable chainsYes, built in

Cost behaves differently across the three. Direct API scripts bill per provider call at each provider's rates, while hosted workflows meter usage per run with credit-based pricing, which makes spend easier to predict when a single trigger fans out into several model calls.

A practical pattern is to combine them: use an MCP server for quick one-off assets while you work, and a hosted workflow endpoint for anything that ships. Teams using other coding agents report the same split; our GitHub Copilot image generation guide shows the identical architecture from a different agent.

Robot artist painting on a digital canvas

Tips That Save Time

  • Name outputs deterministically. Ask Claude Code to save files as <slug>-<step>.png so reruns overwrite cleanly instead of piling up duplicates.
  • Keep prompts in files. A prompts/ folder in your repo lets Claude Code version, diff, and reuse the prompts that worked.
  • Always have it review the image. Claude's vision is the quality gate; a one-line "open the file and check it matches the brief" catches bad generations before they reach a teammate.
  • Set a budget guard. For batch jobs, tell Claude Code the maximum number of generations per run so a retry loop cannot burn through credits.

Try it yourself: Run this image workflow in Wireflow, the nodes come pre-configured with the exact setup discussed above, so you can trigger it from Claude Code with a single request.

Frequently Asked Questions

Can Claude Code generate images natively?

No. Claude is a text and reasoning model with vision input, but it contains no image synthesis model. Claude Code generates images by calling external models through MCP servers, scripts, or workflow APIs, as described above.

Which image models can I use with Claude Code?

Any model with an HTTP API: FLUX, Stable Diffusion, OpenAI's GPT Image models, Google's Imagen, Recraft, and dozens of others. The method you choose determines how they connect, not which models are available.

Do I need an API key?

Not always. Scripts need a provider key (fal.ai, Replicate, OpenAI, or Google), and so do many MCP servers and hosted workflow endpoints. Hosted MCP servers with a sign-in, such as Wireflow's, need no key: you sign in once and approve the access. Keys stay in environment variables, so they never appear in your prompts or repo.

Can Claude Code see the images it generates?

Yes. Claude has vision, so Claude Code can open a generated file, describe what it sees, compare it against your brief, and regenerate with an adjusted prompt. This review loop is the biggest practical advantage over generating images in a separate browser tab.

How much does it cost to generate images this way?

Claude Code itself adds no image cost; you pay the image provider per generation. Typical per-image prices range from under a cent for fast SDXL variants to several cents for premium models. Workflow platforms meter per run, which bundles multi-step chains into one predictable charge. On Wireflow, one GPT Image 2.5 Flare image costs 12 credits.

What is an MCP server?

MCP (Model Context Protocol) is an open standard that lets tools expose capabilities to AI agents. An image generation MCP server gives Claude Code a native "generate image" tool, so you can prompt in plain English instead of writing API code.

Can I automate image generation in CI or cron jobs?

Yes. Claude Code runs headless with the -p flag, so a CI step can invoke it with a prompt and let it call your image endpoint. For pure automation without an agent in the loop, calling the workflow endpoint directly from your pipeline is simpler and faster.

Can Claude Code edit existing images?

It can orchestrate editing the same way it orchestrates generation: image-to-image models, upscalers, and background removers all have APIs it can call. Point it at the source file, name the transformation, and it wires the call.

Can the Claude app make images, or only Claude Code?

Neither makes images on its own. Both can use an image tool you connect. In the Claude app, you add it under Customize, then Connectors. In Claude Code, you add it with one command. After that, you can ask for an image in any chat.

Does Claude have an image generator built in?

No. Claude can read images you upload, and it can draw charts, diagrams and simple graphics in code. It has no built-in model for photos or illustrations, so those come from a connected tool.

Is Claude good for image generation?

Claude is good at the work around the image. It writes the prompt, checks the result with its vision and asks for changes. The picture itself comes from the image model you connect, such as GPT Image 2.5 Flare or Nano Banana 2.

Can I make images with a free Claude account?

Yes, through a connector. A free Claude account can add one custom connector. Connect Wireflow, and a new Wireflow account gets up to 60 starter credits, enough for 5 images at 12 credits each with GPT Image 2.5 Flare.

Start Generating From Your Terminal

Pick the method that matches how you work: MCP for interactive sessions, scripts for repo-owned logic, or a hosted workflow when you need chains that ship to production. All three turn Claude Code from a text-only assistant into a full creative pipeline driver, and platforms like Wireflow handle the model-chaining half so your agent only has to make one call. Start with the developer-friendly AI image platforms comparison if you are still choosing a provider.

Written by
Andrew Adams

Andrew Adams

Co-Founder & Operations at Wireflow

Runs client operations and content strategy at Wireflow. Works directly with creative teams and agencies to build production AI workflows.

  • Content Strategy
  • Client Operations
Start here

Ask Claude for your next ad.

Connect once. Ask any time.

  • No credit card
  • You keep the rights to what you make
  • Cancel anytime