<!-- AvatarFactory Docs · https://avatarfactory.in/docs/ai/text-to-video · Full map: https://avatarfactory.in/llms.txt -->

# Text-to-video connector

Ask Claude for a video and get an MP4 of your avatar speaking your script, lip-synced. Connect once with your AvatarFactory account.

The AvatarFactory connector adds three tools to your AI assistant. You describe the
video you want in plain language — who says it, what they say, and the shape of the
frame — and the assistant makes it with your avatar and hands you a download link.

It is a remote **MCP server** (Model Context Protocol), so it works in any assistant
that supports remote MCP connectors with OAuth sign-in.

| Assistant | Status |
| --- | --- |
| Claude (claude.ai, Claude Desktop) | Available — add it as a custom connector. |
| Claude Code | Available — one command, below. |
| ChatGPT | Coming soon. |
| Codex | Coming soon. |

## Connect it

The connector URL is the same everywhere:

```text
https://www.avatarfactory.in/api/mcp
```

### Step 1 — Add the connector

**Claude (web and desktop):** open **Settings → Connectors**, choose **Add custom
connector**, name it `AvatarFactory`, and paste the URL above.

**Claude Code:** run this in your terminal, then start a new session.

```bash
claude mcp add --transport http --scope user avatarfactory https://www.avatarfactory.in/api/mcp
```

`--scope user` makes it available in every project. Without it, the connector is saved
for the current folder only.

### Step 2 — Sign in and allow access

The first time the assistant uses the connector, it opens an AvatarFactory page in your
browser. Sign in with your normal AvatarFactory account and choose **Allow**. In Claude
Code, run `/mcp`, pick `avatarfactory`, and choose **Authenticate** to start this step.

The assistant can then list your avatars and make videos as you. It never sees your
password or your API keys.

### Step 3 — Ask for a video

```text
Make a vertical video of Sumitra saying: "Welcome to our store! Ask me anything."
```

If you leave out the avatar, the orientation or the background, the assistant asks you before it makes
anything.

## What a conversation looks like

1. You ask for a video.
2. If you did not name an avatar, the assistant shows you your own published avatars and
   the public library and asks which one you want. You can also paste an avatar ID.
3. If you did not say, it asks for the orientation (vertical 9:16 by default, landscape 16:9 or square 1:1) and the background (white by default, any colour, or transparent).
4. It calls `create_video` with the exact script. Short clips are usually ready within
   that one call, in well under a minute.
5. You get a link to the MP4. A longer render returns a video ID instead, and the
   assistant checks it again with `get_video`.

## Video format

Every video shows the avatar speaking the script word for word with frame-accurate
lip-sync, at 30 fps. Where it fits, the avatar also gestures the way it does in a live
call, waving on a greeting for example, using the gestures its rig has. The words are
never changed to make room for one.

| Shape | 720p (default) | 1080p | Good for |
| --- | --- | --- | --- |
| 16:9 | 1280×720 | 1920×1080 | YouTube, slides, websites |
| 9:16 | 720×1280 | 1080×1920 | Reels, Shorts, Stories |
| 1:1 | 720×720 | 1080×1080 | Feeds and posts |

### Background

| You ask for | You get |
| --- | --- |
| Nothing (the default) | An MP4 (H.264 + AAC) on white. |
| Any colour, e.g. “on dark blue” | An MP4 on that colour. |
| A transparent background | A WebM (VP9 + Opus) whose background is see-through, to lay the avatar over other footage or a web page. |

A transparent WebM plays see-through in Chrome, Edge and Firefox, and in a web page's
`` element. Safari and some video editors show the background as black.
Partially transparent colours, such as `rgba(0, 0, 0, 0.5)`, are a WebM too.

## Which avatars

- **Your avatars** — any avatar you have published in the Platform.
- **The library** — every public library avatar. Some are marked for paid plans only.

To use a new avatar, publish it in the [Platform](/docs/platform/avatars) first.

## Billing

- **Minutes:** a video uses your plan's minutes for the length of its speech — the same
  as a call of that length. A 7-second line uses 7 seconds.
- **Failed videos are free.** Nothing is charged unless the video is ready.
- **Watermark:** videos on the free plan carry the AvatarFactory watermark, as live
  calls do. Paid plans have none.
- **Voice:** the avatar speaks in its configured voice. If you have connected your own
  voice provider ([BYOK](/docs/guides/byok)) for your own avatar, that key is used.

## Limits

| Limit | Value |
| --- | --- |
| Script length | 2,000 characters |
| Videos rendering at once | 3 per account |
| Download link | Valid 24 hours (get_video issues a fresh one) |
| Stored videos | Kept 30 days, then deleted |

> The script is spoken word for word. Write it the way it should sound — no stage
>   directions, emoji or markdown. Spell out anything the voice might misread, like
>   "twenty twenty-six" instead of "2026" if the year matters.

## Privacy and access

- **What it can do:** read your avatar list and make videos as you. It cannot change
  your avatars, keys, deployments or billing.
- **What is stored:** the script, the generated speech and the video, kept for 30 days
  so you can download it again.
- **Disconnecting:** remove the connector in your assistant's settings. Access is also
  scoped by short-lived tokens that expire after an hour and renew while you use it.

## Troubleshooting

| What you see | What to do |
| --- | --- |
| The connector does not appear in /mcp (Claude Code) | Start a new session — connectors load when a session starts. Check you are in the same folder you added it from, or re-add it with --scope user. |
| “Sign in to AvatarFactory to use this connector” | Authenticate again: /mcp → avatarfactory → Authenticate, or reconnect it in Claude's settings. |
| “At most 3 videos can render at once” | Wait for one of your videos to finish, then ask again. |
| A message about minutes | Your plan's minutes are used up for this period. Upgrade or wait for the reset. |
| “Avatar not found” | The avatar is unpublished or archived. Publish it, or pick another from list_avatars. |
| The render took too long and was stopped | Try a shorter script. |

Building your own client, or want the exact endpoints and schemas? See the
[MCP & OAuth reference](/docs/ai/mcp-reference).
