Claude Code & coding agents

Free high-quality images in Claude Code: the best model and the setup (November 2026)

Claude cannot make images, but it can look at them. With a free open model on your own graphics card and a skill, Claude Code makes photos and rejects bad ones. Measured on 8 GB: FLUX.3 Image Klein and Z-Image-Turbo, free APIs checked.

Erik van de Blaak
Erik van de Blaak
17 min read • 85 views
Free high-quality images in Claude Code: the best model and the setup (November 2026)

Claude cannot make images. The Anthropic documentation says so in as many words: Claude understands images, but cannot generate or edit them. Even so, this week Claude Code made a cover photo of a hair salon on my laptop, with the salon's name spelled correctly on the mirror. It rejected its own first version, because the text was on the wall instead of on the mirror. The image itself cost nothing: no API key and no subscription to an image service.

The drawing was done by a free open model on the laptop's graphics card. Claude Code wrote the prompt, started the model, looked at the result and decided whether it was good enough. This article shows how to set that up, which free options exist in November 2026 and which model is best. Everything was measured or checked on 5 November 2026, on a laptop with an RTX 4070 with 8 GB of video memory.

Short answer. The best free route is an open image model running locally, driven by Claude Code through a skill. Use FLUX.3 Image Klein if your images are not for commercial use, or if your company stays under 5 million dollars in revenue. Of the open models I ran on 8 GB, it scores highest: 1043 on the Artificial Analysis leaderboard. Use Z-Image-Turbo (Apache 2.0) if you want commercial use without conditions. Run them with stable-diffusion.cpp in a quantized version: on 8 GB, a 1024 × 1024 image then takes 22 to 28 seconds. Of the APIs I checked, only Cloudflare still gives a free daily allowance for images.

Can Claude Code make images itself?

No. Claude Code can look at images, though, and that is half the job. According to the Claude Code tools reference, the Read tool returns PNG, JPEG, GIF and WebP files as images Claude can see, not as bytes. Large images are scaled down first.

That lets Claude Code act as an art director. It turns your request into a detailed English prompt, has an image model draw it, opens the result and checks whether the text is right, whether the number of fingers is right and whether everything you asked for is there. The drawing itself is done by another model.

For diagrams, charts and tables you don't need an image model. Claude Code writes HTML or SVG, and a headless browser takes a screenshot. That is how every chart on this site is made, including the table further down. It is free, and the numbers are always right because they come from your data. A diffusion model makes a chart up. This article is about the other kind of image: photos and illustrations.

Which free options are there in November 2026?

I checked the well-known free routes at the source. Less is left than you might think.

  • Google Gemini API: no free tier for image models. On the pricing page, the Free Tier column says "Not available" for every image model. Gemini 2.5 Flash Image costs $0.039 per image, Nano Banana 2.1 $0.0336 per 1K image. Any MCP server for Gemini images therefore needs a paid key.
  • Hugging Face Inference Providers: free accounts no longer get monthly credits. According to the pricing documentation, PRO gets $2 a month, and free users have to buy credits.
  • Pollinations: the new endpoint gen.pollinations.ai returned a 401 in my test, saying an API key is required. The old endpoint image.pollinations.ai still answered without a key, but returned 768 × 768 instead of the requested 1024 × 1024. The model used was Sana, and the image had a watermark, despite the nologo=true parameter. You can see the result in the comparison below.
  • Cloudflare Workers AI: the only large provider with a free daily allowance. According to the pricing page (updated 20 October 2026), that is 10,000 neurons a day, reset at 00:00 UTC. Prices are per 512 × 512 tile and per step, not per image. My own calculation: FLUX.1 [schnell] at 1024 × 1024 with four steps costs about 58 neurons, so roughly 170 images a day. FLUX.2 [klein] 4B costs about 104 neurons, roughly 96 a day. FLUX.2 [klein] 9B costs 1,364 neurons per image, so 7 a day. I did not test those numbers. There is also a catch: schnell and klein 4B rank 104th and 96th on the leaderboard.

