← All posts
8fs Blog

Can Claude Code create images? What it can and can't do.

Short answer: Claude Code itself doesn't generate images. But it can write the code that does: in minutes.

Short answer: Claude Code itself doesn't generate images. But it can write the code that does: in minutes.

Here's the full breakdown of what Claude Code can and can't do with images, and how to use it effectively if image generation is part of your workflow.


What Claude Code actually is

Claude Code is Anthropic's CLI tool for software development: it's a coding assistant that runs in your terminal, reads your codebase, writes and edits files, and executes commands. It's powered by Claude (currently Claude Sonnet 4.6 / Opus 4.8), Anthropic's AI model.

It is not an image generation tool. It does not have DALL-E integration. It does not have Midjourney access built in. If you type "generate an image of a sunset" into Claude Code, it will either explain this limitation or offer to write code that calls an image generation API on your behalf.


What Claude Code can do with images

1. Read and analyze images

Claude (the model powering Claude Code) is multimodal: it can see and understand images. If you give Claude Code a screenshot, a design file exported as PNG, a photo, or any image, it can:

In practice this is useful for: debugging UI screenshots, reviewing design exports, reading specs from images, comparing before/after states.

2. Write code that generates images

This is the genuinely useful part. Claude Code can write fully functional code to generate images using any major API: you just tell it what you want.

DALL-E 3 via OpenAI API:

"Write a Python script that takes a prompt from the command line and generates 
an image using DALL-E 3, saving it to /output/image.png"

Claude Code will write the script, handle the API call, error handling, and save logic. You provide the OpenAI API key.

Stability AI (Stable Diffusion):

"Write a Node.js script that batch-generates product background images using 
the Stability AI API for all JPGs in my /products folder"

Replicate (Flux, SDXL, etc.):

"Write a Python script using the Replicate API to run Flux 1.1 Pro on a list 
of prompts from prompts.txt and save each output"

Midjourney (via unofficial API wrappers):

"Write code to submit a prompt to Midjourney via the Discord API and 
download the result when it's ready"

ComfyUI (local Stable Diffusion):

"Write a Python script that sends a workflow JSON to my local ComfyUI instance 
at localhost:8188 and downloads the output image"

In all of these cases, Claude Code handles the boilerplate: API authentication, request formatting, error handling, output saving. You write the prompt, run the script.

3. Process and manipulate existing images

Claude Code is excellent at writing image processing code:

This is genuinely time-saving for agencies that do repetitive image work: resizing 200 product images to 8 different sizes, for example.

4. Build image generation pipelines

Beyond one-off scripts, Claude Code can build proper tools:


What Claude Code can't do


The practical workflow for agencies

If you're a creative agency that needs to generate images at scale (social content, product backgrounds, campaign concepts), here's the most practical setup with Claude Code:

  1. Pick your image generation API: Replicate for Flux (good quality, pay-per-run), OpenAI for DALL-E 3 (easiest setup), Stability AI for volume pricing
  2. Tell Claude Code what you need: describe the workflow in plain language ("I need to generate 50 background images from a CSV of prompts, save them named by the SKU column")
  3. Claude Code writes the script: usually working on the first or second attempt
  4. You run it: the script calls your API, generates your images, saves them where you said
  5. Iterate: tell Claude Code what to change ("also add a watermark", "compress outputs under 500KB")

The ROI is on repetitive, programmable image work: not on creative one-off generation where a human prompting Midjourney interactively is still faster.


If you just want to generate images without code

If you want to generate images without writing any code, Claude Code is not the right tool. Use:

Claude Code is a developer tool. It's best used by people who are comfortable running code in a terminal, or by agencies that have someone on the team who is.


Summary

Task Can Claude Code do it?
Analyze/understand an image ✓ Yes, natively
Generate an image directly ✗ No
Write code to call DALL-E 3 ✓ Yes
Write code to call Flux/Stable Diffusion ✓ Yes
Batch resize/process images ✓ Yes
Build an image generation pipeline ✓ Yes
Edit images manually (like Photoshop) ✗ No

The bottom line: Claude Code is a force multiplier for developers and technically-capable non-developers. If image generation is part of your workflow and you want to automate or scale it, Claude Code is excellent. If you want to generate one image by describing it in plain language, use ChatGPT or Midjourney directly.

Client delivery, built for freelancers.

Permanent portals. Client approval. No expiring links. $12/month.

Try 8fs free →