# Consistent Characters via API: From Character Sheet to Reference Video

> Keep the same face across images and video: a base portrait, a character sheet, reference-based scenes and a reference-to-video clip, each priced with a quote before it runs.

Canonical: https://raywake.si/blog/consistent-character-api-guide
Last updated: 2026-12-01

Published: 2026-12-01 · Raywake

Keeping the same face across a series of images and videos is one of the most common problems in AI generation. No single model call solves it. A pipeline does: lock the look once, turn it into reference images, and feed those references into every image and video step.

This guide builds that pipeline with the Raywake API, which gives you 500+ image, video and audio models on one US dollar balance: a base portrait, a character sheet, new scenes from the sheet, and a reference-to-video clip. Every step is quoted first and runs only after you approve the price.

## The idea: references, not adjectives

Text alone drifts. "Short black hair, small scar" means something slightly different to a model on every call. Images drift much less. So the pipeline turns words into pictures as early as possible, then keeps passing those pictures forward:

1. **Base portrait.** One clear image of the character, generated or your own (with the person's consent).
2. **Character sheet.** Front, three-quarter, profile and back views plus a few expressions, made from the portrait.
3. **Scenes.** New images that take the sheet and the portrait as references.
4. **Video.** A reference-to-video model that takes the sheet and a scene still.

Keep one fixed **identity block** of text and paste it, unchanged, into every prompt. References carry the face; the identity block reminds the model which details matter.

## Step 1: base portrait

```raywake-component
{"type": "model-card", "model": "google/nano-banana-2.1", "label": "Nano Banana 2.1"}
```

[Nano Banana 2.1](https://raywake.si/models/google/nano-banana-2.1) (`google/nano-banana-2.1`) generates one to four images from a prompt at `1K`, `2K` or `4K`, with `aspect_ratio` and `seed`. Save the seed with the result so you can return to the same starting point. Use a plain background and even light: the cleaner the portrait, the better every later step reads it. [Nano Banana 2.1 vs Nano Banana 2](https://raywake.si/blog/nano-banana-2-1-vs-2) compares it with the previous version.

## Step 2: character sheet

```raywake-component
{"type": "model-card", "model": "google/nano-banana-2.1/edit", "label": "Nano Banana 2.1 edit"}
```

The [edit mode](https://raywake.si/models/google/nano-banana-2.1/edit) (`google/nano-banana-2.1/edit`) edits, combines or restyles **one to fourteen reference images** (`image_urls`) with a prompt. Give it the portrait and ask for a turnaround sheet on a plain background, with no text. A 16:9 aspect ratio at `2K` gives each view enough pixels. Generate a few with `num_images` and keep the one where all views agree.

A generated output can go straight into the next step's `image_urls`. Output links are signed for 7 days; fetch the job again for a fresh link, and download anything you want to keep, since files are stored for 30 days ([jobs and outputs](https://raywake.si/docs/generations)).

## Step 3: scenes from the sheet

Same model, new prompt, both references: `image_urls: [sheet, portrait]`. Describe the scene and end with the identity block plus an explicit "keep her face, hair, scar, jacket and earring exactly as in the reference images". When a scene drifts, change one thing at a time: the scene wording first, then `thinking_level` (`minimal`, `medium`, `high`) for complex compositions.

Other editors on Raywake take several references too, if you want to compare: [GPT Image 2.5 Flare](https://raywake.si/models/openai/gpt-image-2.5/flare/edit) (`openai/gpt-image-2.5/flare/edit`, up to 16 images), [MiniMax H3 Image](https://raywake.si/models/minimax/h3-image/edit) (`minimax/h3-image/edit`, up to 16) and [Seedream 5.5](https://raywake.si/models/bytedance/seedream/v5.5/edit) (`bytedance/seedream/v5.5/edit`, up to 10).

## Step 4: reference-to-video

```raywake-component
{"type": "model-card", "model": "veo3.1/fast/reference-to-video", "label": "Veo 3.1 Fast reference-to-video"}
```

[Veo 3.1 Fast reference-to-video](https://raywake.si/models/veo3.1/fast/reference-to-video) (`veo3.1/fast/reference-to-video`) takes `image_urls` as "reference images to use for consistent subject appearance" and a `prompt`. It makes an 8-second clip at 720p, in `16:9` or `9:16`. `generate_audio` is on by default: an 8-second clip costs $1.27 without sound and $1.91 with it. Pass the sheet and the scene still you want the clip to start from.

Other reference-to-video models on Raywake:

- [Veo 3.1 reference-to-video](https://raywake.si/models/veo3.1/reference-to-video) (`veo3.1/reference-to-video`), the non-Fast Veo 3.1 variant.
- [Gemini Omni Flash 1.2 reference-to-video](https://raywake.si/models/google/gemini-omni-flash/v1.2/reference-to-video) (`google/gemini-omni-flash/v1.2/reference-to-video`): up to ten reference images and up to three reference videos, sent in list order before the prompt; 360p to 4K, 3 to 15 seconds.
- [MiniMax H3 reference-to-video](https://raywake.si/models/minimax/h3/reference-to-video) (`minimax/h3/reference-to-video`): up to 9 images for subject and style, plus video and audio references, cited in the prompt as Image 1, Video 1 and so on.

For when to use reference-to-video versus first and last frames, see [First and last frames vs reference-to-video](https://raywake.si/blog/first-last-frame-vs-reference-video). [MiniMax H3 vs H3 Max for reference video](https://raywake.si/blog/minimax-h3-vs-h3-max-reference-video) and [Seedance 2.5 reference video alternatives](https://raywake.si/blog/seedance-2-5-reference-video-alternatives) compare more reference-to-video options.

## The whole pipeline in code

```raywake-component
{"type": "code-tabs", "snippets": {"curl": "# Quote the reference-to-video step with your own reference URLs (a sheet and a scene still)\ncurl -s https://api.raywake.com/v1/quotes \\\n  -H \"Authorization: Bearer $RAYWAKE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"model\": \"veo3.1/fast/reference-to-video\",\n  \"input\": {\n    \"image_urls\": [\"https://cdn.your-studio.example/mara-sheet.png\", \"https://cdn.your-studio.example/mara-market.png\"],\n    \"prompt\": \"Mara pulls off her helmet, glances at the camera and walks into the night market. Slow handheld follow shot, rain, neon light.\",\n    \"aspect_ratio\": \"16:9\",\n    \"generate_audio\": false\n  }\n}'\n# → {\"quote_id\": \"...\", \"price_usd\": \"...\", \"expires_at\": \"...\"}\n# Approve the price, then POST /v1/generate with the same model, input and quote_id plus an Idempotency-Key.", "python": "import os, sys, time, uuid, requests\n\nAPI = \"https://api.raywake.com/v1\"\nH = {\"Authorization\": f\"Bearer {os.environ['RAYWAKE_API_KEY']}\"}\nTERMINAL = {\"succeeded\", \"failed\", \"needs_review\", \"submission_unknown\", \"needs_reconciliation\"}\n\ndef run(model, inp):\n    \"\"\"Quote, ask, then generate. Returns the output URLs, or exits if not approved.\"\"\"\n    q = requests.post(f\"{API}/quotes\", headers=H, json={\"model\": model, \"input\": inp})\n    q.raise_for_status()\n    q = q.json()\n    if input(f\"{model}: {q['price_usd']} USD. Generate? [y/N] \").strip().lower() != \"y\":\n        sys.exit(\"Stopped before spending.\")\n    job = requests.post(f\"{API}/generate\", params={\"wait\": \"true\"},\n                        headers={**H, \"Idempotency-Key\": str(uuid.uuid4())},\n                        json={\"model\": model, \"input\": inp, \"quote_id\": q[\"quote_id\"]}).json()\n    while job[\"status\"] not in TERMINAL:\n        time.sleep(5)\n        job = requests.get(f\"{API}/jobs/{job['job_id']}\", headers=H).json()\n    if job[\"status\"] != \"succeeded\":\n        sys.exit(f\"{job['status']}: {job.get('error')}\")  # don't resubmit automatically\n    return [o[\"url\"] for o in job[\"outputs\"]]\n\n# One identity block, pasted into every prompt unchanged.\nMARA = (\"Mara, a bike courier in her late twenties, short asymmetric black hair, \"\n        \"a small scar through her left eyebrow, olive bomber jacket with orange lining, \"\n        \"a round brass earring in her right ear\")\n\n# 1. Base portrait (keep the seed so you can come back to it)\nbase = run(\"google/nano-banana-2.1\", {\n    \"prompt\": f\"Studio portrait of {MARA}. Neutral grey background, soft key light, photorealistic.\",\n    \"aspect_ratio\": \"3:4\", \"resolution\": \"2K\", \"seed\": 4127,\n})[0]\n\n# 2. Character sheet from the portrait\nsheet = run(\"google/nano-banana-2.1/edit\", {\n    \"image_urls\": [base],\n    \"prompt\": (f\"Character turnaround sheet of {MARA}: front, three-quarter, profile and back views, \"\n               \"plus three expressions. Same face, hair, scar, jacket and earring in every view. \"\n               \"Plain light grey background, even lighting, no text.\"),\n    \"aspect_ratio\": \"16:9\", \"resolution\": \"2K\",\n})[0]\n\n# 3. A new scene that reuses both references\nscene = run(\"google/nano-banana-2.1/edit\", {\n    \"image_urls\": [sheet, base],\n    \"prompt\": (f\"{MARA}, locking her bike outside a rainy night market, neon reflections on wet asphalt. \"\n               \"Keep her face, hair, scar, jacket and earring exactly as in the reference images.\"),\n    \"aspect_ratio\": \"16:9\", \"resolution\": \"2K\", \"num_images\": 2,\n})\n\n# 4. An 8-second reference-to-video clip\nclip = run(\"veo3.1/fast/reference-to-video\", {\n    \"image_urls\": [sheet, scene[0]],\n    \"prompt\": (f\"{MARA} pulls off her helmet, glances at the camera and walks into the night market. \"\n               \"Slow handheld follow shot, rain, neon light.\"),\n    \"aspect_ratio\": \"16:9\",\n    \"generate_audio\": False,\n})\nprint(clip)", "javascript": "import readline from \"node:readline/promises\";\nimport { stdin, stdout } from \"node:process\";\n\nconst API = \"https://api.raywake.com/v1\";\nconst auth = { Authorization: `Bearer ${process.env.RAYWAKE_API_KEY}`, \"Content-Type\": \"application/json\" };\nconst TERMINAL = [\"succeeded\", \"failed\", \"needs_review\", \"submission_unknown\", \"needs_reconciliation\"];\nconst rl = readline.createInterface({ input: stdin, output: stdout });\n\nasync function call(path, init = {}) {\n  const res = await fetch(`${API}${path}`, { ...init, headers: { ...auth, ...init.headers } });\n  if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);\n  return res.json();\n}\n\n// Quote, ask, then generate. Returns the output URLs; throws if not approved.\nasync function run(model, input) {\n  const quote = await call(\"/quotes\", { method: \"POST\", body: JSON.stringify({ model, input }) });\n  const answer = await rl.question(`${model}: ${quote.price_usd} USD. Generate? [y/N] `);\n  if (answer.trim().toLowerCase() !== \"y\") throw new Error(\"Stopped before spending.\");\n  let job = await call(\"/generate?wait=true\", {\n    method: \"POST\",\n    headers: { \"Idempotency-Key\": crypto.randomUUID() },\n    body: JSON.stringify({ model, input, quote_id: quote.quote_id }),\n  });\n  while (!TERMINAL.includes(job.status)) {\n    await new Promise((resolve) => setTimeout(resolve, 5000));\n    job = await call(`/jobs/${job.job_id}`);\n  }\n  if (job.status !== \"succeeded\") throw new Error(`${job.status}: ${job.error}`); // don't resubmit automatically\n  return job.outputs.map((o) => o.url);\n}\n\nconst MARA = \"Mara, a bike courier in her late twenties, short asymmetric black hair, a small scar through her left eyebrow, olive bomber jacket with orange lining, a round brass earring in her right ear\";\n\nconst [base] = await run(\"google/nano-banana-2.1\", {\n  prompt: `Studio portrait of ${MARA}. Neutral grey background, soft key light, photorealistic.`,\n  aspect_ratio: \"3:4\", resolution: \"2K\", seed: 4127,\n});\n\nconst [sheet] = await run(\"google/nano-banana-2.1/edit\", {\n  image_urls: [base],\n  prompt: `Character turnaround sheet of ${MARA}: front, three-quarter, profile and back views, plus three expressions. Same face, hair, scar, jacket and earring in every view. Plain light grey background, even lighting, no text.`,\n  aspect_ratio: \"16:9\", resolution: \"2K\",\n});\n\nconst scene = await run(\"google/nano-banana-2.1/edit\", {\n  image_urls: [sheet, base],\n  prompt: `${MARA}, locking her bike outside a rainy night market, neon reflections on wet asphalt. Keep her face, hair, scar, jacket and earring exactly as in the reference images.`,\n  aspect_ratio: \"16:9\", resolution: \"2K\", num_images: 2,\n});\n\nconst clip = await run(\"veo3.1/fast/reference-to-video\", {\n  image_urls: [sheet, scene[0]],\n  prompt: `${MARA} pulls off her helmet, glances at the camera and walks into the night market. Slow handheld follow shot, rain, neon light.`,\n  aspect_ratio: \"16:9\",\n  generate_audio: false,\n});\nconsole.log(clip);\nrl.close();"}, "label": "Portrait, sheet, scene and video, each quoted and approved"}
```

The script stops at `succeeded`, `failed` or one of the held statuses. A held status such as `submission_unknown` can still turn into a success later, so check the job again before you run anything twice; [jobs and outputs](https://raywake.si/docs/generations) lists what each status means.

## Recasting footage you already have

If you have a filmed clip and want your character in it, that is a different job: [Raymotion](https://raywake.si/models/raymotion) (model ID `rayjutsu`) recasts the people in a 4 to 20 second video from one photo each, up to 8 characters, keeping the motion, lip sync, camera and sound as filmed. Its guidance asks for one image per character that shows them from several angles, which is what your character sheet is. Use only photos of people who have agreed to appear in the video. [How to swap a character in a video with Raymotion](https://raywake.si/blog/raymotion-character-swap-video) walks through it step by step.

## Prices

Prices from each Raywake model page, read on 1 December 2026. A price per second or per run is not the total for your input; the quote is the number that counts.

| Model | Step | Price |
| --- | --- | --- |
| `google/nano-banana-2.1` | Base portrait | $0.10 per run |
| `google/nano-banana-2.1/edit` | Sheet and scenes | $0.10 per run |
| `veo3.1/fast/reference-to-video` | Video (8 s, 720p) | $0.1585 per second without audio ($1.27 per clip), $0.2377 with audio ($1.91) |
| `veo3.1/reference-to-video` | Video | From $0.317 per second |
| `google/gemini-omni-flash/v1.2/reference-to-video` | Video | From $0.0433 per second at 360p; $0.1298 at 720p |
| `minimax/h3/reference-to-video` | Video | $1.03 per run with default options |
| `rayjutsu` (Raymotion) | Recast footage, 720p | $0.1427 per second |

At these prices, one portrait, one sheet, one scene image and a silent 8-second Veo 3.1 Fast clip come to about $1.57 before retries (the script asks for two scene images, so its quote for that step is higher); the quotes give the exact figure. Everything runs on one USD balance across the studio, the API and the MCP server. Prefer to do this from Claude or Cursor? The [MCP server](https://raywake.si/docs/mcp) exposes the same models, quotes every step and asks before it generates.

```raywake-component
{"type": "cta", "id": "api", "label": "Read the API quickstart"}
```

## Related

- [Türkçe sürüm](https://raywake.si/tr/blog/tutarli-karakter-api-rehberi)
- [Raywake Blog](https://raywake.si/blog)