That leaves running locally as the route without limits. You pay for the electricity and you need a graphics card, but no prompt goes to a server and there is no daily allowance.

Which image model is best, and which is free?

Artificial Analysis keeps a leaderboard (AA-Image-T2I v2.1). Evaluators see two images from the same prompt and pick the better one, without knowing which model made which. On 5 November 2026 the top was all closed, paid models: GPT Image 2.5 Sunburst with 1225 points, then GPT Image 2.5 Flare (1208), GPT Image 2 (1188) and Nano Banana 2.1 (1175).

The best open models score about 130 to 180 points lower:

  • Qwen-Image-2.1: 1044 points, but under a research license that rules out commercial use. The model uses Qwen3-VL-8B as its text encoder. I did not test it on 8 GB.
  • FLUX.3 Image Klein from Black Forest Labs: 1043 points. The model has 5.6 billion parameters and has been on Hugging Face since October 2026.
  • Ideogram 4: 1026 points, also non-commercial only.
  • Z-Image-Turbo from Alibaba's Tongyi lab: 935 points. It is older (November 2025), but it is Apache 2.0, and according to its model card it can render text in the image, in English and Chinese.

The gap between 1043 and 935 is large. In my own tests it was smaller than that number suggests: I would take the images from either model for photos without being told. FLUX.3 Image Klein did follow the prompt more closely. If the license allows it, that is the model I pick. I pick Z-Image-Turbo when the image is for commercial use by a company above the revenue threshold, or when I don't want to have to read a license.

What I measured on a laptop with 8 GB

The test machine is a laptop with an RTX 4070 Laptop (8 GB of video memory), an i9-13980HX, 16 GB of RAM and Windows 11. As the engine I used stable-diffusion.cpp, release master-1050 of 4 November 2026. It is a C++ program under the MIT license that runs image models in the GGUF format, the way llama.cpp does for language models. You don't need to install Python or run a server. It is one program with a handful of DLLs.

According to its model card, FLUX.3 Image Klein needs 25 to 31 GB of video memory at full precision. Z-Image-Turbo "fits comfortably" in 16 GB, according to its model card. On 8 GB you have to quantize: store the weights in fewer bits. I measured how many bits you can keep.

Table of measurements on an RTX 4070 Laptop with 8 GB, three runs of 1024 by 1024 per variant. Z-Image-Turbo Q8_0, file 6.6 GB: 29 to 63 seconds, median 48, video memory 7.3 to 7.5 GB. Z-Image-Turbo Q4_K, 3.9 GB: 21 to 24 seconds, median 22, 6.2 to 6.5 GB. FLUX.3 Image Klein Q8_0, 6.2 GB: does not fit, out of memory. FLUX.3 Image Klein Q5_K, 4.2 GB: 27 to 29 seconds, median 28, 5.2 to 6.1 GB. Licenses: Apache 2.0 for Z-Image, FLUX Kommunity for FLUX.3. Artificial Analysis scores: 935 and 1043.
Measured on 5 November 2026. The time is for the whole command, including loading the models. Video memory is the peak, including about 0.6 GB for the Windows desktop.

Three results stood out:

  • FLUX.3 Image Klein in Q8_0 does not fit. The model itself is 6.2 GB, but computing needs another 1.8 GB. stable-diffusion.cpp stopped with a message that it could not free enough memory. In Q5_K (4.2 GB) it works, at a steady 27 to 29 seconds per image.
  • Z-Image-Turbo in Q8_0 works, but fluctuates. The same image three times took 29, 63 and 48 seconds. Video memory sat at 7.5 of 8.2 GB. In Q4_K the same image took 21 to 24 seconds all three times. I could not see a quality difference between Q8_0 and Q4_K in this fox. On 8 GB, Q4_K is the better choice.
  • The first run after downloading is slower. My very first image took 78 seconds, because the models still had to come from disk. After that they were in the Windows cache.
