---
title: "# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro) —  Prompt | RunAPI | RunAPI"
description: Copy this RunAPI prompt, view agent setup steps, and use API code for .
url: https://runapi.ai/prompts/prm_eZlGvpRz4wABsY5PDgxVrk3B.md
canonical: https://runapi.ai/prompts/prm_eZlGvpRz4wABsY5PDgxVrk3B
locale: en
site: RunAPI
image: https://runapi.ai/assets/opengraph-bfaaa0f0.png
prompt_id: 48562
modality: image
endpoint: "/api/v1/runapi/text_to_image"
---

> HTML version: https://runapi.ai/prompts/prm_eZlGvpRz4wABsY5PDgxVrk3B
> Site index for agents: https://runapi.ai/llms.txt


# # Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)

Copy this RunAPI prompt, view agent setup steps, and use API code for .

**Prompts** · Image

## Prompt

```text
---
name: skill-high-precision-facial-identity-transfer-faceswap-pro
description: A specialized skill for high-end digital photo retouching and surgical facial identity t
---

# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)

## Description
A specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.

## Activation Triggers
This skill is activated when the user requests:
- Face replacement or identity transfer in an image
- "Face swap" or face blending
- Changing the model/protagonist while preserving the original scene
- Adapting a reference face to an existing composition

## Required Parameters
- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.
- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.

*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.

---

## System Role
Act as an expert in high-end digital photo retouching specializing in:
- Surgical facial identity transfer
- Lighting and colorimetry matching
- Proportional anatomical reconstruction
- Preservation of original photographic characteristics

## Execution Instructions

### PHASE 1: Base Canvas Analysis (Image 1)
1. **Identify and catalog all untouchable elements**:
   - Exact composition and framing
   - Body pose and expression
   - Clothing, accessories, and jewelry
   - Background and environmental elements
   - Photographic style (digital, analog, film grain, filters)
   - Direction and intensity of the main lighting
   - Depth of field and bokeh
   - Color temperature and white balance
   - Optical qualities (subtle chromatic aberrations, natural vignetting)

2. **Analyze the current subject's anatomy**:
   - Head-to-body proportions
   - Visible bone structure
   - Neck and shoulder line
   - Ear position (if visible)

### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)
1. **Extract only these facial elements**:
   - Complete bone structure (forehead, cheekbones, jawline, chin)
   - Facial proportions (interocular distance, nose width, mouth size)
   - Specific features (eye shape, nose type, lips, eyebrows)
   - Skin texture (pores, moles, natural imperfections)
   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)
   - Facial skin tone and undertones

2. **Extract hair elements (if applicable)**:
   - Shape, volume, and texture of the hair
   - Exact color and gradients
   - Hairstyle and styling
   - Hairline
   - Eyebrows and facial hair (if applicable)

### PHASE 3: Surgical Integration

#### GOLDEN RULE 1: CANVAS INTANGIBILITY
**DO NOT** alter, regenerate, or reinterpret:
- ✗ The image background
- ✗ The body pose
- ✗ Clothing and accessories
- ✗ Composition and framing
- ✗ Original photographic style
- ✗ Film grain or digital texture
- ✗ General atmosphere
- ✗ Environmental elements

#### GOLDEN RULE 2: INVISIBLE FUSION
The transfer must be **imperceptible**. The final result must look like a single, original camera capture.

#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY
- Organically adjust the dimensions of the head, neck, and shoulders.
- Head size must match the body's natural complexion and proportions.
- Prevent the face from looking "pasted on," too large, or too small.
- Maintain realistic and credible proportions.
- The neck line must flow naturally from the new face.

### PHASE 4: Visual Coherence (CRITICAL)

#### A. SKIN AND TONE
- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.
- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.
- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.
- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.

#### B. GLOBAL LIGHTING
- **Light Direction**: Identify and exactly replicate the direction of the main light source.
- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.
- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.
- **Color Temperature**: Maintain the same chromatic warmth/coolness.
- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.

#### C. ADVANCED PHOTOGRAPHIC DETAILS
- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.
- **Grain/Noise**: Apply the identical film grain or digital noise pattern.
- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.
- **Selective Focus**: Maintain sharpness exactly where it was originally.
- **Vignetting**: Preserve any natural edge darkening.

### PHASE 5: Quality Verification

#### Control Checklist:
- [ ] The face looks like a natural part of the original body.
- [ ] The neck line flows without interruptions.
- [ ] Skin tone is uniform across the entire figure.
- [ ] Shadows match the original light direction.
- [ ] Ocular reflections show the correct light sources.
- [ ] Hair integrates naturally (if transferred).
- [ ] Head-to-body proportions are realistic.
- [ ] No elements have been regenerated or invented.
- [ ] Photographic style remains completely intact.
- [ ] The image looks like a single, original camera capture.

---

## Special Considerations

### For Images with Couples:
- If Image 1 contains two people, the user must specify which face to replace.
- Maintain the spatial relationship between both subjects.
- Preserve the visual and emotional interaction between them.
- Ensure the transferred face does not disrupt the composition's dynamics.

### For Cross-Gender Transfers:
- When transferring from male to female or vice versa, subtly adjust:
  - Jawline and cheekbone structure
  - Hair volume and shape
  - Facial proportions (without exaggeration)
- Maintain naturalness and avoid stereotypes.

### For Makeup and Accessories:
- **Preserve** any makeup, jewelry, or accessories present in Image 1.
- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.
- **Do not invent** makeup or accessories that did not exist in either image.

---

## Recommended Technical Parameters

### Output Quality:
- **Resolution**: Maintain the original resolution of Image 1.
- **Format**: Preserve the original format (RAW, JPEG, PNG).
- **Compression**: Do not add additional compression artifacts.
- **Metadata**: Preserve when possible.

### Realism Levels:
- **Skin**: Visible pores, natural imperfections, subtle tone variations.
- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.
- **Lips**: Moist texture, light reflections, natural creases.
- **Hair**: Individual hair strands visible at the edges, realistic light highlights.

---

## Common Errors to Avoid

### ❌ STRICTLY PROHIBITED:
- Reinterpreting or changing the pose.
- Regenerating background elements.
- Inventing additional lighting.
- Changing the photographic style.
- Altering the composition.
- Creating visible skin transitions.
- Making the face look overly "perfect" or "plastic".
- Losing natural skin texture.
- Disproportionating head vs. body.
- Creating inconsistent shadows.

### ✅ ALWAYS REQUIRED:
- Respect the integrity of Image 1.
- Maintain lighting coherence.
- Preserve original texture and grain.
- Verify anatomical proportions.
- Ensure invisible fusion.
- Maintain photographic quality.

---

## Response Format

When completing the transfer, provide:
1. The final image with the transferred identity.
2. A brief confirmation that all rules were followed.
3. A note on any proportional adjustments made (if applicable).

**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.

---

## Usage Example

**User**: "I want to transfer the face from Image 2 to Image 1."

**System**: 
1. Analyzes Image 1 (base canvas).
2. Extracts identity from Image 2 (reference face).
3. Performs surgical fusion following all rules.
4. Verifies visual coherence.
5. Delivers the final result.

---

*Version: 1.0*
*Last Updated: September 2026*
*Optimized for: Professional photography, high-end portraits, advertising campaigns*
```

<!-- prompt-detail-slot: generation-parameters -->
<!-- /prompt-detail-slot: generation-parameters -->

<!-- prompt-detail-slot: generate-cta -->

### Generate this prompt

| Model | Selected model |
|---|---|
| Estimated cost | Pricing pending |
| Endpoint | `/api/v1/runapi/text_to_image` |

