references/examples.md
# Worked recipes
Three end-to-end recipes for keeping a subject identical across new images with Nano Banana 2 (`google:4@3`). Each shows the scenario, the actual request, and the result shape. Confirm field names and the reference-image cap against the live schema (`runware-run`) before calling. Send requests as a JSON array even for a single task.
Dimension notes for `google:4@3`: `width`/`height` must be an exact supported pair, not arbitrary values. The pairs below are valid 1K sizes (1200x896 is 1K 4:3, 896x1200 is 1K 3:4). Pass `width`+`height` together, or pass `resolution` (`0.5K`/`1K`/`2K`/`4K`) instead, never both. `referenceImages` accepts a URL, a UUID from a prior generation, a data URI, or base64, between 1 and 14 entries.
## Recipe 1: Same character, new scene
Scenario: the user has one studio portrait of a red-haired woman and wants her sitting in a bookstore cafe, same face.
Anchor the identity once and spend the rest of the prompt on what changes. Do not re-describe the face from imagination.
```json
[
{
"taskType": "imageInference",
"model": "google:4@3",
"positivePrompt": "The same woman from the reference image sitting at a window table in a cozy bookstore cafe, holding a ceramic mug, warm afternoon light, shallow depth of field, candid editorial photography. Keep her face, freckles, copper-red curly hair, and mustard-yellow corduroy jacket identical.",
"width": 1200,
"height": 896,
"inputs": {
"referenceImages": [
"https://example.com/character.jpg"
]
}
}
]
```
Result (one image, `imageUUID` always present, `imageURL` when `outputType` is `URL`):
```json
{
"data": [
{
"taskType": "imageInference",
"taskUUID": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"imageUUID": "9d8c7b6a-5f4e-3d2c-1b0a-9e8d7c6b5a4f",
"imageURL": "https://im.runware.ai/image/ws/2/ii/9d8c7b6a-5f4e-3d2c-1b0a-9e8d7c6b5a4f.jpg"
}
]
}
```
To vary the same character (new angle, outfit, or medium), reuse the same reference and change only the scene clause. Identity lives in the face and hair, so a wardrobe or medium change does not break the likeness:
- New outfit: `"The same woman from the reference image on a mountain trail at golden hour, wearing a teal windbreaker and a small backpack, smiling, natural light, outdoor lifestyle photography. Keep her face, freckles, green eyes, and copper-red curly hair identical even though the jacket is different."`
- New medium: `"The same woman from the reference image reimagined as a stylized 3D animated character, Pixar-style render, soft global illumination, friendly expression, preserving her copper-red curly hair, freckles, green eyes, and mustard-yellow corduroy jacket."`
## Recipe 2: Lock a hidden detail with a second reference
Scenario: the user has a front shot of a denim jacket and wants a walking-away shot that shows the embroidered phoenix on the back. One reference cannot show a view it never captured, so add a back reference.
The detail carries from the reference, not the text. The prompt below never mentions the phoenix, yet it comes through because a reference shows the back.
```json
[
{
"taskType": "imageInference",
"model": "google:4@3",
"positivePrompt": "The same woman in the light-wash denim jacket walking away down a sunny tree-lined city street, seen from behind with the back of her denim jacket clearly visible, candid street photography, golden afternoon light. Keep her dark-brown hair and the denim jacket consistent.",
"width": 896,
"height": 1200,
"inputs": {
"referenceImages": [
"https://example.com/jacket-front.jpg",
"https://example.com/jacket-back.jpg"
]
}
}
]
```
Result:
```json
{
"data": [
{
"taskType": "imageInference",
"taskUUID": "d4e5f6a7-b8c9-0123-defa-456789012345",
"imageUUID": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e",
"imageURL": "https://im.runware.ai/image/ws/2/ii/2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e.jpg"
}
]
}
```
Build a small reference set that covers every view your scenes will show: the front plus any side that carries detail the front cannot reveal, like a back panel or an embossed base. Nano Banana 2 takes up to 14 references and they work together.
## Recipe 3: Two locked subjects in one image
Scenario: the user wants their character holding their product, both kept identical. Pass a reference for each locked subject in the same call and the model keeps both. Name each subject by its reference position so the model maps it correctly.
```json
[
{
"taskType": "imageInference",
"model": "google:4@3",
"positivePrompt": "The woman with copper-red curly hair, freckles, and a mustard-yellow corduroy jacket from the first reference image sitting on a park bench holding the teal ceramic travel mug with a cork base and white mountain logo from the second reference image, autumn leaves around her, warm afternoon light, lifestyle photography. Keep both her identity and the mug design identical.",
"width": 1200,
"height": 896,
"inputs": {
"referenceImages": [
"https://example.com/character.jpg",
"https://example.com/mug.jpg"
]
}
}
]
```
Result:
```json
{
"data": [
{
"taskType": "imageInference",
"taskUUID": "e5f6a7b8-c9d0-1234-efab-567890123456",
"imageUUID": "3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f",
"imageURL": "https://im.runware.ai/image/ws/2/ii/3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f.jpg"
}
]
}
```
This is the bridge to composition: each reference is held to its source while the scene around them is invented. The same approach scales to 14 references. For pulling many images into one full scene (subject plus product plus backdrop), route to `composite-scene`.
SKILL.md
---
name: character-consistency
description: >
Keep the same character, person, or product looking identical across new scenes, poses, outfits,
and styles. Use when the user says "the same character again", "keep her face consistent", "my
mascot in a different scene", "same product, new background", or wants a reference, expression,
or outfit sheet. The number-one thing people struggle with in image generation, so reach for it
whenever identity must persist across images. To hold a composition or pose fixed rather than
identity, use controlled-generation. To fuse separate photos into one scene, use
composite-scene.
---
# Character consistency
Produce new images of an established subject (a character, a real person, a mascot, a product) that stay recognizably the *same* across scenes, angles, and styles. The lever is reference images plus prompt phrasing that ties the new image back to them, not re-describing the subject from scratch.
## Inputs to collect
- **The subject's reference image(s).** One clear shot is enough; several angles/expressions improve fidelity. (Ask only if none provided.)
- **What changes** in the new image: scene, pose, outfit, style, or all of these.
- **How many** outputs and the target use (single hero, a reference sheet, a set of expressions/outfits).
- Optional: a locked style or palette to carry across the set.
## Models
- **Default: Google Nano Banana 2** (`google:4@3`) - accepts up to **14 reference images** and holds identity strongly across scenes and styles. Best general pick.
- **For a trained, reusable identity** (a recurring brand character used at scale): train a LoRA via `train-style-model`, then generate with it - more setup, maximum consistency.
- **Reference-guided alternatives:** IP-Adapter on a FLUX/SDXL base, or any image model that accepts `referenceImages`. Confirm support and the exact field via `runware-models` + `runware-run` before calling.
## Workflow
1. Resolve the model schema (`runware-run`) and confirm the reference-image field and its max count.
2. Upload the subject reference(s) into `inputs.referenceImages`.
3. Run `imageInference` synchronously with a prompt that **names the subject as "the same … from the reference"** and then describes only what's new.
4. For a set (reference sheet, expressions, outfits), reuse the *same* references across calls and vary only the scene/pose clause. Keep a fixed seed if you want tighter repeatability.
5. Review for identity drift; retry the outliers with an added or clearer reference.
## Technique
- **Anchor, then vary.** State the immutable identity once ("the same woman from the reference image, same face and hair") and let the rest of the prompt change freely (new pose, lighting, outfit, setting). Do not re-describe the face from imagination - that invites drift.
Fill this character-anchor template, then send it as `positivePrompt`:
```
The same <subject> from the reference image <new scene, pose, lighting, or medium>. Keep <the immutable identity features: face, hair, key details> identical.
```
The first clause is the immutable anchor (do not vary it). The middle clause is the only part that changes per image. The closing clause names the features to hold hardest.
Load `references/examples.md` for worked end-to-end recipes (single subject, hidden-detail reference set, two locked subjects).
- **More references = more stability.** A single front shot works; adding profile/expression shots locks identity harder across angles.
- **Composition is a sibling move:** to place the subject *with* other real elements (product, backdrop), give each as a separate reference and describe how they fit - see `composite-scene`.
- **For a whole set,** hold references and style constant and change only one variable per image. That's what makes a reference/expression/outfit sheet read as one character.
## Parameters that matter
- `inputs.referenceImages` - up to **14** on Nano Banana 2; order is not significant.
- Prompt phrasing carries the consistency, not a `strength` dial - lead with "the same … from the reference".
- `seed` - fix it for tighter repeatability across a set; vary it for alternates.
- Confirm exact field names against the live schema (`runware-run`); never guess.
## Quality bar
- Face/identity is recognizably the same across every output (no morphing between siblings).
- Only the intended variables changed (pose/scene/outfit), not the subject.
- For a set, the images read as one character, not cousins. Retry any that drift with a clearer or extra reference.
## Related skills
`runware-run`, `runware-models`, `runware-prompting`; `composite-scene` (subject + other elements), `train-style-model` (reusable identity), `product-photography` (same-product across shots).