Three images side by side from the same prompt: a fox in the snow at dawn. Left, Pollinations without a key: 768 by 768 instead of 1024, Sana model, a somewhat doll-like fox with a watermark bottom right. Middle, Z-Image-Turbo Q4_K: a sharp, natural fox in front of a snowy pine forest, 22 seconds. Right, FLUX.3 Image Klein Q5_K: a fox backlit at dawn with frost on its whiskers, 28 seconds.
Same prompt, same seed. FLUX.3 Image Klein follows the prompt best: side light at dawn and frost on the whiskers.

Can open models put text in an image?

Yes, and until recently that was the weak spot of free models. I asked for a market sign reading "VERSE STROOPWAFELS" (fresh stroopwafels) with "per stuk 1,50" (1.50 each) underneath. Each model got two seeds. All four images spelled the Dutch text correctly. One Z-Image image had a stray dot after the price. FLUX.3 Image Klein took 22 seconds at 1280 × 720. Z-Image was still running the slow Q8_0 version in this test and needed 41 to 53 seconds.

Four photos of a green market sign at a wet Dutch street market reading VERSE STROOPWAFELS and per stuk 1,50. Top, two images from Z-Image-Turbo; bottom, two from FLUX.3 Image Klein. All four spelled correctly; one Z-Image image has a stray dot after 1,50.
Text in the image: four out of four spelled correctly. Put the text in single quotes in the prompt.

How to set it up, step by step

1. Download stable-diffusion.cpp

The releases page has ready-made builds. For an NVIDIA card on Windows you need two zips: sd-master-…-bin-win-cuda12-x64.zip (345 MB) and cudart-sd-bin-win-cu12-x64.zip (537 MB, the CUDA libraries). Unpack both into the same folder, for example C:\ai\sd. There is a Vulkan build for AMD and Intel, and a build for Apple Silicon Macs.

2. Download the models

Put them in a models subfolder. These are the files I used, about 17 GB in total:

The official FLUX.3 Image Klein repository asks you to log in and accept the license. I could download the GGUF version and the Comfy-Org VAE without an account. Read the license anyway: it applies to the model, not to where you got it.

3. Test it by hand

sd-cli --diffusion-model models/z_image_turbo-Q4_K.gguf \
  --llm models/Qwen3-4B-Instruct-2507-Q8_0.gguf --vae models/z_ae.safetensors \
  --steps 8 --cfg-scale 1.0 --offload-to-cpu --flash-attn on \
  -W 1024 -H 1024 -s 7 -p "A red fox sitting in fresh snow at dawn" -o fox.png

With --offload-to-cpu the weights stay in RAM and only move to the graphics card when needed. Without that flag it was not clearly faster in my test: sometimes one variant won, sometimes the other. Z-Image-Turbo is distilled to 8 steps and works without guidance, hence --cfg-scale 1.0. For FLUX.3 Image Klein use 16 steps and --sampling-method euler.

4. Give Claude Code a skill

A skill is a folder with a SKILL.md in .claude/skills/. Claude Code loads it when your request matches its description, or when you type /image (see the skills documentation). I described how skills and plugins work in general in Claude plugins and Superpowers. The script does the technical work, and the skill tells Claude how to check.

.claude/skills/image/make.sh

#!/usr/bin/env bash
# Usage: make.sh <z|flux3> <width> <height> <seed> <output.png> "<prompt>"
# SD_HOME points to the folder with sd-cli and a models/ subfolder.
set -euo pipefail
model=$1; w=$2; h=$3; seed=$4; out=$5; prompt=$6
m="$SD_HOME/models"
case "$model" in
  z)     args=(--diffusion-model "$m/z_image_turbo-Q4_K.gguf"
               --llm "$m/Qwen3-4B-Instruct-2507-Q8_0.gguf"
               --vae "$m/z_ae.safetensors" --steps 8) ;;
  flux3) args=(--diffusion-model "$m/flux3-image-klein-Q5_K.gguf"
               --llm "$m/Qwen3VL-4B-Instruct-Q8_0.gguf"
               --vae "$m/flux2-vae.safetensors" --steps 16 --sampling-method euler) ;;
  *) echo "unknown model: $model" >&2; exit 2 ;;
