## Overview

Renders a portrait using a Digital Twin LoRA that's already been trained on the user's likeness via the wmstudio dashboard. The MCP tool only handles inference — training is a separate dashboard-only flow. Pass `digital_twin_profile_id` to target a specific profile; otherwise the user's active default is used.

Auth

oauth-jwt

Returns

{ imageUrl, generationId, creditsCharged, creditsRemaining, lowCreditsWarning? }

Web client

src/app/[locale]/dashboard/creative-studio/digital-twin/page.tsx

MCP handler

mcp-director/src/tools/studio.py

## Quick start

Invoke the tool over Streamable HTTP at `{MCP_BASE_URL}/mcp/`. The request below assumes you already minted an MCP JWT via the OAuth flow.

MCPcurlTypeScript

```json
{
  "name": "studio_digital_twin",
  "arguments": {
    "prompt": "<prompt>"
  }
}
```

## Parameters

| Name                          | Type   | Default | Description                                                  |
|-------------------------------|--------|---------|--------------------------------------------------------------|
| promptrequired                | string | —       | Portrait description (scene, lighting, wardrobe).            |
| digital_twin_profile_id       | string | —       | Target a specific trained profile; defaults to the user's active twin. |
| enhancement_preset            | string | —       | Optional realism refinement preset.                           |
| model                         | string | "fal-ai/flux/dev" | Base provider/model id.                                       |
| aspect_ratio                  | string | —       | Target aspect ratio.                                         |

## Examples

Twin portrait

```json
{
  "name": "studio_digital_twin",
  "arguments": {
    "prompt": "three-quarter portrait, golden hour rooftop, soft rim light",
    "enhancement_preset": "realism_v2"
  }
}
```

## Notes

- Twin training itself happens in the wmstudio dashboard — not exposed as an MCP tool.
- If no twin is trained yet, wmstudio returns a 4xx with a clear error message.