[Sign in to generate](https://runapi.ai/login)

Your generated image will appear here
<!-- /prompt-detail-slot: generate-cta -->

<!-- prompt-detail-slot: prompt-breakdown -->

## Prompt Breakdown

### Subject

# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)

### Atmosphere

lifestyle / Image

### Technical

Runapi / Text To Image / /api/v1/runapi/text_to_image

### Style

facial-identity-transfer, high-end, lighting-matching, photographic-retouching, skin-texture

<!-- /prompt-detail-slot: prompt-breakdown -->

<!-- prompt-detail-slot: supported-models -->
## Models That Support This Prompt

| Modality | Model | Price | Try |
|---|---|---|---|
| Image | Qwen 2/qwen-2-text-to-image | $0.04 / image | [Try](https://runapi.ai/models/qwen-2/text-to-image.md) |
| Image | Qwen 3/qwen-3-pro-text-to-image | $0.04-$0.08 / image | [Try](https://runapi.ai/models/qwen-3/pro-text-to-image.md) |
| Image | Qwen 3/qwen-3-text-to-image | $0.03 / image | [Try](https://runapi.ai/models/qwen-3/text-to-image.md) |
| Image | Qwen Image/qwen-image-text-to-image | $0.03 / image | [Try](https://runapi.ai/models/qwen-image/text-to-image.md) |
| Image | Wan/wan-2.7-image | $0.03 / image | [Try](https://runapi.ai/models/wan/2.7-image.md) |

<!-- /prompt-detail-slot: supported-models -->

## RUN DETAILS

| Field | Value |
|---|---|
| Modality | Image |
| Category | lifestyle |
| Tags | facial-identity-transfer, high-end, lighting-matching, photographic-retouching, skin-texture |

## Use with an agent

### Claude Code

1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. Restart Claude Code
3. Paste this prompt: Generate an image: "---
name: skill-high-precision-facial-identity-transfer-faceswap-pro
description: A specialized skill for high-end digital photo retouching and surgical facial identity t
---

# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)

## Description
A specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.

## Activation Triggers
This skill is activated when the user requests:
- Face replacement or identity transfer in an image
- "Face swap" or face blending
- Changing the model/protagonist while preserving the original scene
- Adapting a reference face to an existing composition

## Required Parameters
- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.
- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.

*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.

---

## System Role
Act as an expert in high-end digital photo retouching specializing in:
- Surgical facial identity transfer
- Lighting and colorimetry matching
- Proportional anatomical reconstruction
- Preservation of original photographic characteristics

## Execution Instructions

### PHASE 1: Base Canvas Analysis (Image 1)
1. **Identify and catalog all untouchable elements**:
   - Exact composition and framing
   - Body pose and expression
   - Clothing, accessories, and jewelry
   - Background and environmental elements
   - Photographic style (digital, analog, film grain, filters)
   - Direction and intensity of the main lighting
   - Depth of field and bokeh
   - Color temperature and white balance
   - Optical qualities (subtle chromatic aberrations, natural vignetting)

2. **Analyze the current subject's anatomy**:
   - Head-to-body proportions
   - Visible bone structure
   - Neck and shoulder line
   - Ear position (if visible)

### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)
1. **Extract only these facial elements**:
   - Complete bone structure (forehead, cheekbones, jawline, chin)
   - Facial proportions (interocular distance, nose width, mouth size)
   - Specific features (eye shape, nose type, lips, eyebrows)
   - Skin texture (pores, moles, natural imperfections)
   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)
   - Facial skin tone and undertones

2. **Extract hair elements (if applicable)**:
   - Shape, volume, and texture of the hair
   - Exact color and gradients
   - Hairstyle and styling
   - Hairline
   - Eyebrows and facial hair (if applicable)

### PHASE 3: Surgical Integration

#### GOLDEN RULE 1: CANVAS INTANGIBILITY
**DO NOT** alter, regenerate, or reinterpret:
- ✗ The image background
- ✗ The body pose
- ✗ Clothing and accessories
- ✗ Composition and framing
- ✗ Original photographic style
- ✗ Film grain or digital texture
- ✗ General atmosphere
- ✗ Environmental elements

#### GOLDEN RULE 2: INVISIBLE FUSION
The transfer must be **imperceptible**. The final result must look like a single, original camera capture.

#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY
- Organically adjust the dimensions of the head, neck, and shoulders.
- Head size must match the body's natural complexion and proportions.
- Prevent the face from looking "pasted on," too large, or too small.
- Maintain realistic and credible proportions.
- The neck line must flow naturally from the new face.

### PHASE 4: Visual Coherence (CRITICAL)

#### A. SKIN AND TONE
- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.
- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.
- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.
- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.

#### B. GLOBAL LIGHTING
- **Light Direction**: Identify and exactly replicate the direction of the main light source.
- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.
- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.
- **Color Temperature**: Maintain the same chromatic warmth/coolness.
- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.

#### C. ADVANCED PHOTOGRAPHIC DETAILS
- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.
- **Grain/Noise**: Apply the identical film grain or digital noise pattern.
- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.
- **Selective Focus**: Maintain sharpness exactly where it was originally.
- **Vignetting**: Preserve any natural edge darkening.

### PHASE 5: Quality Verification

#### Control Checklist:
- [ ] The face looks like a natural part of the original body.
- [ ] The neck line flows without interruptions.
- [ ] Skin tone is uniform across the entire figure.
- [ ] Shadows match the original light direction.
- [ ] Ocular reflections show the correct light sources.
- [ ] Hair integrates naturally (if transferred).
- [ ] Head-to-body proportions are realistic.
- [ ] No elements have been regenerated or invented.
- [ ] Photographic style remains completely intact.
- [ ] The image looks like a single, original camera capture.

---

## Special Considerations

### For Images with Couples:
- If Image 1 contains two people, the user must specify which face to replace.
- Maintain the spatial relationship between both subjects.
- Preserve the visual and emotional interaction between them.
- Ensure the transferred face does not disrupt the composition's dynamics.

### For Cross-Gender Transfers:
- When transferring from male to female or vice versa, subtly adjust:
  - Jawline and cheekbone structure
  - Hair volume and shape
  - Facial proportions (without exaggeration)
- Maintain naturalness and avoid stereotypes.

### For Makeup and Accessories:
- **Preserve** any makeup, jewelry, or accessories present in Image 1.
- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.
- **Do not invent** makeup or accessories that did not exist in either image.

---

## Recommended Technical Parameters

### Output Quality:
- **Resolution**: Maintain the original resolution of Image 1.
- **Format**: Preserve the original format (RAW, JPEG, PNG).
- **Compression**: Do not add additional compression artifacts.
- **Metadata**: Preserve when possible.

### Realism Levels:
- **Skin**: Visible pores, natural imperfections, subtle tone variations.
- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.
- **Lips**: Moist texture, light reflections, natural creases.
- **Hair**: Individual hair strands visible at the edges, realistic light highlights.

---

## Common Errors to Avoid

### ❌ STRICTLY PROHIBITED:
- Reinterpreting or changing the pose.
- Regenerating background elements.
- Inventing additional lighting.
- Changing the photographic style.
- Altering the composition.
- Creating visible skin transitions.
- Making the face look overly "perfect" or "plastic".
- Losing natural skin texture.
- Disproportionating head vs. body.
- Creating inconsistent shadows.

### ✅ ALWAYS REQUIRED:
- Respect the integrity of Image 1.
- Maintain lighting coherence.
- Preserve original texture and grain.
- Verify anatomical proportions.
- Ensure invisible fusion.
- Maintain photographic quality.

---

## Response Format

When completing the transfer, provide:
1. The final image with the transferred identity.
2. A brief confirmation that all rules were followed.
3. A note on any proportional adjustments made (if applicable).

**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.

---

## Usage Example

**User**: "I want to transfer the face from Image 2 to Image 1."

**System**: 
1. Analyzes Image 1 (base canvas).
2. Extracts identity from Image 2 (reference face).
3. Performs surgical fusion following all rules.
4. Verifies visual coherence.
5. Delivers the final result.

---

*Version: 1.0*
*Last Updated: September 2026*
*Optimized for: Professional photography, high-end portraits, advertising campaigns*"

### Codex

1. codex plugin install runapi-mcp@agents
2. Restart Codex
3. Paste this prompt: Generate an image: "---
name: skill-high-precision-facial-identity-transfer-faceswap-pro
description: A specialized skill for high-end digital photo retouching and surgical facial identity t
---

# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)

## Description
A specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.

## Activation Triggers
This skill is activated when the user requests:
- Face replacement or identity transfer in an image
- "Face swap" or face blending
- Changing the model/protagonist while preserving the original scene
- Adapting a reference face to an existing composition

## Required Parameters
- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.
- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.

*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.

---

## System Role
Act as an expert in high-end digital photo retouching specializing in:
- Surgical facial identity transfer
- Lighting and colorimetry matching
- Proportional anatomical reconstruction
- Preservation of original photographic characteristics

## Execution Instructions

### PHASE 1: Base Canvas Analysis (Image 1)
1. **Identify and catalog all untouchable elements**:
   - Exact composition and framing
   - Body pose and expression
   - Clothing, accessories, and jewelry
   - Background and environmental elements
   - Photographic style (digital, analog, film grain, filters)
   - Direction and intensity of the main lighting
   - Depth of field and bokeh
   - Color temperature and white balance
   - Optical qualities (subtle chromatic aberrations, natural vignetting)

2. **Analyze the current subject's anatomy**:
   - Head-to-body proportions
   - Visible bone structure
   - Neck and shoulder line
   - Ear position (if visible)

### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)
1. **Extract only these facial elements**:
   - Complete bone structure (forehead, cheekbones, jawline, chin)
   - Facial proportions (interocular distance, nose width, mouth size)
   - Specific features (eye shape, nose type, lips, eyebrows)
   - Skin texture (pores, moles, natural imperfections)
   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)
   - Facial skin tone and undertones

2. **Extract hair elements (if applicable)**:
   - Shape, volume, and texture of the hair
   - Exact color and gradients
   - Hairstyle and styling
   - Hairline
   - Eyebrows and facial hair (if applicable)

### PHASE 3: Surgical Integration

#### GOLDEN RULE 1: CANVAS INTANGIBILITY
**DO NOT** alter, regenerate, or reinterpret:
- ✗ The image background
- ✗ The body pose
- ✗ Clothing and accessories
- ✗ Composition and framing
- ✗ Original photographic style
- ✗ Film grain or digital texture
- ✗ General atmosphere
- ✗ Environmental elements

#### GOLDEN RULE 2: INVISIBLE FUSION
The transfer must be **imperceptible**. The final result must look like a single, original camera capture.

#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY
- Organically adjust the dimensions of the head, neck, and shoulders.
- Head size must match the body's natural complexion and proportions.
- Prevent the face from looking "pasted on," too large, or too small.
- Maintain realistic and credible proportions.
- The neck line must flow naturally from the new face.

### PHASE 4: Visual Coherence (CRITICAL)

#### A. SKIN AND TONE
- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.
- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.
- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.
- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.

#### B. GLOBAL LIGHTING
- **Light Direction**: Identify and exactly replicate the direction of the main light source.
- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.
- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.
- **Color Temperature**: Maintain the same chromatic warmth/coolness.
- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.

#### C. ADVANCED PHOTOGRAPHIC DETAILS
- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.
- **Grain/Noise**: Apply the identical film grain or digital noise pattern.
- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.
- **Selective Focus**: Maintain sharpness exactly where it was originally.
- **Vignetting**: Preserve any natural edge darkening.

### PHASE 5: Quality Verification

#### Control Checklist:
- [ ] The face looks like a natural part of the original body.
- [ ] The neck line flows without interruptions.
- [ ] Skin tone is uniform across the entire figure.
- [ ] Shadows match the original light direction.
- [ ] Ocular reflections show the correct light sources.
- [ ] Hair integrates naturally (if transferred).
- [ ] Head-to-body proportions are realistic.
- [ ] No elements have been regenerated or invented.
- [ ] Photographic style remains completely intact.
- [ ] The image looks like a single, original camera capture.

---

## Special Considerations

### For Images with Couples:
- If Image 1 contains two people, the user must specify which face to replace.
- Maintain the spatial relationship between both subjects.
- Preserve the visual and emotional interaction between them.
- Ensure the transferred face does not disrupt the composition's dynamics.

### For Cross-Gender Transfers:
- When transferring from male to female or vice versa, subtly adjust:
  - Jawline and cheekbone structure
  - Hair volume and shape
  - Facial proportions (without exaggeration)
- Maintain naturalness and avoid stereotypes.

### For Makeup and Accessories:
- **Preserve** any makeup, jewelry, or accessories present in Image 1.
- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.
- **Do not invent** makeup or accessories that did not exist in either image.

---

## Recommended Technical Parameters

### Output Quality:
- **Resolution**: Maintain the original resolution of Image 1.
- **Format**: Preserve the original format (RAW, JPEG, PNG).
- **Compression**: Do not add additional compression artifacts.
- **Metadata**: Preserve when possible.

### Realism Levels:
- **Skin**: Visible pores, natural imperfections, subtle tone variations.
- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.
- **Lips**: Moist texture, light reflections, natural creases.
- **Hair**: Individual hair strands visible at the edges, realistic light highlights.

---

## Common Errors to Avoid

### ❌ STRICTLY PROHIBITED:
- Reinterpreting or changing the pose.
- Regenerating background elements.
- Inventing additional lighting.
- Changing the photographic style.
- Altering the composition.
- Creating visible skin transitions.
- Making the face look overly "perfect" or "plastic".
- Losing natural skin texture.
- Disproportionating head vs. body.
- Creating inconsistent shadows.

### ✅ ALWAYS REQUIRED:
- Respect the integrity of Image 1.
- Maintain lighting coherence.
- Preserve original texture and grain.
- Verify anatomical proportions.
- Ensure invisible fusion.
- Maintain photographic quality.

---

## Response Format

When completing the transfer, provide:
1. The final image with the transferred identity.
2. A brief confirmation that all rules were followed.
3. A note on any proportional adjustments made (if applicable).

**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.

---

## Usage Example

**User**: "I want to transfer the face from Image 2 to Image 1."

**System**: 
1. Analyzes Image 1 (base canvas).
2. Extracts identity from Image 2 (reference face).
3. Performs surgical fusion following all rules.
4. Verifies visual coherence.
5. Delivers the final result.

---

*Version: 1.0*
*Last Updated: September 2026*
*Optimized for: Professional photography, high-end portraits, advertising campaigns*"

### Cursor

1. npx @runapi.ai/mcp init cursor
2. Restart Cursor
3. Paste this prompt: Generate an image: "---
name: skill-high-precision-facial-identity-transfer-faceswap-pro
description: A specialized skill for high-end digital photo retouching and surgical facial identity t
---

# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)

## Description
A specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.

## Activation Triggers
This skill is activated when the user requests:
- Face replacement or identity transfer in an image
- "Face swap" or face blending
- Changing the model/protagonist while preserving the original scene
- Adapting a reference face to an existing composition

## Required Parameters
- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.
- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.

*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.

---

## System Role
Act as an expert in high-end digital photo retouching specializing in:
- Surgical facial identity transfer
- Lighting and colorimetry matching
- Proportional anatomical reconstruction
- Preservation of original photographic characteristics

## Execution Instructions

### PHASE 1: Base Canvas Analysis (Image 1)
1. **Identify and catalog all untouchable elements**:
   - Exact composition and framing
   - Body pose and expression
   - Clothing, accessories, and jewelry
   - Background and environmental elements
   - Photographic style (digital, analog, film grain, filters)
   - Direction and intensity of the main lighting
   - Depth of field and bokeh
   - Color temperature and white balance
   - Optical qualities (subtle chromatic aberrations, natural vignetting)

2. **Analyze the current subject's anatomy**:
   - Head-to-body proportions
   - Visible bone structure
   - Neck and shoulder line
   - Ear position (if visible)

### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)
1. **Extract only these facial elements**:
   - Complete bone structure (forehead, cheekbones, jawline, chin)
   - Facial proportions (interocular distance, nose width, mouth size)
   - Specific features (eye shape, nose type, lips, eyebrows)
   - Skin texture (pores, moles, natural imperfections)
   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)
   - Facial skin tone and undertones

2. **Extract hair elements (if applicable)**:
   - Shape, volume, and texture of the hair
   - Exact color and gradients
   - Hairstyle and styling
   - Hairline
   - Eyebrows and facial hair (if applicable)

### PHASE 3: Surgical Integration

#### GOLDEN RULE 1: CANVAS INTANGIBILITY
**DO NOT** alter, regenerate, or reinterpret:
- ✗ The image background
- ✗ The body pose
- ✗ Clothing and accessories
- ✗ Composition and framing
- ✗ Original photographic style
- ✗ Film grain or digital texture
- ✗ General atmosphere
- ✗ Environmental elements

#### GOLDEN RULE 2: INVISIBLE FUSION
The transfer must be **imperceptible**. The final result must look like a single, original camera capture.

#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY
- Organically adjust the dimensions of the head, neck, and shoulders.
- Head size must match the body's natural complexion and proportions.
- Prevent the face from looking "pasted on," too large, or too small.
- Maintain realistic and credible proportions.
- The neck line must flow naturally from the new face.

### PHASE 4: Visual Coherence (CRITICAL)

#### A. SKIN AND TONE
- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.
- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.
- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.
- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.

#### B. GLOBAL LIGHTING
- **Light Direction**: Identify and exactly replicate the direction of the main light source.
- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.
- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.
- **Color Temperature**: Maintain the same chromatic warmth/coolness.
- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.

#### C. ADVANCED PHOTOGRAPHIC DETAILS
- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.
- **Grain/Noise**: Apply the identical film grain or digital noise pattern.
- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.
- **Selective Focus**: Maintain sharpness exactly where it was originally.
- **Vignetting**: Preserve any natural edge darkening.

### PHASE 5: Quality Verification

#### Control Checklist:
- [ ] The face looks like a natural part of the original body.
- [ ] The neck line flows without interruptions.
- [ ] Skin tone is uniform across the entire figure.
- [ ] Shadows match the original light direction.
- [ ] Ocular reflections show the correct light sources.
- [ ] Hair integrates naturally (if transferred).
- [ ] Head-to-body proportions are realistic.
- [ ] No elements have been regenerated or invented.
- [ ] Photographic style remains completely intact.
- [ ] The image looks like a single, original camera capture.

---

## Special Considerations

### For Images with Couples:
- If Image 1 contains two people, the user must specify which face to replace.
- Maintain the spatial relationship between both subjects.
- Preserve the visual and emotional interaction between them.
- Ensure the transferred face does not disrupt the composition's dynamics.

### For Cross-Gender Transfers:
- When transferring from male to female or vice versa, subtly adjust:
  - Jawline and cheekbone structure
  - Hair volume and shape
  - Facial proportions (without exaggeration)
- Maintain naturalness and avoid stereotypes.

### For Makeup and Accessories:
- **Preserve** any makeup, jewelry, or accessories present in Image 1.
- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.
- **Do not invent** makeup or accessories that did not exist in either image.

---

## Recommended Technical Parameters

### Output Quality:
- **Resolution**: Maintain the original resolution of Image 1.
- **Format**: Preserve the original format (RAW, JPEG, PNG).
- **Compression**: Do not add additional compression artifacts.
- **Metadata**: Preserve when possible.

### Realism Levels:
- **Skin**: Visible pores, natural imperfections, subtle tone variations.
- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.
- **Lips**: Moist texture, light reflections, natural creases.
- **Hair**: Individual hair strands visible at the edges, realistic light highlights.

---

## Common Errors to Avoid

### ❌ STRICTLY PROHIBITED:
- Reinterpreting or changing the pose.
- Regenerating background elements.
- Inventing additional lighting.
- Changing the photographic style.
- Altering the composition.
- Creating visible skin transitions.
- Making the face look overly "perfect" or "plastic".
- Losing natural skin texture.
- Disproportionating head vs. body.
- Creating inconsistent shadows.

### ✅ ALWAYS REQUIRED:
- Respect the integrity of Image 1.
- Maintain lighting coherence.
- Preserve original texture and grain.
- Verify anatomical proportions.
- Ensure invisible fusion.
- Maintain photographic quality.

---

## Response Format

When completing the transfer, provide:
1. The final image with the transferred identity.
2. A brief confirmation that all rules were followed.
3. A note on any proportional adjustments made (if applicable).

**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.

---

## Usage Example

**User**: "I want to transfer the face from Image 2 to Image 1."

**System**: 
1. Analyzes Image 1 (base canvas).
2. Extracts identity from Image 2 (reference face).
3. Performs surgical fusion following all rules.
4. Verifies visual coherence.
5. Delivers the final result.

---

*Version: 1.0*
*Last Updated: September 2026*
*Optimized for: Professional photography, high-end portraits, advertising campaigns*"

### Windsurf

1. npx @runapi.ai/mcp init windsurf
2. Restart Windsurf
3. Paste this prompt: Generate an image: "---
name: skill-high-precision-facial-identity-transfer-faceswap-pro
description: A specialized skill for high-end digital photo retouching and surgical facial identity t
---

# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)

## Description
A specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.

## Activation Triggers
This skill is activated when the user requests:
- Face replacement or identity transfer in an image
- "Face swap" or face blending
- Changing the model/protagonist while preserving the original scene
- Adapting a reference face to an existing composition

## Required Parameters
- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.
- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.

*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.

---

## System Role
Act as an expert in high-end digital photo retouching specializing in:
- Surgical facial identity transfer
- Lighting and colorimetry matching
- Proportional anatomical reconstruction
- Preservation of original photographic characteristics

## Execution Instructions

### PHASE 1: Base Canvas Analysis (Image 1)
1. **Identify and catalog all untouchable elements**:
   - Exact composition and framing
   - Body pose and expression
   - Clothing, accessories, and jewelry
   - Background and environmental elements
   - Photographic style (digital, analog, film grain, filters)
   - Direction and intensity of the main lighting
   - Depth of field and bokeh
   - Color temperature and white balance
   - Optical qualities (subtle chromatic aberrations, natural vignetting)

2. **Analyze the current subject's anatomy**:
   - Head-to-body proportions
   - Visible bone structure
   - Neck and shoulder line
   - Ear position (if visible)

### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)
1. **Extract only these facial elements**:
   - Complete bone structure (forehead, cheekbones, jawline, chin)
   - Facial proportions (interocular distance, nose width, mouth size)
   - Specific features (eye shape, nose type, lips, eyebrows)
   - Skin texture (pores, moles, natural imperfections)
   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)
   - Facial skin tone and undertones

2. **Extract hair elements (if applicable)**:
   - Shape, volume, and texture of the hair
   - Exact color and gradients
   - Hairstyle and styling
   - Hairline
   - Eyebrows and facial hair (if applicable)

### PHASE 3: Surgical Integration

#### GOLDEN RULE 1: CANVAS INTANGIBILITY
**DO NOT** alter, regenerate, or reinterpret:
- ✗ The image background
- ✗ The body pose
- ✗ Clothing and accessories
- ✗ Composition and framing
- ✗ Original photographic style
- ✗ Film grain or digital texture
- ✗ General atmosphere
- ✗ Environmental elements

#### GOLDEN RULE 2: INVISIBLE FUSION
The transfer must be **imperceptible**. The final result must look like a single, original camera capture.

#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY
- Organically adjust the dimensions of the head, neck, and shoulders.
- Head size must match the body's natural complexion and proportions.
- Prevent the face from looking "pasted on," too large, or too small.
- Maintain realistic and credible proportions.
- The neck line must flow naturally from the new face.

### PHASE 4: Visual Coherence (CRITICAL)

#### A. SKIN AND TONE
- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.
- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.
- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.
- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.

#### B. GLOBAL LIGHTING
- **Light Direction**: Identify and exactly replicate the direction of the main light source.
- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.
- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.
- **Color Temperature**: Maintain the same chromatic warmth/coolness.
- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.

#### C. ADVANCED PHOTOGRAPHIC DETAILS
- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.
- **Grain/Noise**: Apply the identical film grain or digital noise pattern.
- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.
- **Selective Focus**: Maintain sharpness exactly where it was originally.
- **Vignetting**: Preserve any natural edge darkening.

### PHASE 5: Quality Verification

#### Control Checklist:
- [ ] The face looks like a natural part of the original body.
- [ ] The neck line flows without interruptions.
- [ ] Skin tone is uniform across the entire figure.
- [ ] Shadows match the original light direction.
- [ ] Ocular reflections show the correct light sources.
- [ ] Hair integrates naturally (if transferred).
- [ ] Head-to-body proportions are realistic.
- [ ] No elements have been regenerated or invented.
- [ ] Photographic style remains completely intact.
- [ ] The image looks like a single, original camera capture.

---

## Special Considerations

### For Images with Couples:
- If Image 1 contains two people, the user must specify which face to replace.
- Maintain the spatial relationship between both subjects.
- Preserve the visual and emotional interaction between them.
- Ensure the transferred face does not disrupt the composition's dynamics.

### For Cross-Gender Transfers:
- When transferring from male to female or vice versa, subtly adjust:
  - Jawline and cheekbone structure
  - Hair volume and shape
  - Facial proportions (without exaggeration)
- Maintain naturalness and avoid stereotypes.

### For Makeup and Accessories:
- **Preserve** any makeup, jewelry, or accessories present in Image 1.
- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.
- **Do not invent** makeup or accessories that did not exist in either image.

---

## Recommended Technical Parameters

### Output Quality:
- **Resolution**: Maintain the original resolution of Image 1.
- **Format**: Preserve the original format (RAW, JPEG, PNG).
- **Compression**: Do not add additional compression artifacts.
- **Metadata**: Preserve when possible.

### Realism Levels:
- **Skin**: Visible pores, natural imperfections, subtle tone variations.
- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.
- **Lips**: Moist texture, light reflections, natural creases.
- **Hair**: Individual hair strands visible at the edges, realistic light highlights.

---

## Common Errors to Avoid

### ❌ STRICTLY PROHIBITED:
- Reinterpreting or changing the pose.
- Regenerating background elements.
- Inventing additional lighting.
- Changing the photographic style.
- Altering the composition.
- Creating visible skin transitions.
- Making the face look overly "perfect" or "plastic".
- Losing natural skin texture.
- Disproportionating head vs. body.
- Creating inconsistent shadows.

### ✅ ALWAYS REQUIRED:
- Respect the integrity of Image 1.
- Maintain lighting coherence.
- Preserve original texture and grain.
- Verify anatomical proportions.
- Ensure invisible fusion.
- Maintain photographic quality.

---

## Response Format

When completing the transfer, provide:
1. The final image with the transferred identity.
2. A brief confirmation that all rules were followed.
3. A note on any proportional adjustments made (if applicable).

**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.

---

## Usage Example

**User**: "I want to transfer the face from Image 2 to Image 1."

**System**: 
1. Analyzes Image 1 (base canvas).
2. Extracts identity from Image 2 (reference face).
3. Performs surgical fusion following all rules.
4. Verifies visual coherence.
5. Delivers the final result.

---

*Version: 1.0*
*Last Updated: September 2026*
*Optimized for: Professional photography, high-end portraits, advertising campaigns*"

<!-- api-example-tabs-slot -->

<!-- ## API examples -->
## Generate via API

### curl

```curl
curl -X POST https://runapi.ai/api/v1/runapi/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "prompt": "---\nname: skill-high-precision-facial-identity-transfer-faceswap-pro\ndescription: A specialized skill for high-end digital photo retouching and surgical facial identity t\n---\n\n# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)\n\n## Description\nA specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.\n\n## Activation Triggers\nThis skill is activated when the user requests:\n- Face replacement or identity transfer in an image\n- \"Face swap\" or face blending\n- Changing the model/protagonist while preserving the original scene\n- Adapting a reference face to an existing composition\n\n## Required Parameters\n- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.\n- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.\n\n*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.\n\n---\n\n## System Role\nAct as an expert in high-end digital photo retouching specializing in:\n- Surgical facial identity transfer\n- Lighting and colorimetry matching\n- Proportional anatomical reconstruction\n- Preservation of original photographic characteristics\n\n## Execution Instructions\n\n### PHASE 1: Base Canvas Analysis (Image 1)\n1. **Identify and catalog all untouchable elements**:\n   - Exact composition and framing\n   - Body pose and expression\n   - Clothing, accessories, and jewelry\n   - Background and environmental elements\n   - Photographic style (digital, analog, film grain, filters)\n   - Direction and intensity of the main lighting\n   - Depth of field and bokeh\n   - Color temperature and white balance\n   - Optical qualities (subtle chromatic aberrations, natural vignetting)\n\n2. **Analyze the current subject's anatomy**:\n   - Head-to-body proportions\n   - Visible bone structure\n   - Neck and shoulder line\n   - Ear position (if visible)\n\n### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)\n1. **Extract only these facial elements**:\n   - Complete bone structure (forehead, cheekbones, jawline, chin)\n   - Facial proportions (interocular distance, nose width, mouth size)\n   - Specific features (eye shape, nose type, lips, eyebrows)\n   - Skin texture (pores, moles, natural imperfections)\n   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)\n   - Facial skin tone and undertones\n\n2. **Extract hair elements (if applicable)**:\n   - Shape, volume, and texture of the hair\n   - Exact color and gradients\n   - Hairstyle and styling\n   - Hairline\n   - Eyebrows and facial hair (if applicable)\n\n### PHASE 3: Surgical Integration\n\n#### GOLDEN RULE 1: CANVAS INTANGIBILITY\n**DO NOT** alter, regenerate, or reinterpret:\n- ✗ The image background\n- ✗ The body pose\n- ✗ Clothing and accessories\n- ✗ Composition and framing\n- ✗ Original photographic style\n- ✗ Film grain or digital texture\n- ✗ General atmosphere\n- ✗ Environmental elements\n\n#### GOLDEN RULE 2: INVISIBLE FUSION\nThe transfer must be **imperceptible**. The final result must look like a single, original camera capture.\n\n#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY\n- Organically adjust the dimensions of the head, neck, and shoulders.\n- Head size must match the body's natural complexion and proportions.\n- Prevent the face from looking \"pasted on,\" too large, or too small.\n- Maintain realistic and credible proportions.\n- The neck line must flow naturally from the new face.\n\n### PHASE 4: Visual Coherence (CRITICAL)\n\n#### A. SKIN AND TONE\n- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.\n- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.\n- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.\n- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.\n\n#### B. GLOBAL LIGHTING\n- **Light Direction**: Identify and exactly replicate the direction of the main light source.\n- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.\n- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.\n- **Color Temperature**: Maintain the same chromatic warmth/coolness.\n- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.\n\n#### C. ADVANCED PHOTOGRAPHIC DETAILS\n- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.\n- **Grain/Noise**: Apply the identical film grain or digital noise pattern.\n- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.\n- **Selective Focus**: Maintain sharpness exactly where it was originally.\n- **Vignetting**: Preserve any natural edge darkening.\n\n### PHASE 5: Quality Verification\n\n#### Control Checklist:\n- [ ] The face looks like a natural part of the original body.\n- [ ] The neck line flows without interruptions.\n- [ ] Skin tone is uniform across the entire figure.\n- [ ] Shadows match the original light direction.\n- [ ] Ocular reflections show the correct light sources.\n- [ ] Hair integrates naturally (if transferred).\n- [ ] Head-to-body proportions are realistic.\n- [ ] No elements have been regenerated or invented.\n- [ ] Photographic style remains completely intact.\n- [ ] The image looks like a single, original camera capture.\n\n---\n\n## Special Considerations\n\n### For Images with Couples:\n- If Image 1 contains two people, the user must specify which face to replace.\n- Maintain the spatial relationship between both subjects.\n- Preserve the visual and emotional interaction between them.\n- Ensure the transferred face does not disrupt the composition's dynamics.\n\n### For Cross-Gender Transfers:\n- When transferring from male to female or vice versa, subtly adjust:\n  - Jawline and cheekbone structure\n  - Hair volume and shape\n  - Facial proportions (without exaggeration)\n- Maintain naturalness and avoid stereotypes.\n\n### For Makeup and Accessories:\n- **Preserve** any makeup, jewelry, or accessories present in Image 1.\n- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.\n- **Do not invent** makeup or accessories that did not exist in either image.\n\n---\n\n## Recommended Technical Parameters\n\n### Output Quality:\n- **Resolution**: Maintain the original resolution of Image 1.\n- **Format**: Preserve the original format (RAW, JPEG, PNG).\n- **Compression**: Do not add additional compression artifacts.\n- **Metadata**: Preserve when possible.\n\n### Realism Levels:\n- **Skin**: Visible pores, natural imperfections, subtle tone variations.\n- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.\n- **Lips**: Moist texture, light reflections, natural creases.\n- **Hair**: Individual hair strands visible at the edges, realistic light highlights.\n\n---\n\n## Common Errors to Avoid\n\n### ❌ STRICTLY PROHIBITED:\n- Reinterpreting or changing the pose.\n- Regenerating background elements.\n- Inventing additional lighting.\n- Changing the photographic style.\n- Altering the composition.\n- Creating visible skin transitions.\n- Making the face look overly \"perfect\" or \"plastic\".\n- Losing natural skin texture.\n- Disproportionating head vs. body.\n- Creating inconsistent shadows.\n\n### ✅ ALWAYS REQUIRED:\n- Respect the integrity of Image 1.\n- Maintain lighting coherence.\n- Preserve original texture and grain.\n- Verify anatomical proportions.\n- Ensure invisible fusion.\n- Maintain photographic quality.\n\n---\n\n## Response Format\n\nWhen completing the transfer, provide:\n1. The final image with the transferred identity.\n2. A brief confirmation that all rules were followed.\n3. A note on any proportional adjustments made (if applicable).\n\n**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.\n\n---\n\n## Usage Example\n\n**User**: \"I want to transfer the face from Image 2 to Image 1.\"\n\n**System**: \n1. Analyzes Image 1 (base canvas).\n2. Extracts identity from Image 2 (reference face).\n3. Performs surgical fusion following all rules.\n4. Verifies visual coherence.\n5. Delivers the final result.\n\n---\n\n*Version: 1.0*\n*Last Updated: September 2026*\n*Optimized for: Professional photography, high-end portraits, advertising campaigns*"
}
JSON
```

### Node.js

```javascript
import { RunapiClient } from "@runapi.ai/runapi";

const client = new RunapiClient({
  apiKey: process.env.RUNAPI_API_KEY,
});

const result = await client.textToImage.run({
  "prompt": "---\nname: skill-high-precision-facial-identity-transfer-faceswap-pro\ndescription: A specialized skill for high-end digital photo retouching and surgical facial identity t\n---\n\n# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)\n\n## Description\nA specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.\n\n## Activation Triggers\nThis skill is activated when the user requests:\n- Face replacement or identity transfer in an image\n- \"Face swap\" or face blending\n- Changing the model/protagonist while preserving the original scene\n- Adapting a reference face to an existing composition\n\n## Required Parameters\n- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.\n- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.\n\n*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.\n\n---\n\n## System Role\nAct as an expert in high-end digital photo retouching specializing in:\n- Surgical facial identity transfer\n- Lighting and colorimetry matching\n- Proportional anatomical reconstruction\n- Preservation of original photographic characteristics\n\n## Execution Instructions\n\n### PHASE 1: Base Canvas Analysis (Image 1)\n1. **Identify and catalog all untouchable elements**:\n   - Exact composition and framing\n   - Body pose and expression\n   - Clothing, accessories, and jewelry\n   - Background and environmental elements\n   - Photographic style (digital, analog, film grain, filters)\n   - Direction and intensity of the main lighting\n   - Depth of field and bokeh\n   - Color temperature and white balance\n   - Optical qualities (subtle chromatic aberrations, natural vignetting)\n\n2. **Analyze the current subject's anatomy**:\n   - Head-to-body proportions\n   - Visible bone structure\n   - Neck and shoulder line\n   - Ear position (if visible)\n\n### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)\n1. **Extract only these facial elements**:\n   - Complete bone structure (forehead, cheekbones, jawline, chin)\n   - Facial proportions (interocular distance, nose width, mouth size)\n   - Specific features (eye shape, nose type, lips, eyebrows)\n   - Skin texture (pores, moles, natural imperfections)\n   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)\n   - Facial skin tone and undertones\n\n2. **Extract hair elements (if applicable)**:\n   - Shape, volume, and texture of the hair\n   - Exact color and gradients\n   - Hairstyle and styling\n   - Hairline\n   - Eyebrows and facial hair (if applicable)\n\n### PHASE 3: Surgical Integration\n\n#### GOLDEN RULE 1: CANVAS INTANGIBILITY\n**DO NOT** alter, regenerate, or reinterpret:\n- ✗ The image background\n- ✗ The body pose\n- ✗ Clothing and accessories\n- ✗ Composition and framing\n- ✗ Original photographic style\n- ✗ Film grain or digital texture\n- ✗ General atmosphere\n- ✗ Environmental elements\n\n#### GOLDEN RULE 2: INVISIBLE FUSION\nThe transfer must be **imperceptible**. The final result must look like a single, original camera capture.\n\n#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY\n- Organically adjust the dimensions of the head, neck, and shoulders.\n- Head size must match the body's natural complexion and proportions.\n- Prevent the face from looking \"pasted on,\" too large, or too small.\n- Maintain realistic and credible proportions.\n- The neck line must flow naturally from the new face.\n\n### PHASE 4: Visual Coherence (CRITICAL)\n\n#### A. SKIN AND TONE\n- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.\n- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.\n- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.\n- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.\n\n#### B. GLOBAL LIGHTING\n- **Light Direction**: Identify and exactly replicate the direction of the main light source.\n- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.\n- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.\n- **Color Temperature**: Maintain the same chromatic warmth/coolness.\n- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.\n\n#### C. ADVANCED PHOTOGRAPHIC DETAILS\n- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.\n- **Grain/Noise**: Apply the identical film grain or digital noise pattern.\n- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.\n- **Selective Focus**: Maintain sharpness exactly where it was originally.\n- **Vignetting**: Preserve any natural edge darkening.\n\n### PHASE 5: Quality Verification\n\n#### Control Checklist:\n- [ ] The face looks like a natural part of the original body.\n- [ ] The neck line flows without interruptions.\n- [ ] Skin tone is uniform across the entire figure.\n- [ ] Shadows match the original light direction.\n- [ ] Ocular reflections show the correct light sources.\n- [ ] Hair integrates naturally (if transferred).\n- [ ] Head-to-body proportions are realistic.\n- [ ] No elements have been regenerated or invented.\n- [ ] Photographic style remains completely intact.\n- [ ] The image looks like a single, original camera capture.\n\n---\n\n## Special Considerations\n\n### For Images with Couples:\n- If Image 1 contains two people, the user must specify which face to replace.\n- Maintain the spatial relationship between both subjects.\n- Preserve the visual and emotional interaction between them.\n- Ensure the transferred face does not disrupt the composition's dynamics.\n\n### For Cross-Gender Transfers:\n- When transferring from male to female or vice versa, subtly adjust:\n  - Jawline and cheekbone structure\n  - Hair volume and shape\n  - Facial proportions (without exaggeration)\n- Maintain naturalness and avoid stereotypes.\n\n### For Makeup and Accessories:\n- **Preserve** any makeup, jewelry, or accessories present in Image 1.\n- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.\n- **Do not invent** makeup or accessories that did not exist in either image.\n\n---\n\n## Recommended Technical Parameters\n\n### Output Quality:\n- **Resolution**: Maintain the original resolution of Image 1.\n- **Format**: Preserve the original format (RAW, JPEG, PNG).\n- **Compression**: Do not add additional compression artifacts.\n- **Metadata**: Preserve when possible.\n\n### Realism Levels:\n- **Skin**: Visible pores, natural imperfections, subtle tone variations.\n- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.\n- **Lips**: Moist texture, light reflections, natural creases.\n- **Hair**: Individual hair strands visible at the edges, realistic light highlights.\n\n---\n\n## Common Errors to Avoid\n\n### ❌ STRICTLY PROHIBITED:\n- Reinterpreting or changing the pose.\n- Regenerating background elements.\n- Inventing additional lighting.\n- Changing the photographic style.\n- Altering the composition.\n- Creating visible skin transitions.\n- Making the face look overly \"perfect\" or \"plastic\".\n- Losing natural skin texture.\n- Disproportionating head vs. body.\n- Creating inconsistent shadows.\n\n### ✅ ALWAYS REQUIRED:\n- Respect the integrity of Image 1.\n- Maintain lighting coherence.\n- Preserve original texture and grain.\n- Verify anatomical proportions.\n- Ensure invisible fusion.\n- Maintain photographic quality.\n\n---\n\n## Response Format\n\nWhen completing the transfer, provide:\n1. The final image with the transferred identity.\n2. A brief confirmation that all rules were followed.\n3. A note on any proportional adjustments made (if applicable).\n\n**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.\n\n---\n\n## Usage Example\n\n**User**: \"I want to transfer the face from Image 2 to Image 1.\"\n\n**System**: \n1. Analyzes Image 1 (base canvas).\n2. Extracts identity from Image 2 (reference face).\n3. Performs surgical fusion following all rules.\n4. Verifies visual coherence.\n5. Delivers the final result.\n\n---\n\n*Version: 1.0*\n*Last Updated: September 2026*\n*Optimized for: Professional photography, high-end portraits, advertising campaigns*"
});
console.log(result.id);
```

### Python

```python
import json
import os
import requests

response = requests.post(
    "https://runapi.ai/api/v1/runapi/text_to_image",
    headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
    json=json.loads("{\n  \"prompt\": \"---\\nname: skill-high-precision-facial-identity-transfer-faceswap-pro\\ndescription: A specialized skill for high-end digital photo retouching and surgical facial identity t\\n---\\n\\n# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)\\n\\n## Description\\nA specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.\\n\\n## Activation Triggers\\nThis skill is activated when the user requests:\\n- Face replacement or identity transfer in an image\\n- \\\"Face swap\\\" or face blending\\n- Changing the model/protagonist while preserving the original scene\\n- Adapting a reference face to an existing composition\\n\\n## Required Parameters\\n- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.\\n- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.\\n\\n*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.\\n\\n---\\n\\n## System Role\\nAct as an expert in high-end digital photo retouching specializing in:\\n- Surgical facial identity transfer\\n- Lighting and colorimetry matching\\n- Proportional anatomical reconstruction\\n- Preservation of original photographic characteristics\\n\\n## Execution Instructions\\n\\n### PHASE 1: Base Canvas Analysis (Image 1)\\n1. **Identify and catalog all untouchable elements**:\\n   - Exact composition and framing\\n   - Body pose and expression\\n   - Clothing, accessories, and jewelry\\n   - Background and environmental elements\\n   - Photographic style (digital, analog, film grain, filters)\\n   - Direction and intensity of the main lighting\\n   - Depth of field and bokeh\\n   - Color temperature and white balance\\n   - Optical qualities (subtle chromatic aberrations, natural vignetting)\\n\\n2. **Analyze the current subject's anatomy**:\\n   - Head-to-body proportions\\n   - Visible bone structure\\n   - Neck and shoulder line\\n   - Ear position (if visible)\\n\\n### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)\\n1. **Extract only these facial elements**:\\n   - Complete bone structure (forehead, cheekbones, jawline, chin)\\n   - Facial proportions (interocular distance, nose width, mouth size)\\n   - Specific features (eye shape, nose type, lips, eyebrows)\\n   - Skin texture (pores, moles, natural imperfections)\\n   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)\\n   - Facial skin tone and undertones\\n\\n2. **Extract hair elements (if applicable)**:\\n   - Shape, volume, and texture of the hair\\n   - Exact color and gradients\\n   - Hairstyle and styling\\n   - Hairline\\n   - Eyebrows and facial hair (if applicable)\\n\\n### PHASE 3: Surgical Integration\\n\\n#### GOLDEN RULE 1: CANVAS INTANGIBILITY\\n**DO NOT** alter, regenerate, or reinterpret:\\n- ✗ The image background\\n- ✗ The body pose\\n- ✗ Clothing and accessories\\n- ✗ Composition and framing\\n- ✗ Original photographic style\\n- ✗ Film grain or digital texture\\n- ✗ General atmosphere\\n- ✗ Environmental elements\\n\\n#### GOLDEN RULE 2: INVISIBLE FUSION\\nThe transfer must be **imperceptible**. The final result must look like a single, original camera capture.\\n\\n#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY\\n- Organically adjust the dimensions of the head, neck, and shoulders.\\n- Head size must match the body's natural complexion and proportions.\\n- Prevent the face from looking \\\"pasted on,\\\" too large, or too small.\\n- Maintain realistic and credible proportions.\\n- The neck line must flow naturally from the new face.\\n\\n### PHASE 4: Visual Coherence (CRITICAL)\\n\\n#### A. SKIN AND TONE\\n- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.\\n- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.\\n- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.\\n- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.\\n\\n#### B. GLOBAL LIGHTING\\n- **Light Direction**: Identify and exactly replicate the direction of the main light source.\\n- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.\\n- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.\\n- **Color Temperature**: Maintain the same chromatic warmth/coolness.\\n- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.\\n\\n#### C. ADVANCED PHOTOGRAPHIC DETAILS\\n- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.\\n- **Grain/Noise**: Apply the identical film grain or digital noise pattern.\\n- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.\\n- **Selective Focus**: Maintain sharpness exactly where it was originally.\\n- **Vignetting**: Preserve any natural edge darkening.\\n\\n### PHASE 5: Quality Verification\\n\\n#### Control Checklist:\\n- [ ] The face looks like a natural part of the original body.\\n- [ ] The neck line flows without interruptions.\\n- [ ] Skin tone is uniform across the entire figure.\\n- [ ] Shadows match the original light direction.\\n- [ ] Ocular reflections show the correct light sources.\\n- [ ] Hair integrates naturally (if transferred).\\n- [ ] Head-to-body proportions are realistic.\\n- [ ] No elements have been regenerated or invented.\\n- [ ] Photographic style remains completely intact.\\n- [ ] The image looks like a single, original camera capture.\\n\\n---\\n\\n## Special Considerations\\n\\n### For Images with Couples:\\n- If Image 1 contains two people, the user must specify which face to replace.\\n- Maintain the spatial relationship between both subjects.\\n- Preserve the visual and emotional interaction between them.\\n- Ensure the transferred face does not disrupt the composition's dynamics.\\n\\n### For Cross-Gender Transfers:\\n- When transferring from male to female or vice versa, subtly adjust:\\n  - Jawline and cheekbone structure\\n  - Hair volume and shape\\n  - Facial proportions (without exaggeration)\\n- Maintain naturalness and avoid stereotypes.\\n\\n### For Makeup and Accessories:\\n- **Preserve** any makeup, jewelry, or accessories present in Image 1.\\n- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.\\n- **Do not invent** makeup or accessories that did not exist in either image.\\n\\n---\\n\\n## Recommended Technical Parameters\\n\\n### Output Quality:\\n- **Resolution**: Maintain the original resolution of Image 1.\\n- **Format**: Preserve the original format (RAW, JPEG, PNG).\\n- **Compression**: Do not add additional compression artifacts.\\n- **Metadata**: Preserve when possible.\\n\\n### Realism Levels:\\n- **Skin**: Visible pores, natural imperfections, subtle tone variations.\\n- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.\\n- **Lips**: Moist texture, light reflections, natural creases.\\n- **Hair**: Individual hair strands visible at the edges, realistic light highlights.\\n\\n---\\n\\n## Common Errors to Avoid\\n\\n### ❌ STRICTLY PROHIBITED:\\n- Reinterpreting or changing the pose.\\n- Regenerating background elements.\\n- Inventing additional lighting.\\n- Changing the photographic style.\\n- Altering the composition.\\n- Creating visible skin transitions.\\n- Making the face look overly \\\"perfect\\\" or \\\"plastic\\\".\\n- Losing natural skin texture.\\n- Disproportionating head vs. body.\\n- Creating inconsistent shadows.\\n\\n### ✅ ALWAYS REQUIRED:\\n- Respect the integrity of Image 1.\\n- Maintain lighting coherence.\\n- Preserve original texture and grain.\\n- Verify anatomical proportions.\\n- Ensure invisible fusion.\\n- Maintain photographic quality.\\n\\n---\\n\\n## Response Format\\n\\nWhen completing the transfer, provide:\\n1. The final image with the transferred identity.\\n2. A brief confirmation that all rules were followed.\\n3. A note on any proportional adjustments made (if applicable).\\n\\n**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.\\n\\n---\\n\\n## Usage Example\\n\\n**User**: \\\"I want to transfer the face from Image 2 to Image 1.\\\"\\n\\n**System**: \\n1. Analyzes Image 1 (base canvas).\\n2. Extracts identity from Image 2 (reference face).\\n3. Performs surgical fusion following all rules.\\n4. Verifies visual coherence.\\n5. Delivers the final result.\\n\\n---\\n\\n*Version: 1.0*\\n*Last Updated: September 2026*\\n*Optimized for: Professional photography, high-end portraits, advertising campaigns*\"\n}")
)
response.raise_for_status()
print(response.json()["id"])
```

### PHP

```php
<?php

$ch = curl_init("https://runapi.ai/api/v1/runapi/text_to_image");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RUNAPI_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => "{\n  \"prompt\": \"---\\nname: skill-high-precision-facial-identity-transfer-faceswap-pro\\ndescription: A specialized skill for high-end digital photo retouching and surgical facial identity t\\n---\\n\\n# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)\\n\\n## Description\\nA specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.\\n\\n## Activation Triggers\\nThis skill is activated when the user requests:\\n- Face replacement or identity transfer in an image\\n- \\\"Face swap\\\" or face blending\\n- Changing the model/protagonist while preserving the original scene\\n- Adapting a reference face to an existing composition\\n\\n## Required Parameters\\n- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.\\n- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.\\n\\n*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.\\n\\n---\\n\\n## System Role\\nAct as an expert in high-end digital photo retouching specializing in:\\n- Surgical facial identity transfer\\n- Lighting and colorimetry matching\\n- Proportional anatomical reconstruction\\n- Preservation of original photographic characteristics\\n\\n## Execution Instructions\\n\\n### PHASE 1: Base Canvas Analysis (Image 1)\\n1. **Identify and catalog all untouchable elements**:\\n   - Exact composition and framing\\n   - Body pose and expression\\n   - Clothing, accessories, and jewelry\\n   - Background and environmental elements\\n   - Photographic style (digital, analog, film grain, filters)\\n   - Direction and intensity of the main lighting\\n   - Depth of field and bokeh\\n   - Color temperature and white balance\\n   - Optical qualities (subtle chromatic aberrations, natural vignetting)\\n\\n2. **Analyze the current subject's anatomy**:\\n   - Head-to-body proportions\\n   - Visible bone structure\\n   - Neck and shoulder line\\n   - Ear position (if visible)\\n\\n### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)\\n1. **Extract only these facial elements**:\\n   - Complete bone structure (forehead, cheekbones, jawline, chin)\\n   - Facial proportions (interocular distance, nose width, mouth size)\\n   - Specific features (eye shape, nose type, lips, eyebrows)\\n   - Skin texture (pores, moles, natural imperfections)\\n   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)\\n   - Facial skin tone and undertones\\n\\n2. **Extract hair elements (if applicable)**:\\n   - Shape, volume, and texture of the hair\\n   - Exact color and gradients\\n   - Hairstyle and styling\\n   - Hairline\\n   - Eyebrows and facial hair (if applicable)\\n\\n### PHASE 3: Surgical Integration\\n\\n#### GOLDEN RULE 1: CANVAS INTANGIBILITY\\n**DO NOT** alter, regenerate, or reinterpret:\\n- ✗ The image background\\n- ✗ The body pose\\n- ✗ Clothing and accessories\\n- ✗ Composition and framing\\n- ✗ Original photographic style\\n- ✗ Film grain or digital texture\\n- ✗ General atmosphere\\n- ✗ Environmental elements\\n\\n#### GOLDEN RULE 2: INVISIBLE FUSION\\nThe transfer must be **imperceptible**. The final result must look like a single, original camera capture.\\n\\n#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY\\n- Organically adjust the dimensions of the head, neck, and shoulders.\\n- Head size must match the body's natural complexion and proportions.\\n- Prevent the face from looking \\\"pasted on,\\\" too large, or too small.\\n- Maintain realistic and credible proportions.\\n- The neck line must flow naturally from the new face.\\n\\n### PHASE 4: Visual Coherence (CRITICAL)\\n\\n#### A. SKIN AND TONE\\n- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.\\n- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.\\n- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.\\n- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.\\n\\n#### B. GLOBAL LIGHTING\\n- **Light Direction**: Identify and exactly replicate the direction of the main light source.\\n- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.\\n- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.\\n- **Color Temperature**: Maintain the same chromatic warmth/coolness.\\n- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.\\n\\n#### C. ADVANCED PHOTOGRAPHIC DETAILS\\n- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.\\n- **Grain/Noise**: Apply the identical film grain or digital noise pattern.\\n- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.\\n- **Selective Focus**: Maintain sharpness exactly where it was originally.\\n- **Vignetting**: Preserve any natural edge darkening.\\n\\n### PHASE 5: Quality Verification\\n\\n#### Control Checklist:\\n- [ ] The face looks like a natural part of the original body.\\n- [ ] The neck line flows without interruptions.\\n- [ ] Skin tone is uniform across the entire figure.\\n- [ ] Shadows match the original light direction.\\n- [ ] Ocular reflections show the correct light sources.\\n- [ ] Hair integrates naturally (if transferred).\\n- [ ] Head-to-body proportions are realistic.\\n- [ ] No elements have been regenerated or invented.\\n- [ ] Photographic style remains completely intact.\\n- [ ] The image looks like a single, original camera capture.\\n\\n---\\n\\n## Special Considerations\\n\\n### For Images with Couples:\\n- If Image 1 contains two people, the user must specify which face to replace.\\n- Maintain the spatial relationship between both subjects.\\n- Preserve the visual and emotional interaction between them.\\n- Ensure the transferred face does not disrupt the composition's dynamics.\\n\\n### For Cross-Gender Transfers:\\n- When transferring from male to female or vice versa, subtly adjust:\\n  - Jawline and cheekbone structure\\n  - Hair volume and shape\\n  - Facial proportions (without exaggeration)\\n- Maintain naturalness and avoid stereotypes.\\n\\n### For Makeup and Accessories:\\n- **Preserve** any makeup, jewelry, or accessories present in Image 1.\\n- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.\\n- **Do not invent** makeup or accessories that did not exist in either image.\\n\\n---\\n\\n## Recommended Technical Parameters\\n\\n### Output Quality:\\n- **Resolution**: Maintain the original resolution of Image 1.\\n- **Format**: Preserve the original format (RAW, JPEG, PNG).\\n- **Compression**: Do not add additional compression artifacts.\\n- **Metadata**: Preserve when possible.\\n\\n### Realism Levels:\\n- **Skin**: Visible pores, natural imperfections, subtle tone variations.\\n- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.\\n- **Lips**: Moist texture, light reflections, natural creases.\\n- **Hair**: Individual hair strands visible at the edges, realistic light highlights.\\n\\n---\\n\\n## Common Errors to Avoid\\n\\n### ❌ STRICTLY PROHIBITED:\\n- Reinterpreting or changing the pose.\\n- Regenerating background elements.\\n- Inventing additional lighting.\\n- Changing the photographic style.\\n- Altering the composition.\\n- Creating visible skin transitions.\\n- Making the face look overly \\\"perfect\\\" or \\\"plastic\\\".\\n- Losing natural skin texture.\\n- Disproportionating head vs. body.\\n- Creating inconsistent shadows.\\n\\n### ✅ ALWAYS REQUIRED:\\n- Respect the integrity of Image 1.\\n- Maintain lighting coherence.\\n- Preserve original texture and grain.\\n- Verify anatomical proportions.\\n- Ensure invisible fusion.\\n- Maintain photographic quality.\\n\\n---\\n\\n## Response Format\\n\\nWhen completing the transfer, provide:\\n1. The final image with the transferred identity.\\n2. A brief confirmation that all rules were followed.\\n3. A note on any proportional adjustments made (if applicable).\\n\\n**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.\\n\\n---\\n\\n## Usage Example\\n\\n**User**: \\\"I want to transfer the face from Image 2 to Image 1.\\\"\\n\\n**System**: \\n1. Analyzes Image 1 (base canvas).\\n2. Extracts identity from Image 2 (reference face).\\n3. Performs surgical fusion following all rules.\\n4. Verifies visual coherence.\\n5. Delivers the final result.\\n\\n---\\n\\n*Version: 1.0*\\n*Last Updated: September 2026*\\n*Optimized for: Professional photography, high-end portraits, advertising campaigns*\"\n}",
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $response["id"] . PHP_EOL;
```

### Java

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var request = HttpRequest.newBuilder(URI.create("https://runapi.ai/api/v1/runapi/text_to_image"))
    .header("Authorization", "Bearer " + System.getenv("RUNAPI_API_KEY"))
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString("{\n  \"prompt\": \"---\\nname: skill-high-precision-facial-identity-transfer-faceswap-pro\\ndescription: A specialized skill for high-end digital photo retouching and surgical facial identity t\\n---\\n\\n# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)\\n\\n## Description\\nA specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.\\n\\n## Activation Triggers\\nThis skill is activated when the user requests:\\n- Face replacement or identity transfer in an image\\n- \\\"Face swap\\\" or face blending\\n- Changing the model/protagonist while preserving the original scene\\n- Adapting a reference face to an existing composition\\n\\n## Required Parameters\\n- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.\\n- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.\\n\\n*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.\\n\\n---\\n\\n## System Role\\nAct as an expert in high-end digital photo retouching specializing in:\\n- Surgical facial identity transfer\\n- Lighting and colorimetry matching\\n- Proportional anatomical reconstruction\\n- Preservation of original photographic characteristics\\n\\n## Execution Instructions\\n\\n### PHASE 1: Base Canvas Analysis (Image 1)\\n1. **Identify and catalog all untouchable elements**:\\n   - Exact composition and framing\\n   - Body pose and expression\\n   - Clothing, accessories, and jewelry\\n   - Background and environmental elements\\n   - Photographic style (digital, analog, film grain, filters)\\n   - Direction and intensity of the main lighting\\n   - Depth of field and bokeh\\n   - Color temperature and white balance\\n   - Optical qualities (subtle chromatic aberrations, natural vignetting)\\n\\n2. **Analyze the current subject's anatomy**:\\n   - Head-to-body proportions\\n   - Visible bone structure\\n   - Neck and shoulder line\\n   - Ear position (if visible)\\n\\n### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)\\n1. **Extract only these facial elements**:\\n   - Complete bone structure (forehead, cheekbones, jawline, chin)\\n   - Facial proportions (interocular distance, nose width, mouth size)\\n   - Specific features (eye shape, nose type, lips, eyebrows)\\n   - Skin texture (pores, moles, natural imperfections)\\n   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)\\n   - Facial skin tone and undertones\\n\\n2. **Extract hair elements (if applicable)**:\\n   - Shape, volume, and texture of the hair\\n   - Exact color and gradients\\n   - Hairstyle and styling\\n   - Hairline\\n   - Eyebrows and facial hair (if applicable)\\n\\n### PHASE 3: Surgical Integration\\n\\n#### GOLDEN RULE 1: CANVAS INTANGIBILITY\\n**DO NOT** alter, regenerate, or reinterpret:\\n- ✗ The image background\\n- ✗ The body pose\\n- ✗ Clothing and accessories\\n- ✗ Composition and framing\\n- ✗ Original photographic style\\n- ✗ Film grain or digital texture\\n- ✗ General atmosphere\\n- ✗ Environmental elements\\n\\n#### GOLDEN RULE 2: INVISIBLE FUSION\\nThe transfer must be **imperceptible**. The final result must look like a single, original camera capture.\\n\\n#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY\\n- Organically adjust the dimensions of the head, neck, and shoulders.\\n- Head size must match the body's natural complexion and proportions.\\n- Prevent the face from looking \\\"pasted on,\\\" too large, or too small.\\n- Maintain realistic and credible proportions.\\n- The neck line must flow naturally from the new face.\\n\\n### PHASE 4: Visual Coherence (CRITICAL)\\n\\n#### A. SKIN AND TONE\\n- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.\\n- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.\\n- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.\\n- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.\\n\\n#### B. GLOBAL LIGHTING\\n- **Light Direction**: Identify and exactly replicate the direction of the main light source.\\n- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.\\n- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.\\n- **Color Temperature**: Maintain the same chromatic warmth/coolness.\\n- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.\\n\\n#### C. ADVANCED PHOTOGRAPHIC DETAILS\\n- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.\\n- **Grain/Noise**: Apply the identical film grain or digital noise pattern.\\n- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.\\n- **Selective Focus**: Maintain sharpness exactly where it was originally.\\n- **Vignetting**: Preserve any natural edge darkening.\\n\\n### PHASE 5: Quality Verification\\n\\n#### Control Checklist:\\n- [ ] The face looks like a natural part of the original body.\\n- [ ] The neck line flows without interruptions.\\n- [ ] Skin tone is uniform across the entire figure.\\n- [ ] Shadows match the original light direction.\\n- [ ] Ocular reflections show the correct light sources.\\n- [ ] Hair integrates naturally (if transferred).\\n- [ ] Head-to-body proportions are realistic.\\n- [ ] No elements have been regenerated or invented.\\n- [ ] Photographic style remains completely intact.\\n- [ ] The image looks like a single, original camera capture.\\n\\n---\\n\\n## Special Considerations\\n\\n### For Images with Couples:\\n- If Image 1 contains two people, the user must specify which face to replace.\\n- Maintain the spatial relationship between both subjects.\\n- Preserve the visual and emotional interaction between them.\\n- Ensure the transferred face does not disrupt the composition's dynamics.\\n\\n### For Cross-Gender Transfers:\\n- When transferring from male to female or vice versa, subtly adjust:\\n  - Jawline and cheekbone structure\\n  - Hair volume and shape\\n  - Facial proportions (without exaggeration)\\n- Maintain naturalness and avoid stereotypes.\\n\\n### For Makeup and Accessories:\\n- **Preserve** any makeup, jewelry, or accessories present in Image 1.\\n- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.\\n- **Do not invent** makeup or accessories that did not exist in either image.\\n\\n---\\n\\n## Recommended Technical Parameters\\n\\n### Output Quality:\\n- **Resolution**: Maintain the original resolution of Image 1.\\n- **Format**: Preserve the original format (RAW, JPEG, PNG).\\n- **Compression**: Do not add additional compression artifacts.\\n- **Metadata**: Preserve when possible.\\n\\n### Realism Levels:\\n- **Skin**: Visible pores, natural imperfections, subtle tone variations.\\n- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.\\n- **Lips**: Moist texture, light reflections, natural creases.\\n- **Hair**: Individual hair strands visible at the edges, realistic light highlights.\\n\\n---\\n\\n## Common Errors to Avoid\\n\\n### ❌ STRICTLY PROHIBITED:\\n- Reinterpreting or changing the pose.\\n- Regenerating background elements.\\n- Inventing additional lighting.\\n- Changing the photographic style.\\n- Altering the composition.\\n- Creating visible skin transitions.\\n- Making the face look overly \\\"perfect\\\" or \\\"plastic\\\".\\n- Losing natural skin texture.\\n- Disproportionating head vs. body.\\n- Creating inconsistent shadows.\\n\\n### ✅ ALWAYS REQUIRED:\\n- Respect the integrity of Image 1.\\n- Maintain lighting coherence.\\n- Preserve original texture and grain.\\n- Verify anatomical proportions.\\n- Ensure invisible fusion.\\n- Maintain photographic quality.\\n\\n---\\n\\n## Response Format\\n\\nWhen completing the transfer, provide:\\n1. The final image with the transferred identity.\\n2. A brief confirmation that all rules were followed.\\n3. A note on any proportional adjustments made (if applicable).\\n\\n**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.\\n\\n---\\n\\n## Usage Example\\n\\n**User**: \\\"I want to transfer the face from Image 2 to Image 1.\\\"\\n\\n**System**: \\n1. Analyzes Image 1 (base canvas).\\n2. Extracts identity from Image 2 (reference face).\\n3. Performs surgical fusion following all rules.\\n4. Verifies visual coherence.\\n5. Delivers the final result.\\n\\n---\\n\\n*Version: 1.0*\\n*Last Updated: September 2026*\\n*Optimized for: Professional photography, high-end portraits, advertising campaigns*\"\n}"))
    .build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

### Ruby

```ruby
require "json"
require "net/http"

uri = URI("https://runapi.ai/api/v1/runapi/text_to_image")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer " + ENV.fetch("RUNAPI_API_KEY")
request["Content-Type"] = "application/json"
request.body = "{\n  \"prompt\": \"---\\nname: skill-high-precision-facial-identity-transfer-faceswap-pro\\ndescription: A specialized skill for high-end digital photo retouching and surgical facial identity t\\n---\\n\\n# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)\\n\\n## Description\\nA specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.\\n\\n## Activation Triggers\\nThis skill is activated when the user requests:\\n- Face replacement or identity transfer in an image\\n- \\\"Face swap\\\" or face blending\\n- Changing the model/protagonist while preserving the original scene\\n- Adapting a reference face to an existing composition\\n\\n## Required Parameters\\n- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.\\n- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.\\n\\n*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.\\n\\n---\\n\\n## System Role\\nAct as an expert in high-end digital photo retouching specializing in:\\n- Surgical facial identity transfer\\n- Lighting and colorimetry matching\\n- Proportional anatomical reconstruction\\n- Preservation of original photographic characteristics\\n\\n## Execution Instructions\\n\\n### PHASE 1: Base Canvas Analysis (Image 1)\\n1. **Identify and catalog all untouchable elements**:\\n   - Exact composition and framing\\n   - Body pose and expression\\n   - Clothing, accessories, and jewelry\\n   - Background and environmental elements\\n   - Photographic style (digital, analog, film grain, filters)\\n   - Direction and intensity of the main lighting\\n   - Depth of field and bokeh\\n   - Color temperature and white balance\\n   - Optical qualities (subtle chromatic aberrations, natural vignetting)\\n\\n2. **Analyze the current subject's anatomy**:\\n   - Head-to-body proportions\\n   - Visible bone structure\\n   - Neck and shoulder line\\n   - Ear position (if visible)\\n\\n### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)\\n1. **Extract only these facial elements**:\\n   - Complete bone structure (forehead, cheekbones, jawline, chin)\\n   - Facial proportions (interocular distance, nose width, mouth size)\\n   - Specific features (eye shape, nose type, lips, eyebrows)\\n   - Skin texture (pores, moles, natural imperfections)\\n   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)\\n   - Facial skin tone and undertones\\n\\n2. **Extract hair elements (if applicable)**:\\n   - Shape, volume, and texture of the hair\\n   - Exact color and gradients\\n   - Hairstyle and styling\\n   - Hairline\\n   - Eyebrows and facial hair (if applicable)\\n\\n### PHASE 3: Surgical Integration\\n\\n#### GOLDEN RULE 1: CANVAS INTANGIBILITY\\n**DO NOT** alter, regenerate, or reinterpret:\\n- ✗ The image background\\n- ✗ The body pose\\n- ✗ Clothing and accessories\\n- ✗ Composition and framing\\n- ✗ Original photographic style\\n- ✗ Film grain or digital texture\\n- ✗ General atmosphere\\n- ✗ Environmental elements\\n\\n#### GOLDEN RULE 2: INVISIBLE FUSION\\nThe transfer must be **imperceptible**. The final result must look like a single, original camera capture.\\n\\n#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY\\n- Organically adjust the dimensions of the head, neck, and shoulders.\\n- Head size must match the body's natural complexion and proportions.\\n- Prevent the face from looking \\\"pasted on,\\\" too large, or too small.\\n- Maintain realistic and credible proportions.\\n- The neck line must flow naturally from the new face.\\n\\n### PHASE 4: Visual Coherence (CRITICAL)\\n\\n#### A. SKIN AND TONE\\n- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.\\n- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.\\n- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.\\n- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.\\n\\n#### B. GLOBAL LIGHTING\\n- **Light Direction**: Identify and exactly replicate the direction of the main light source.\\n- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.\\n- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.\\n- **Color Temperature**: Maintain the same chromatic warmth/coolness.\\n- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.\\n\\n#### C. ADVANCED PHOTOGRAPHIC DETAILS\\n- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.\\n- **Grain/Noise**: Apply the identical film grain or digital noise pattern.\\n- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.\\n- **Selective Focus**: Maintain sharpness exactly where it was originally.\\n- **Vignetting**: Preserve any natural edge darkening.\\n\\n### PHASE 5: Quality Verification\\n\\n#### Control Checklist:\\n- [ ] The face looks like a natural part of the original body.\\n- [ ] The neck line flows without interruptions.\\n- [ ] Skin tone is uniform across the entire figure.\\n- [ ] Shadows match the original light direction.\\n- [ ] Ocular reflections show the correct light sources.\\n- [ ] Hair integrates naturally (if transferred).\\n- [ ] Head-to-body proportions are realistic.\\n- [ ] No elements have been regenerated or invented.\\n- [ ] Photographic style remains completely intact.\\n- [ ] The image looks like a single, original camera capture.\\n\\n---\\n\\n## Special Considerations\\n\\n### For Images with Couples:\\n- If Image 1 contains two people, the user must specify which face to replace.\\n- Maintain the spatial relationship between both subjects.\\n- Preserve the visual and emotional interaction between them.\\n- Ensure the transferred face does not disrupt the composition's dynamics.\\n\\n### For Cross-Gender Transfers:\\n- When transferring from male to female or vice versa, subtly adjust:\\n  - Jawline and cheekbone structure\\n  - Hair volume and shape\\n  - Facial proportions (without exaggeration)\\n- Maintain naturalness and avoid stereotypes.\\n\\n### For Makeup and Accessories:\\n- **Preserve** any makeup, jewelry, or accessories present in Image 1.\\n- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.\\n- **Do not invent** makeup or accessories that did not exist in either image.\\n\\n---\\n\\n## Recommended Technical Parameters\\n\\n### Output Quality:\\n- **Resolution**: Maintain the original resolution of Image 1.\\n- **Format**: Preserve the original format (RAW, JPEG, PNG).\\n- **Compression**: Do not add additional compression artifacts.\\n- **Metadata**: Preserve when possible.\\n\\n### Realism Levels:\\n- **Skin**: Visible pores, natural imperfections, subtle tone variations.\\n- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.\\n- **Lips**: Moist texture, light reflections, natural creases.\\n- **Hair**: Individual hair strands visible at the edges, realistic light highlights.\\n\\n---\\n\\n## Common Errors to Avoid\\n\\n### ❌ STRICTLY PROHIBITED:\\n- Reinterpreting or changing the pose.\\n- Regenerating background elements.\\n- Inventing additional lighting.\\n- Changing the photographic style.\\n- Altering the composition.\\n- Creating visible skin transitions.\\n- Making the face look overly \\\"perfect\\\" or \\\"plastic\\\".\\n- Losing natural skin texture.\\n- Disproportionating head vs. body.\\n- Creating inconsistent shadows.\\n\\n### ✅ ALWAYS REQUIRED:\\n- Respect the integrity of Image 1.\\n- Maintain lighting coherence.\\n- Preserve original texture and grain.\\n- Verify anatomical proportions.\\n- Ensure invisible fusion.\\n- Maintain photographic quality.\\n\\n---\\n\\n## Response Format\\n\\nWhen completing the transfer, provide:\\n1. The final image with the transferred identity.\\n2. A brief confirmation that all rules were followed.\\n3. A note on any proportional adjustments made (if applicable).\\n\\n**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.\\n\\n---\\n\\n## Usage Example\\n\\n**User**: \\\"I want to transfer the face from Image 2 to Image 1.\\\"\\n\\n**System**: \\n1. Analyzes Image 1 (base canvas).\\n2. Extracts identity from Image 2 (reference face).\\n3. Performs surgical fusion following all rules.\\n4. Verifies visual coherence.\\n5. Delivers the final result.\\n\\n---\\n\\n*Version: 1.0*\\n*Last Updated: September 2026*\\n*Optimized for: Professional photography, high-end portraits, advertising campaigns*\"\n}"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
puts JSON.parse(response.body).fetch("id")
```

### Go

```go
package main

import (
  "context"
  "fmt"
  "log"
  "net/http"
  "os"
  "strings"
)

func main() {
  body := strings.NewReader("{\"prompt\":\"---\\nname: skill-high-precision-facial-identity-transfer-faceswap-pro\\ndescription: A specialized skill for high-end digital photo retouching and surgical facial identity t\\n---\\n\\n# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)\\n\\n## Description\\nA specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.\\n\\n## Activation Triggers\\nThis skill is activated when the user requests:\\n- Face replacement or identity transfer in an image\\n- \\\"Face swap\\\" or face blending\\n- Changing the model/protagonist while preserving the original scene\\n- Adapting a reference face to an existing composition\\n\\n## Required Parameters\\n- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.\\n- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.\\n\\n*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.\\n\\n---\\n\\n## System Role\\nAct as an expert in high-end digital photo retouching specializing in:\\n- Surgical facial identity transfer\\n- Lighting and colorimetry matching\\n- Proportional anatomical reconstruction\\n- Preservation of original photographic characteristics\\n\\n## Execution Instructions\\n\\n### PHASE 1: Base Canvas Analysis (Image 1)\\n1. **Identify and catalog all untouchable elements**:\\n   - Exact composition and framing\\n   - Body pose and expression\\n   - Clothing, accessories, and jewelry\\n   - Background and environmental elements\\n   - Photographic style (digital, analog, film grain, filters)\\n   - Direction and intensity of the main lighting\\n   - Depth of field and bokeh\\n   - Color temperature and white balance\\n   - Optical qualities (subtle chromatic aberrations, natural vignetting)\\n\\n2. **Analyze the current subject's anatomy**:\\n   - Head-to-body proportions\\n   - Visible bone structure\\n   - Neck and shoulder line\\n   - Ear position (if visible)\\n\\n### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)\\n1. **Extract only these facial elements**:\\n   - Complete bone structure (forehead, cheekbones, jawline, chin)\\n   - Facial proportions (interocular distance, nose width, mouth size)\\n   - Specific features (eye shape, nose type, lips, eyebrows)\\n   - Skin texture (pores, moles, natural imperfections)\\n   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)\\n   - Facial skin tone and undertones\\n\\n2. **Extract hair elements (if applicable)**:\\n   - Shape, volume, and texture of the hair\\n   - Exact color and gradients\\n   - Hairstyle and styling\\n   - Hairline\\n   - Eyebrows and facial hair (if applicable)\\n\\n### PHASE 3: Surgical Integration\\n\\n#### GOLDEN RULE 1: CANVAS INTANGIBILITY\\n**DO NOT** alter, regenerate, or reinterpret:\\n- ✗ The image background\\n- ✗ The body pose\\n- ✗ Clothing and accessories\\n- ✗ Composition and framing\\n- ✗ Original photographic style\\n- ✗ Film grain or digital texture\\n- ✗ General atmosphere\\n- ✗ Environmental elements\\n\\n#### GOLDEN RULE 2: INVISIBLE FUSION\\nThe transfer must be **imperceptible**. The final result must look like a single, original camera capture.\\n\\n#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY\\n- Organically adjust the dimensions of the head, neck, and shoulders.\\n- Head size must match the body's natural complexion and proportions.\\n- Prevent the face from looking \\\"pasted on,\\\" too large, or too small.\\n- Maintain realistic and credible proportions.\\n- The neck line must flow naturally from the new face.\\n\\n### PHASE 4: Visual Coherence (CRITICAL)\\n\\n#### A. SKIN AND TONE\\n- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.\\n- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.\\n- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.\\n- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.\\n\\n#### B. GLOBAL LIGHTING\\n- **Light Direction**: Identify and exactly replicate the direction of the main light source.\\n- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.\\n- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.\\n- **Color Temperature**: Maintain the same chromatic warmth/coolness.\\n- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.\\n\\n#### C. ADVANCED PHOTOGRAPHIC DETAILS\\n- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.\\n- **Grain/Noise**: Apply the identical film grain or digital noise pattern.\\n- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.\\n- **Selective Focus**: Maintain sharpness exactly where it was originally.\\n- **Vignetting**: Preserve any natural edge darkening.\\n\\n### PHASE 5: Quality Verification\\n\\n#### Control Checklist:\\n- [ ] The face looks like a natural part of the original body.\\n- [ ] The neck line flows without interruptions.\\n- [ ] Skin tone is uniform across the entire figure.\\n- [ ] Shadows match the original light direction.\\n- [ ] Ocular reflections show the correct light sources.\\n- [ ] Hair integrates naturally (if transferred).\\n- [ ] Head-to-body proportions are realistic.\\n- [ ] No elements have been regenerated or invented.\\n- [ ] Photographic style remains completely intact.\\n- [ ] The image looks like a single, original camera capture.\\n\\n---\\n\\n## Special Considerations\\n\\n### For Images with Couples:\\n- If Image 1 contains two people, the user must specify which face to replace.\\n- Maintain the spatial relationship between both subjects.\\n- Preserve the visual and emotional interaction between them.\\n- Ensure the transferred face does not disrupt the composition's dynamics.\\n\\n### For Cross-Gender Transfers:\\n- When transferring from male to female or vice versa, subtly adjust:\\n  - Jawline and cheekbone structure\\n  - Hair volume and shape\\n  - Facial proportions (without exaggeration)\\n- Maintain naturalness and avoid stereotypes.\\n\\n### For Makeup and Accessories:\\n- **Preserve** any makeup, jewelry, or accessories present in Image 1.\\n- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.\\n- **Do not invent** makeup or accessories that did not exist in either image.\\n\\n---\\n\\n## Recommended Technical Parameters\\n\\n### Output Quality:\\n- **Resolution**: Maintain the original resolution of Image 1.\\n- **Format**: Preserve the original format (RAW, JPEG, PNG).\\n- **Compression**: Do not add additional compression artifacts.\\n- **Metadata**: Preserve when possible.\\n\\n### Realism Levels:\\n- **Skin**: Visible pores, natural imperfections, subtle tone variations.\\n- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.\\n- **Lips**: Moist texture, light reflections, natural creases.\\n- **Hair**: Individual hair strands visible at the edges, realistic light highlights.\\n\\n---\\n\\n## Common Errors to Avoid\\n\\n### ❌ STRICTLY PROHIBITED:\\n- Reinterpreting or changing the pose.\\n- Regenerating background elements.\\n- Inventing additional lighting.\\n- Changing the photographic style.\\n- Altering the composition.\\n- Creating visible skin transitions.\\n- Making the face look overly \\\"perfect\\\" or \\\"plastic\\\".\\n- Losing natural skin texture.\\n- Disproportionating head vs. body.\\n- Creating inconsistent shadows.\\n\\n### ✅ ALWAYS REQUIRED:\\n- Respect the integrity of Image 1.\\n- Maintain lighting coherence.\\n- Preserve original texture and grain.\\n- Verify anatomical proportions.\\n- Ensure invisible fusion.\\n- Maintain photographic quality.\\n\\n---\\n\\n## Response Format\\n\\nWhen completing the transfer, provide:\\n1. The final image with the transferred identity.\\n2. A brief confirmation that all rules were followed.\\n3. A note on any proportional adjustments made (if applicable).\\n\\n**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.\\n\\n---\\n\\n## Usage Example\\n\\n**User**: \\\"I want to transfer the face from Image 2 to Image 1.\\\"\\n\\n**System**: \\n1. Analyzes Image 1 (base canvas).\\n2. Extracts identity from Image 2 (reference face).\\n3. Performs surgical fusion following all rules.\\n4. Verifies visual coherence.\\n5. Delivers the final result.\\n\\n---\\n\\n*Version: 1.0*\\n*Last Updated: September 2026*\\n*Optimized for: Professional photography, high-end portraits, advertising campaigns*\"}")
  req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, "https://runapi.ai/api/v1/runapi/text_to_image", body)
  if err != nil {
    log.Fatal(err)
  }

  req.Header.Set("Authorization", "Bearer "+os.Getenv("RUNAPI_API_KEY"))
  req.Header.Set("Content-Type", "application/json")

  resp, err := http.DefaultClient.Do(req)
  if err != nil {
    log.Fatal(err)
  }
  defer resp.Body.Close()

  fmt.Println(resp.Status)
}
```

### CLI

```cli
$ runapi generate \
    --model  \
    --prompt "---\nname: skill-high-precision-facial-identity-transfer-faceswap-pro\ndescription: A specialized skill for high-end digital photo retouching and surgical facial identity t\n---\n\n# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)\n\n## Description\nA specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.\n\n## Activation Triggers\nThis skill is activated when the user requests:\n- Face replacement or identity transfer in an image\n- \"Face swap\" or face blending\n- Changing the model/protagonist while preserving the original scene\n- Adapting a reference face to an existing composition\n\n## Required Parameters\n- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.\n- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.\n\n*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.\n\n---\n\n## System Role\nAct as an expert in high-end digital photo retouching specializing in:\n- Surgical facial identity transfer\n- Lighting and colorimetry matching\n- Proportional anatomical reconstruction\n- Preservation of original photographic characteristics\n\n## Execution Instructions\n\n### PHASE 1: Base Canvas Analysis (Image 1)\n1. **Identify and catalog all untouchable elements**:\n   - Exact composition and framing\n   - Body pose and expression\n   - Clothing, accessories, and jewelry\n   - Background and environmental elements\n   - Photographic style (digital, analog, film grain, filters)\n   - Direction and intensity of the main lighting\n   - Depth of field and bokeh\n   - Color temperature and white balance\n   - Optical qualities (subtle chromatic aberrations, natural vignetting)\n\n2. **Analyze the current subject's anatomy**:\n   - Head-to-body proportions\n   - Visible bone structure\n   - Neck and shoulder line\n   - Ear position (if visible)\n\n### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)\n1. **Extract only these facial elements**:\n   - Complete bone structure (forehead, cheekbones, jawline, chin)\n   - Facial proportions (interocular distance, nose width, mouth size)\n   - Specific features (eye shape, nose type, lips, eyebrows)\n   - Skin texture (pores, moles, natural imperfections)\n   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)\n   - Facial skin tone and undertones\n\n2. **Extract hair elements (if applicable)**:\n   - Shape, volume, and texture of the hair\n   - Exact color and gradients\n   - Hairstyle and styling\n   - Hairline\n   - Eyebrows and facial hair (if applicable)\n\n### PHASE 3: Surgical Integration\n\n#### GOLDEN RULE 1: CANVAS INTANGIBILITY\n**DO NOT** alter, regenerate, or reinterpret:\n- ✗ The image background\n- ✗ The body pose\n- ✗ Clothing and accessories\n- ✗ Composition and framing\n- ✗ Original photographic style\n- ✗ Film grain or digital texture\n- ✗ General atmosphere\n- ✗ Environmental elements\n\n#### GOLDEN RULE 2: INVISIBLE FUSION\nThe transfer must be **imperceptible**. The final result must look like a single, original camera capture.\n\n#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY\n- Organically adjust the dimensions of the head, neck, and shoulders.\n- Head size must match the body's natural complexion and proportions.\n- Prevent the face from looking \"pasted on,\" too large, or too small.\n- Maintain realistic and credible proportions.\n- The neck line must flow naturally from the new face.\n\n### PHASE 4: Visual Coherence (CRITICAL)\n\n#### A. SKIN AND TONE\n- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.\n- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.\n- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.\n- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.\n\n#### B. GLOBAL LIGHTING\n- **Light Direction**: Identify and exactly replicate the direction of the main light source.\n- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.\n- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.\n- **Color Temperature**: Maintain the same chromatic warmth/coolness.\n- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.\n\n#### C. ADVANCED PHOTOGRAPHIC DETAILS\n- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.\n- **Grain/Noise**: Apply the identical film grain or digital noise pattern.\n- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.\n- **Selective Focus**: Maintain sharpness exactly where it was originally.\n- **Vignetting**: Preserve any natural edge darkening.\n\n### PHASE 5: Quality Verification\n\n#### Control Checklist:\n- [ ] The face looks like a natural part of the original body.\n- [ ] The neck line flows without interruptions.\n- [ ] Skin tone is uniform across the entire figure.\n- [ ] Shadows match the original light direction.\n- [ ] Ocular reflections show the correct light sources.\n- [ ] Hair integrates naturally (if transferred).\n- [ ] Head-to-body proportions are realistic.\n- [ ] No elements have been regenerated or invented.\n- [ ] Photographic style remains completely intact.\n- [ ] The image looks like a single, original camera capture.\n\n---\n\n## Special Considerations\n\n### For Images with Couples:\n- If Image 1 contains two people, the user must specify which face to replace.\n- Maintain the spatial relationship between both subjects.\n- Preserve the visual and emotional interaction between them.\n- Ensure the transferred face does not disrupt the composition's dynamics.\n\n### For Cross-Gender Transfers:\n- When transferring from male to female or vice versa, subtly adjust:\n  - Jawline and cheekbone structure\n  - Hair volume and shape\n  - Facial proportions (without exaggeration)\n- Maintain naturalness and avoid stereotypes.\n\n### For Makeup and Accessories:\n- **Preserve** any makeup, jewelry, or accessories present in Image 1.\n- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.\n- **Do not invent** makeup or accessories that did not exist in either image.\n\n---\n\n## Recommended Technical Parameters\n\n### Output Quality:\n- **Resolution**: Maintain the original resolution of Image 1.\n- **Format**: Preserve the original format (RAW, JPEG, PNG).\n- **Compression**: Do not add additional compression artifacts.\n- **Metadata**: Preserve when possible.\n\n### Realism Levels:\n- **Skin**: Visible pores, natural imperfections, subtle tone variations.\n- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.\n- **Lips**: Moist texture, light reflections, natural creases.\n- **Hair**: Individual hair strands visible at the edges, realistic light highlights.\n\n---\n\n## Common Errors to Avoid\n\n### ❌ STRICTLY PROHIBITED:\n- Reinterpreting or changing the pose.\n- Regenerating background elements.\n- Inventing additional lighting.\n- Changing the photographic style.\n- Altering the composition.\n- Creating visible skin transitions.\n- Making the face look overly \"perfect\" or \"plastic\".\n- Losing natural skin texture.\n- Disproportionating head vs. body.\n- Creating inconsistent shadows.\n\n### ✅ ALWAYS REQUIRED:\n- Respect the integrity of Image 1.\n- Maintain lighting coherence.\n- Preserve original texture and grain.\n- Verify anatomical proportions.\n- Ensure invisible fusion.\n- Maintain photographic quality.\n\n---\n\n## Response Format\n\nWhen completing the transfer, provide:\n1. The final image with the transferred identity.\n2. A brief confirmation that all rules were followed.\n3. A note on any proportional adjustments made (if applicable).\n\n**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.\n\n---\n\n## Usage Example\n\n**User**: \"I want to transfer the face from Image 2 to Image 1.\"\n\n**System**: \n1. Analyzes Image 1 (base canvas).\n2. Extracts identity from Image 2 (reference face).\n3. Performs surgical fusion following all rules.\n4. Verifies visual coherence.\n5. Delivers the final result.\n\n---\n\n*Version: 1.0*\n*Last Updated: September 2026*\n*Optimized for: Professional photography, high-end portraits, advertising campaigns*" \
    --wait
```

<!-- /api-example-tabs-slot -->

## More prompts like this

- [Educative video](https://runapi.ai/prompts/prm_GqW79wzlyMLeH9Ya4Od3m5K1.md)
- [Man black.](https://runapi.ai/prompts/prm_9vxNwzoeD3O3sMKKDd6XAVO7.md)
- [Vintage Tiled Portrait Poster With Handwritten Sticky Notes (JSON, 3:4)](https://runapi.ai/prompts/prm_zXJ0gpnA8WgocLGE817Qqe9w.md)

## Prompt questions

### Can I modify this prompt?

Yes. Use it as a starting point and adjust parameters, add details, or combine it with your own ideas.

### Which model should I choose?

Each model has different strengths. Compare the available models and choose the one that best matches the output you need.

### How much does it cost?

Pricing varies by model. See the estimated cost above the Generate button.

## Building with a team?

We're here to help with enterprise setup, integrations, and technical questions.

[Contact Us](https://runapi.ai/contact.md)


---

## More from RunAPI

- [Home](https://runapi.ai/.md)
### Product
- [Model Catalog](https://runapi.ai/models.md)
- [Pricing](https://runapi.ai/pricing.md)
- [Providers](https://runapi.ai/models#all-models)
- [Prompt Gallery](https://runapi.ai/prompts.md)
### Developers
- [Documentation](https://runapi.ai/docs/guides)
- [SDKs](https://runapi.ai/sdk.md)
- [CLI](https://runapi.ai/cli.md)
- [MCP Server](https://runapi.ai/mcp.md)
- [x402](https://runapi.ai/x402.md)
### Guides
- [Claude Code vs Cursor](https://runapi.ai/claude-code-vs-cursor.md)
- [Cursor API Setup](https://runapi.ai/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/openrouter-alternative.md)
### Company
- [Enterprise](https://runapi.ai/contact.md)
- [Contact](https://runapi.ai/contact.md)
### Legal
- [Terms](https://runapi.ai/terms.md)
- [Privacy](https://runapi.ai/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://runapi.ai/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Prompts",
        "item": "https://runapi.ai/prompts"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Image",
        "item": "https://runapi.ai/prompts/image"
      },
      {
        "@type": "ListItem",
        "position": 4,
        "name": "# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)",
        "item": "https://runapi.ai/prompts/prm_eZlGvpRz4wABsY5PDgxVrk3B"
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "Can I modify this prompt?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Yes. Use it as a starting point and adjust parameters, add details, or combine it with your own ideas."
        }
      },
      {
        "@type": "Question",
        "name": "Which model should I choose?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Each model has different strengths. Compare the available models and choose the one that best matches the output you need."
        }
      },
      {
        "@type": "Question",
        "name": "How much does it cost?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Pricing varies by model. See the estimated cost above the Generate button."
        }
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "CreativeWork",
    "name": "# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)",
    "text": "---\nname: skill-high-precision-facial-identity-transfer-faceswap-pro\ndescription: A specialized skill for high-end digital photo retouching and surgical facial identity t\n---\n\n# Skill: High-Precision Facial Identity Transfer (FaceSwap Pro)\n\n## Description\nA specialized skill for high-end digital photo retouching and surgical facial identity transfer. It enables replacing the protagonist in a base image while keeping all original scene elements, lighting, composition, and photographic characteristics completely intact.\n\n## Activation Triggers\nThis skill is activated when the user requests:\n- Face replacement or identity transfer in an image\n- \"Face swap\" or face blending\n- Changing the model/protagonist while preserving the original scene\n- Adapting a reference face to an existing composition\n\n## Required Parameters\n- **Image 1 (BASE CANVAS)**: The original image containing the desired composition, pose, clothing, and environment.\n- **Image 2 (REFERENCE FACE)**: The reference image of the person whose facial identity will be transferred.\n\n*Note*: Image 1 may contain a single person (male or female) or a couple. If it's a couple, the user must specify which face in Image 1 is to be replaced.\n\n---\n\n## System Role\nAct as an expert in high-end digital photo retouching specializing in:\n- Surgical facial identity transfer\n- Lighting and colorimetry matching\n- Proportional anatomical reconstruction\n- Preservation of original photographic characteristics\n\n## Execution Instructions\n\n### PHASE 1: Base Canvas Analysis (Image 1)\n1. **Identify and catalog all untouchable elements**:\n   - Exact composition and framing\n   - Body pose and expression\n   - Clothing, accessories, and jewelry\n   - Background and environmental elements\n   - Photographic style (digital, analog, film grain, filters)\n   - Direction and intensity of the main lighting\n   - Depth of field and bokeh\n   - Color temperature and white balance\n   - Optical qualities (subtle chromatic aberrations, natural vignetting)\n\n2. **Analyze the current subject's anatomy**:\n   - Head-to-body proportions\n   - Visible bone structure\n   - Neck and shoulder line\n   - Ear position (if visible)\n\n### PHASE 2: Identity Extraction (Image 2 - REFERENCE FACE)\n1. **Extract only these facial elements**:\n   - Complete bone structure (forehead, cheekbones, jawline, chin)\n   - Facial proportions (interocular distance, nose width, mouth size)\n   - Specific features (eye shape, nose type, lips, eyebrows)\n   - Skin texture (pores, moles, natural imperfections)\n   - Eye color and shape (iris, limbal ring, ocular reflections/catchlights)\n   - Facial skin tone and undertones\n\n2. **Extract hair elements (if applicable)**:\n   - Shape, volume, and texture of the hair\n   - Exact color and gradients\n   - Hairstyle and styling\n   - Hairline\n   - Eyebrows and facial hair (if applicable)\n\n### PHASE 3: Surgical Integration\n\n#### GOLDEN RULE 1: CANVAS INTANGIBILITY\n**DO NOT** alter, regenerate, or reinterpret:\n- ✗ The image background\n- ✗ The body pose\n- ✗ Clothing and accessories\n- ✗ Composition and framing\n- ✗ Original photographic style\n- ✗ Film grain or digital texture\n- ✗ General atmosphere\n- ✗ Environmental elements\n\n#### GOLDEN RULE 2: INVISIBLE FUSION\nThe transfer must be **imperceptible**. The final result must look like a single, original camera capture.\n\n#### GOLDEN RULE 3: ANATOMICAL PROPORTIONALITY\n- Organically adjust the dimensions of the head, neck, and shoulders.\n- Head size must match the body's natural complexion and proportions.\n- Prevent the face from looking \"pasted on,\" too large, or too small.\n- Maintain realistic and credible proportions.\n- The neck line must flow naturally from the new face.\n\n### PHASE 4: Visual Coherence (CRITICAL)\n\n#### A. SKIN AND TONE\n- **Absolute Uniformity**: The skin tone of the transferred face must be identical to the neck, shoulders, and body.\n- **Zero Visible Transitions**: No edges, patches, masks, or color shifts.\n- **Subsurface Scattering**: Maintain the natural translucency of the skin according to the original lighting.\n- **Continuous Texture**: Pores and micro-textures must match seamlessly between the face and the body.\n\n#### B. GLOBAL LIGHTING\n- **Light Direction**: Identify and exactly replicate the direction of the main light source.\n- **Coherent Shadows**: Shadows on the new face must mathematically match the original scene.\n- **Ocular Reflections**: Eye reflections (catchlights) must show the exact same light sources as the rest of the image.\n- **Color Temperature**: Maintain the same chromatic warmth/coolness.\n- **Preserved Contrast**: Do not introduce new contrasts or alter the dynamic range.\n\n#### C. ADVANCED PHOTOGRAPHIC DETAILS\n- **Depth of Field**: If the background is blurred, the new face must maintain the exact same level of sharpness/focus as the original face.\n- **Grain/Noise**: Apply the identical film grain or digital noise pattern.\n- **Chromatic Aberration**: Preserve any subtle aberration present in the original image.\n- **Selective Focus**: Maintain sharpness exactly where it was originally.\n- **Vignetting**: Preserve any natural edge darkening.\n\n### PHASE 5: Quality Verification\n\n#### Control Checklist:\n- [ ] The face looks like a natural part of the original body.\n- [ ] The neck line flows without interruptions.\n- [ ] Skin tone is uniform across the entire figure.\n- [ ] Shadows match the original light direction.\n- [ ] Ocular reflections show the correct light sources.\n- [ ] Hair integrates naturally (if transferred).\n- [ ] Head-to-body proportions are realistic.\n- [ ] No elements have been regenerated or invented.\n- [ ] Photographic style remains completely intact.\n- [ ] The image looks like a single, original camera capture.\n\n---\n\n## Special Considerations\n\n### For Images with Couples:\n- If Image 1 contains two people, the user must specify which face to replace.\n- Maintain the spatial relationship between both subjects.\n- Preserve the visual and emotional interaction between them.\n- Ensure the transferred face does not disrupt the composition's dynamics.\n\n### For Cross-Gender Transfers:\n- When transferring from male to female or vice versa, subtly adjust:\n  - Jawline and cheekbone structure\n  - Hair volume and shape\n  - Facial proportions (without exaggeration)\n- Maintain naturalness and avoid stereotypes.\n\n### For Makeup and Accessories:\n- **Preserve** any makeup, jewelry, or accessories present in Image 1.\n- **Integrate** the REFERENCE FACE's makeup only if compatible with the original lighting.\n- **Do not invent** makeup or accessories that did not exist in either image.\n\n---\n\n## Recommended Technical Parameters\n\n### Output Quality:\n- **Resolution**: Maintain the original resolution of Image 1.\n- **Format**: Preserve the original format (RAW, JPEG, PNG).\n- **Compression**: Do not add additional compression artifacts.\n- **Metadata**: Preserve when possible.\n\n### Realism Levels:\n- **Skin**: Visible pores, natural imperfections, subtle tone variations.\n- **Eyes**: Visible limbal ring, realistic reflections, subtle blood vessels.\n- **Lips**: Moist texture, light reflections, natural creases.\n- **Hair**: Individual hair strands visible at the edges, realistic light highlights.\n\n---\n\n## Common Errors to Avoid\n\n### ❌ STRICTLY PROHIBITED:\n- Reinterpreting or changing the pose.\n- Regenerating background elements.\n- Inventing additional lighting.\n- Changing the photographic style.\n- Altering the composition.\n- Creating visible skin transitions.\n- Making the face look overly \"perfect\" or \"plastic\".\n- Losing natural skin texture.\n- Disproportionating head vs. body.\n- Creating inconsistent shadows.\n\n### ✅ ALWAYS REQUIRED:\n- Respect the integrity of Image 1.\n- Maintain lighting coherence.\n- Preserve original texture and grain.\n- Verify anatomical proportions.\n- Ensure invisible fusion.\n- Maintain photographic quality.\n\n---\n\n## Response Format\n\nWhen completing the transfer, provide:\n1. The final image with the transferred identity.\n2. A brief confirmation that all rules were followed.\n3. A note on any proportional adjustments made (if applicable).\n\n**Note**: If any strict rule cannot be fulfilled due to technical limitations, inform the user before proceeding and propose alternatives.\n\n---\n\n## Usage Example\n\n**User**: \"I want to transfer the face from Image 2 to Image 1.\"\n\n**System**: \n1. Analyzes Image 1 (base canvas).\n2. Extracts identity from Image 2 (reference face).\n3. Performs surgical fusion following all rules.\n4. Verifies visual coherence.\n5. Delivers the final result.\n\n---\n\n*Version: 1.0*\n*Last Updated: September 2026*\n*Optimized for: Professional photography, high-end portraits, advertising campaigns*",
    "image": null,
    "about": [
      "image",
      "lifestyle"
    ]
  }
]
```
