# Longcat Multi Avatar

> LongCat-Video-Avatar is an audio-driven video generation model that can generates super-realistic, lip-synchronized long video generation with natural dynamics and consistent identity.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/longcat-multi-avatar/image-audio-to-video`
- **Model ID**: `fal-ai/longcat-multi-avatar/image-audio-to-video`
- **Category**: audio-to-video
- **Kind**: inference
**Tags**: audio-to-video, image-to-video



## Pricing

Your request will cost **$0.3** per **video second** for **720p**, **$0.15** per **video second** for **480p**.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`image_url`** (`string`, _required_):
  The URL of the image containing two speakers.
  - Examples: "https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing.png"

- **`audio_url_person1`** (`string`, _optional_):
  The URL of the audio file for person 1 (left side). Default value: `"https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing_man.WAV"`
  - Default: `"https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing_man.WAV"`

- **`audio_url_person2`** (`string`, _optional_):
  The URL of the audio file for person 2 (right side). Default value: `"https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing_woman.WAV"`
  - Default: `"https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing_woman.WAV"`

- **`prompt`** (`string`, _optional_):
  The prompt to guide the video generation. Default value: `"Two people are having a conversation with natural expressions and movements."`
  - Default: `"Two people are having a conversation with natural expressions and movements."`
  - Examples: "Static camera, In a professional recording studio, two people stand facing each other, both wearing large headphones. They are speaking clearly into a large condenser microphone suspended between them. They looked at each other affectionately and occasionally shook their heads according to the rhythm. The soundproofed walls and visible recording equipment create an atmosphere focused on capturing high-quality audio as they interact and communicate."

- **`negative_prompt`** (`string`, _optional_):
  The negative prompt to avoid in the video generation. Default value: `"Close-up, Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"`
  - Default: `"Close-up, Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"`

- **`bbox_person1`** (`BoundingBox`, _optional_):
  Bounding box for person 1. If not provided, defaults to left half of image.

- **`bbox_person2`** (`BoundingBox`, _optional_):
  Bounding box for person 2. If not provided, defaults to right half of image.

- **`audio_type`** (`AudioTypeEnum`, _optional_):
  How to combine the two audio tracks. 'para' (parallel) plays both simultaneously, 'add' (sequential) plays person 1 first then person 2. Default value: `"para"`
  - Default: `"para"`
  - Options: `"para"`, `"add"`

- **`num_inference_steps`** (`integer`, _optional_):
  The number of inference steps to use. Default value: `30`
  - Default: `30`
  - Range: `10` to `100`

- **`text_guidance_scale`** (`float`, _optional_):
  The text guidance scale for classifier-free guidance. Default value: `4`
  - Default: `4`
  - Range: `1` to `10`

- **`audio_guidance_scale`** (`float`, _optional_):
  The audio guidance scale. Higher values may lead to exaggerated mouth movements. Default value: `4`
  - Default: `4`
  - Range: `1` to `10`

- **`resolution`** (`ResolutionEnum`, _optional_):
  Resolution of the generated video (480p or 720p). Billing is per video-second (16 frames): 480p is 1 unit per second and 720p is 4 units per second. Default value: `"480p"`
  - Default: `"480p"`
  - Options: `"480p"`, `"720p"`

- **`num_segments`** (`integer`, _optional_):
  Number of video segments to generate. Each segment adds ~5 seconds of video. First segment is ~5.8s, additional segments are 5s each. Default value: `1`
  - Default: `1`
  - Range: `1` to `10`

- **`seed`** (`integer`, _optional_):
  The seed for the random number generator.

- **`enable_safety_checker`** (`boolean`, _optional_):
  Whether to enable safety checker. Default value: `true`
  - Default: `true`



**Required Parameters Example**:

```json
{
  "image_url": "https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing.png"
}
```

**Full Example**:

```json
{
  "image_url": "https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing.png",
  "audio_url_person1": "https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing_man.WAV",
  "audio_url_person2": "https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing_woman.WAV",
  "prompt": "Static camera, In a professional recording studio, two people stand facing each other, both wearing large headphones. They are speaking clearly into a large condenser microphone suspended between them. They looked at each other affectionately and occasionally shook their heads according to the rhythm. The soundproofed walls and visible recording equipment create an atmosphere focused on capturing high-quality audio as they interact and communicate.",
  "negative_prompt": "Close-up, Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards",
  "audio_type": "para",
  "num_inference_steps": 30,
  "text_guidance_scale": 4,
  "audio_guidance_scale": 4,
  "resolution": "480p",
  "num_segments": 1,
  "enable_safety_checker": true
}
```


### Output Schema

The API returns the following output format:

- **`video`** (`File`, _required_):
  The generated video file.
  - Examples: {"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a87a882/k7N4EBTQnVM9nCW9ylN8i_output_87614f102ba94cc0b101d058a815c81f.mp4"}

- **`seed`** (`integer`, _required_):
  The seed used for generation.
  - Examples: 424911732



**Example Response**:

```json
{
  "video": {
    "content_type": "video/mp4",
    "url": "https://v3b.fal.media/files/b/0a87a882/k7N4EBTQnVM9nCW9ylN8i_output_87614f102ba94cc0b101d058a815c81f.mp4"
  },
  "seed": 424911732
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/longcat-multi-avatar/image-audio-to-video \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "image_url": "https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing.png"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/longcat-multi-avatar/image-audio-to-video",
    arguments={
        "image_url": "https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing.png"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/longcat-multi-avatar/image-audio-to-video", {
  input: {
    image_url: "https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/multi/sing.png"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/fal-ai/longcat-multi-avatar/image-audio-to-video)
- [API Documentation](https://fal.ai/models/fal-ai/longcat-multi-avatar/image-audio-to-video/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/longcat-multi-avatar/image-audio-to-video)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