esac
mkdir -p "$(dirname "$out")"
"$SD_HOME/sd-cli" "${args[@]}" --cfg-scale 1.0 --offload-to-cpu --flash-attn on \
  -W "$w" -H "$h" -s "$seed" -p "$prompt" -o "$out" > "$out.log" 2>&1 \
  || { tail -5 "$out.log" >&2; exit 1; }
grep -oE 'generate_image completed in [0-9.]+s' "$out.log"
echo "done: $out"

.claude/skills/image/SKILL.md

---
name: image
description: Creates a photo or illustration locally on the GPU with Z-Image-Turbo or FLUX.3 Klein. Use this when asked for an image, photo, cover or illustration.
allowed-tools: Bash(bash ${CLAUDE_SKILL_DIR}/make.sh *) Read
---

1. Write an English prompt of 50 to 90 words: subject, action, setting, light, camera or drawing style, colours. Put any text that must appear in the image between single quotes.
2. Choose the model: `z` (Apache 2.0, commercial use too) or `flux3` (FLUX Kommunity License). Default `z`.
3. Run `bash ${CLAUDE_SKILL_DIR}/make.sh <model> <width> <height> <seed> images/<name>.png "<prompt>"`. Width and height are multiples of 16, default 1280 x 720. Pick a seed yourself.
4. Open the result with Read and check: is everything from the request in it, are hands, eyes and counts right, is text in the image spelled exactly right?
5. If something is wrong, adjust the prompt or take another seed. At most three attempts per image.
6. Report the file, model, seed and final prompt for each image.

Set SD_HOME to the folder with sd-cli and models/, for example in your shell profile: export SD_HOME=/c/ai/sd. The allowed-tools field gives Claude permission for exactly that script and for Read, for the rest of the turn in which the skill runs. Steps 4 and 5 in the skill matter most: they tell Claude to look and allow it to reject.

Why a skill and not an MCP server? An MCP server is a separate process with its own protocol. For one command that writes a file, that is more than you need. The best-known MCP server for image generation I found, nanobanana-mcp-server, also talks to the Gemini API, which is not free for images. If you want more control than a script gives, with LoRAs, inpainting or a node editor, use ComfyUI (v0.44.0 of 4 November 2026). ComfyUI has an HTTP API that Claude Code can call. I did not work that out for this article.

What happened when Claude Code did it itself

I gave Claude Code (version 2.1.318, model Opus 5.5) three requests in Dutch, in headless mode with claude -p. That let me take turns, time and cost from the JSON output.

Run 1 failed on permissions. Without permissions, Claude Code refused to start the skill. In headless mode there is nobody to ask. Claude then returned a usable prompt and explained what went wrong, but made no image. With --allowedTools "Skill(beeld)" "Bash(bash *maak.sh *)" "Read" it worked. In a normal interactive session you click allow once.

Run 2: the hair salon. The request was a cover image of a hairdresser checking the schedule on a tablet, with "Kapsalon De Schaar" in white letters on the mirror. Claude wrote an English prompt of about 80 words. Its first command also contained mkdir -p beelden, and the permission did not cover that. Claude removed the mkdir and tried again. That is why the script creates the folder itself. The first image took 114 seconds, because the model was not yet in the cache. Claude opened it and rejected it: the text was on the wall next to the mirror. The second image took 47 seconds and was approved. Claude added that the figure in the mirror is not a real reflection of the hairdresser. That is correct. Total: 8 turns, 201 seconds.

Run 3: a bicycle in front of a canal house, with a sign reading "Kantoor 2B" (Office 2B) by the door. According to Claude, the first attempt had no sign and the bag was on the front. The second image was spelled correctly and the bag was on the back. Without being asked, Claude added that the canal itself is not in the picture. That is correct too. Total: 7 turns, 75 seconds, no refused actions.

Two images Claude Code made with the skill. Left, a hairdresser with a tablet in a bright salon, with Kapsalon De Schaar on the mirror. Right, a drawn black bicycle with a bag on the back in front of a brick canal house in the rain, with a white sign reading Kantoor 2B. For both, the figure notes that Claude rejected the first attempt and reported a shortcoming itself.
Both times Claude rejected its first attempt. The first images were overwritten, so I only know what was on them from Claude's description.

