# Claude Code image generation for an AI persona: one skill

Claude Code image generation for an AI persona: Claude makes no images, so one skill drives an image model with your references, a price check and your rules.

- Canonical: https://aiofmcity.com/blog/claude-code-image-generation
- Topic: Operations (https://aiofmcity.com/topics/operations)
- Author: Gus
- Published: 2026-10-28

---
## Key points

- Claude cannot create images. Claude Code generates them by calling an image model through an MCP server, a skill or a script.
- A persona skill is a folder with your fixed features, your reference images and the steps the agent follows, and the same folder works in Codex.
- Every reference image can add to the price, so the price check has to include all of them before the agent starts a batch.
- The agent cannot tell whether a reference shows a real person, so that check, the age check and the final selection stay with you.
- WaveSpeed deletes uploaded files and generated images after about 7 days, so the skill saves every output at once.

---
Claude Code image generation works through an image model, not through Claude. You connect a model host such as WaveSpeed as an MCP server, then write one skill for your persona. The skill holds her fixed features, her reference images, the model settings, a price check and your rules. The agent follows it every time.

## What you need before you start

You do not write any code for this setup. You type a few commands and copy two text files. You need:

**Ready to generate persona images from Claude Code?**

- [ ] Claude Code installed, or the Codex CLI. — You open it in one project folder. The skill and the finished images live there.
- [ ] Node.js installed. — The WaveSpeed MCP server and the WaveSpeed CLI both run with it (npx and npm).
- [ ] A WaveSpeed account with a small prepaid balance. — A 20-image batch with five references costs about $1.14 at 1k. Leave automatic top-up off.
- [ ] Five reference images of your persona. — Your own generated images: front, both three-quarter views, profile, full body. Never a real person.
- [ ] A short text with her fixed features. — Face shape, eyes, hair, skin. You paste it into character.md below.

## Can Claude Code generate images?

No, not on its own. Claude reads images but does not make them, so Claude Code needs a tool that calls an image model.

> "Can Claude generate or edit images? No, Claude is an image understanding model only. It can interpret and analyze images, but it cannot generate, produce, edit, manipulate, or create images."
>
> — Source: Claude Docs — Vision, read 2026-10-05 — https://platform.claude.com/docs/en/build-with-claude/vision

Codex is different. It has an image skill built in:

> In Codex CLI, "include $imagegen to invoke the image generation skill explicitly." "Built-in image generation uses gpt-image-2 and counts toward your general Codex usage limits. Image generations use included limits 3–5x faster on average than similar turns without image generation". "For larger batches, set OPENAI_API_KEY in your environment and ask ChatGPT to generate images through the API so API pricing applies."
>
> — Source: ChatGPT Learn — Image generation (Codex), read 2026-10-05 — https://learn.chatgpt.com/docs/image-generation

So with Codex you can start without any setup, on OpenAI's model. With Claude Code you choose the model, which also means you can use one that keeps your persona's face best. [ChatGPT AI influencer photos](https://aiofmcity.com/blog/chatgpt-ai-influencer-images) covers OpenAI's image model with reference images in detail.

Claude Code can also write code that draws a graphic, such as an SVG quote card or an HTML carousel slide. That works for text posts and simple designs. It cannot make a photo of your persona, so for her you need an image model.

## Three ways to connect an image model to Claude Code

The quickest way is an MCP server, a small program that gives the agent new tools. WaveSpeed publishes one, plus a skill and a plugin. This guide uses WaveSpeed. [WaveSpeed vs fal vs Replicate](https://aiofmcity.com/blog/wavespeed-vs-fal-vs-replicate) compares it with the other two big hosts.

> Published 19 August 2026. Skill: `wavespeed skill install`, which "writes .claude/skills/wavespeed/SKILL.md". Plugin: `/plugin marketplace add WaveSpeedAI/claude-plugins` and `/plugin install wavespeed@wavespeed`. MCP: `claude mcp add wavespeed -- npx -y @wavespeed/mcp`. "wavespeed login stores the key on your machine".
>
> — Source: WaveSpeedAI Blog — Use WaveSpeed in Claude Code, read 2026-10-05 — https://wavespeed.ai/blog/ai-workflows/use-wavespeed-in-claude-code/

> Tools: `list_models`, `get_model_schema`, `run_model`, `get_price`, `get_balance`, `upload_file`, `get_prediction`. `get_price` gives a "Cost estimate with unpriced_inputs / at_base_price disclosure". "Auth resolves from WAVESPEED_API_KEY, or from the CLI's stored login (wavespeed login) — one login covers both tools."
>
> — Source: WaveSpeedAI on GitHub — mcp-server, read 2026-10-05 — https://github.com/WaveSpeedAI/mcp-server

| Way | Set it up with | Good for | Watch out for |
| --- | --- | --- | --- |
| WaveSpeed MCP server | `claude mcp add wavespeed -- npx -y @wavespeed/mcp` | Asking for images in plain words, with a price tool built in | The agent can run any model in the catalogue unless your skill limits it |
| WaveSpeed skill or plugin | `wavespeed skill install` or the plugin marketplace | Agents that run shell commands, no MCP needed | Needs the CLI installed and logged in |
| Your own script | A short Python file plus a skill | Fixed batches with a hard spending cap | You maintain the code |

For a persona, use the MCP server and add your own skill on top. The MCP server gives the agent the tools. Your skill tells it which model, which references and which rules. Before you connect any server, Anthropic's advice applies:

> "Verify you trust each server before connecting it. Servers that fetch external content can expose you to prompt injection risk."
>
> — Source: Claude Code Docs — Connect Claude Code to tools via MCP, read 2026-10-05 — https://code.claude.com/docs/en/mcp

The setup in your terminal, in this order:

```bash
npm install -g @wavespeed/cli                      # the WaveSpeed command line tool
wavespeed login                                    # opens the browser, stores your key on this computer
claude mcp add wavespeed -- npx -y @wavespeed/mcp  # gives Claude Code the WaveSpeed tools
claude mcp get wavespeed                           # should say the server is connected
```

The MCP server uses the key that `wavespeed login` stored, so the key never appears in the chat or in a file the agent edits. Everything after `--` is the command that starts the server, which Claude Code passes on unchanged.

For video batches, the third way fits better. [Seedance with Claude Code or Codex](https://aiofmcity.com/blog/seedance-claude-code) shows a script that quotes every clip and stops at a spending cap.

## How to build an AI persona skill for Claude Code

A persona skill is a folder that holds everything the agent must not guess. Claude Code loads it from `.claude/skills/`.

> Project skills live in `.claude/skills/<skill-name>/SKILL.md`. "Skills can include multiple files in their directory." `description`: "What the skill does and when to use it. Claude uses this to decide when to apply the skill."
>
> — Source: Claude Code Docs — Extend Claude with skills, read 2026-10-05 — https://code.claude.com/docs/en/skills

The folder:

```text
.claude/skills/persona-mara/
  SKILL.md          the steps and the rules
  character.md      her fixed features, pasted in front of every prompt
  references/
    01-front.jpg
    02-three-quarter-left.jpg
    03-three-quarter-right.jpg
    04-profile.jpg
    05-full-body.jpg
```

The references are your own generated images of your persona, never photos of a real person. The [character consistency guide](https://aiofmcity.com/guides/character-consistency) explains how to build a reference set that holds a face.

`character.md` is short and never changes:

```text
Images 1 to 5 show the same woman, Mara, in her late twenties. She is fictional.
Use them only for her identity.
Keep exactly: oval face, green-grey eyes, light freckles across the nose,
shoulder-length dark brown hair with a middle parting, natural skin texture.
Do not beautify, slim, smooth or age her. Do not change her proportions.
```

And `SKILL.md`:

```markdown
---
name: persona-mara
description: Generates new photos of Mara, our fictional AI persona, from her fixed reference set through the WaveSpeed MCP server. Use when the user asks for new Mara images, outfits or scenes. Never use for anyone else.
---

# Mara: new images

## Model
- Model: bytedance/seedream-v5.0-pro/edit, resolution 1k.
- Check the inputs with get_model_schema before the first run of a session.

## Steps
1. Upload the five files in references/ (in this skill's folder) with upload_file.
   Reuse the URLs for the whole session.
2. For each image the user wants, write the prompt as: the text of character.md,
   then one scene. One scene per image.
3. Call get_price with the full input of one image, including all five reference
   URLs. If the answer lists unpriced_inputs, say so.
4. Tell the user: number of images x price = total. Wait for an explicit "yes".
   Never more than 20 images per request.
5. Run each image with run_model. If it returns only a prediction id, check it
   with get_prediction until the status is completed.
6. Download every output URL at once with curl into outputs/YYYY-MM-DD/.
   Do not convert, resize or compress the file. Next to it, write a .json file
   with the prompt, the model and the prediction id.
7. Show the user the images. Do not choose, caption, post or delete any of them.

## Hard rules
- Mara is an adult and fictional. Strictly safe for work: no nudity, no lingerie,
  no suggestive poses.
- Use only the files in references/. Never add a photo of a real person,
  a celebrity look-alike or "in the style of" a real person.
- Never print or paste an API key.
- If a request breaks a rule, stop and name the rule.
```

You start it with `/persona-mara`, or you ask for "three new photos of Mara in a café" and Claude picks the skill from its description. One skill per persona keeps two personas from mixing.

This is what happens when you ask for images, and who does each step:

_Diagram: The agent does the file work between your two decisions: the price before the batch, and the choice after it._

1. **You:** Ask for scenes — For example: three photos of Mara in a café
2. **Agent:** Load the skill and upload the five references — upload_file, once per session
3. **Agent:** Quote one complete image and multiply — get_price with all five reference URLs
4. **You (checkpoint):** Approve the total — No image is made without your yes
5. **WaveSpeed:** Generate each image — run_model, then get_prediction until completed
6. **Agent:** Download every file unchanged — outputs/date/, with a JSON file of prompt, model and ID
7. **You (checkpoint):** Check the face, the age impression and pick — Compare each image with reference 1
8. **You:** Label as AI and post — The way each platform asks

## What an image costs, and why the first quote can be too low

On WaveSpeed, Seedream v5.0 Pro Edit costs a few cents per image, and every extra reference image adds to that. Ask for the price with all references, or the quote is incomplete.

> "Pricing includes the selected output resolution plus reference image input cost. The first input image is included; each additional input image costs $0.003." Base price: 1k $0.045, 1.5k $0.045, 2k $0.090. `images`: "Supports up to 10 images." The price box on the same page shows $0.0405 per run.
>
> — Source: WaveSpeedAI — Seedream v5.0 Pro Edit, read 2026-10-05 — https://wavespeed.ai/models/bytedance/seedream-v5.0-pro/edit

> "ask for a price without them and the formula collapses to the model's base price, which is the floor of its range, not a typical run." The command "names the inputs it was blind to (unpriced_inputs / at_base_price in --json)". "Whatever it says, the amount actually charged for a run is authoritative."
>
> — Source: WaveSpeedAI on GitHub — wavespeed-cli, read 2026-10-05 — https://github.com/WaveSpeedAI/wavespeed-cli

What a persona image costs from that price table, before any discount:

| Reference images | 1k | 2k |
| --- | --- | --- |
| 1 | $0.045 | $0.090 |
| 5 (the set above) | $0.057 | $0.102 |
| 10 (the maximum) | $0.072 | $0.117 |
| A batch of 20 images with 5 references | $1.14 | $2.04 |

The page shows two figures: $0.045 in the price table and $0.0405 in the price box. The page does not explain the difference, so plan with the higher one. GPT Image 2.5 Edit charges much more per extra reference, as [ChatGPT AI influencer photos](https://aiofmcity.com/blog/chatgpt-ai-influencer-images#what-chatgpt-and-the-gpt-image-api-cost-per-image) shows. [The model price list](https://aiofmcity.com/model-prices) has the other image models with their dates.

Two rules for the skill follow from this. The agent must quote one complete image, references included, and multiply. And it must wait for your yes, because WaveSpeed has no setting that stops spending at a limit you choose.

## The same persona skill in Codex

Copy or link the folder to `.agents/skills/persona-mara/`, connect the same MCP server, and start it with `$persona-mara`.

> "For repositories, Codex scans .agents/skills in every directory from your current working directory up to the repository root." The SKILL.md "must include name and description". "In Codex CLI or the IDE extension, run /skills or type $ to mention a skill." "Codex supports symlinked skill folders".
>
> — Source: ChatGPT Learn — Build skills (Codex), read 2026-10-05 — https://learn.chatgpt.com/docs/build-skills

> Add a server with `codex mcp add <server-name> --env VAR1=VALUE1 -- <stdio server-command>`. For more control, edit `~/.codex/config.toml` or a project `.codex/config.toml`, with one `[mcp_servers.<server-name>]` table per server. `env_vars` lists "Environment variables to allow and forward."
>
> — Source: ChatGPT Learn — MCP (Codex), read 2026-10-05 — https://learn.chatgpt.com/docs/extend/mcp?surface=cli

So in Codex you run `codex mcp add wavespeed -- npx -y @wavespeed/mcp`. Leave out `--env` with the key: the server can use your `wavespeed login`, and a key typed on the command line also lands in your shell history. The skill text works unchanged, because it names the MCP tools and not a Claude feature.

Which one to use for persona images:

| | Claude Code with your skill | Codex with $imagegen |
| --- | --- | --- |
| Image model | Your choice on WaveSpeed | gpt-image-2 |
| Paid by | WaveSpeed credit, per image | Codex usage limits, or the API with OPENAI_API_KEY |
| Reference images | Up to the model's limit, 10 for Seedream v5.0 Pro Edit | Attached with `-i` or `--image` |
| Price check before a batch | `get_price` in the skill | No price per image: it uses up your Codex limits |

You can also give Codex the persona skill and still use `$imagegen` for quick drafts. Keep the final images on one model, so the face stays the same across the feed.

## What the agent must never decide for you

The agent generates and saves. You decide what is real enough, adult enough and good enough to post. Neither Claude nor the image host checks your references for you.

### What the sources do not say: Finding a documented way for a coding agent to check that a reference image shows no real person

We looked for any documented way that Claude Code, Codex or WaveSpeed checks that a reference image does not show a real person. We found none.

Anthropic's vision page says Claude "cannot be used to name people in images" and "cannot determine whether an image is AI-generated". OpenAI's image generation page for Codex asks you to "confirm that you have permission to use their likeness" when you show a real person, which puts the check on you. The WaveSpeed MCP server's README describes uploads, prices and runs, and no identity check. The Seedream v5.0 Pro Edit page has an "Enable Safety Checker" switch but does not say what it checks.

You can check this yourself. Open those four pages and search for "person", "face", "identity" and "safety". So the skill can only refuse files outside your references folder. Whether those files are clean is your decision.

Three checks stay with you, every time:

1. **The references.** Only images you generated of your persona go into `references/`. Never a scraped photo, a model from Instagram or a friend.
2. **The age impression.** Every image must look clearly adult. The [AI influencer workflow guide](https://aiofmcity.com/guides/running-an-ai-persona-operation#what-you-can-automate-and-what-you-cannot) explains why this check is never automated.
3. **The selection.** Pick the images that look like her next to reference 1. The workflow guide tells what happened when a script did the picking: [automating the selection step](https://aiofmcity.com/guides/running-an-ai-persona-operation#failed-automating-the-selection-step-to).

## Where the images go: download, keep the metadata, label

Save every image as soon as it is done, unchanged. WaveSpeed keeps neither your uploads nor your results for long.

> "Uploaded files are stored for 7 days and then automatically deleted. The service is only for WaveSpeedAI inference inputs, not general-purpose storage".
>
> — Source: WaveSpeedAI docs — How to Upload Files, read 2026-10-05 — https://wavespeed.ai/docs/upload-files

> "Generated media files are temporary and generally expire within 7 days."
>
> — Source: WaveSpeedAI docs — Data Retention Policy, read 2026-10-05 — https://wavespeed.ai/docs/data-retention-policy

That is why step 6 of the skill saves each file at once and writes the prompt next to it. Your own folder is the archive, not WaveSpeed. Do not let the agent "optimise" the files: converting can remove the AI metadata platforms read. [Do not strip your watermarks](https://aiofmcity.com/blog/dont-strip-your-watermarks-provenance) shows a one-command check. When you post, label the images as AI the way each platform asks, as shown in the [AI label matrix](https://aiofmcity.com/ai-label-matrix).

Start with three images. Write `character.md`, put your five references in the folder, connect the MCP server, and ask for three scenes. If the face matches reference 1 in all three, raise the batch size. If it does not, fix the references first, not the prompt.

## Frequently asked

### Can Claude Code generate images?

Not by itself. Anthropic says Claude is an image understanding model only and cannot create images. Claude Code makes images by calling an image model, usually through an MCP server such as WaveSpeed's, a skill that runs a command line tool, or your own script.

### How do I connect WaveSpeed to Claude Code?

WaveSpeed documents three ways: a skill written by wavespeed skill install, a plugin from the WaveSpeedAI/claude-plugins marketplace, or the MCP server added with claude mcp add wavespeed -- npx -y @wavespeed/mcp. The MCP server reads your key from WAVESPEED_API_KEY or from wavespeed login.

### Does Codex have its own image generation?

Yes. Codex has a built-in image generation skill you call with $imagegen. It uses gpt-image-2 and counts towards your Codex usage limits. For larger batches, OpenAI suggests setting OPENAI_API_KEY so that API pricing applies.

### What should a persona skill contain?

The fixed features of your persona, a fixed set of reference images, the model and settings, the steps the agent follows including a price check and your approval, and the hard rules: adult, fictional, strictly safe for work, no real people. The final choice of images stays with you.