The image models cost nothing. Claude Code does use tokens: the JSON output gave $0.14 and $0.27 at API list prices. With a Claude subscription that falls within your normal usage. One thing stood out: Claude picked the same seeds in both runs, first 4217 and then 7731. "Pick a seed yourself" does not give truly random numbers from a language model. If you want genuinely different images, name a seed yourself or ask for several variants.

Where this setup can go wrong: Claude sees a scaled-down version of the image. It can miss a sixth finger on a small hand in a corner. For important images, ask it to crop the edges or the hands and look at them separately. The tools reference recommends exactly that.

Licenses: what may you do with the images?

Free to download does not mean everything is allowed. I quote the model cards. If in doubt, read the license text yourself.

  • Z-Image-Turbo: Apache 2.0. Commercial use is allowed, including of the model itself.
  • FLUX.3 Image Klein: FLUX Kommunity License v1.0. Non-commercial use is allowed. According to the model card, users with less than 5 million dollars in annual revenue (including affiliates) may also use the images commercially. Fine-tuning for commercial purposes and distributing the model are not covered.
  • Qwen-Image-2.1 and Ideogram 4: non-commercial only, according to their licenses on Hugging Face.

What is in the prompt stays local. That is a practical advantage over any API: an image of a product that has not been announced yet never leaves your laptop.

Frequently asked questions

Do I need an expensive graphics card?

You need an NVIDIA card with at least 6 to 8 GB for the times in this article. According to the stable-diffusion.cpp documentation, Z-Image also runs on 4 GB or less, in a smaller quantization and more slowly. It also works on just a CPU, but then you count in minutes per image. I did not measure that.

Is it really free?

The models and stable-diffusion.cpp cost nothing and have no limit. Claude Code itself needs a subscription or API credit. Beyond that you pay for electricity. You don't need a daily allowance or a credit card at an image service.

Why not just use Nano Banana or GPT Image?

They score higher: 1175 and 1188, against 1043 for the best open model on 8 GB. If you need that difference, you pay about 3 to 13 cents per image at Google. For blog images, mock-ups and placeholders I saw no reason to pay in my tests.

Does this work on a Mac?

stable-diffusion.cpp has a build for Apple Silicon with Metal. The script works there unchanged, because it calls sd-cli without .exe. I only tested on Windows.

Can Claude Code edit existing photos?

FLUX.3 Image Klein can edit images with up to ten reference images through stable-diffusion.cpp's -r option. I did not test that for this article.

Further reading on this site

Sources and further reading

Official documentation

Independent leaderboard

  • Artificial Analysis, Text to Image Leaderboard, AA-Image-T2I v2.1, seen on 5 November 2026. Method according to the page: blind pairwise votes from "validated private evaluators", Elo scores with FLUX.2 [dev] fixed at 1000, a 95% interval per model (for example 1225 ±10 for the number one). The leaderboard shows no date. The scores apply to the full models, not to the quantized versions I ran.

Own measurements and practice

  • Own test, 5 November 2026: RTX 4070 Laptop (8 GB), i9-13980HX, 16 GB RAM, Windows 11, NVIDIA driver 621.01, stable-diffusion.cpp master-1050 (58bb3c1, CUDA 12 build). Three runs of 1024 × 1024 with seed 7 per variant, time and peak memory via nvidia-smi. Also Claude Code 2.1.318 with Opus 5.5 in three headless runs, and one request each to image.pollinations.ai and gen.pollinations.ai.
  • Community source, not used as evidence: nanobanana-mcp-server, an MCP server for Gemini images (requires a Gemini API key)

Share this article

Erik van de Blaak

Written by

Erik van de Blaak

AI Solutions Engineer & Full-Stack Developer

Erik van de Blaak is an AI Solutions Engineer and full-stack developer at CareerValue BV. Here he writes about AI coding tools and agents, such as Claude Code.

Comments (0)

Comment on this article

Never published

I read every comment before it goes online.

No comments on this article yet.