# Volcengine Video-to-Video Lip Sync API

> Volcengine Video-to-Video Lip Sync — high-quality AI video generation.

- **Provider**: ByteDance
- **Model id**: `volcengine-video-to-video-lip-sync`
- **Modality**: video
- **Price**: 8.14 credits /sec

## Overview

Volcengine Video-to-Video Lip Sync is called in two steps: create a generation task, then poll the task until the result is ready.

## Authentication

All requests require a Bearer Token in the request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Create Task

`POST https://you.bot/api/v1/generate`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| modelId | string | Yes | Model id: `volcengine-video-to-video-lip-sync` |
| input | object | Yes | Input parameters object (see below) |
| callbackUrl | string | No | https URL to receive a signed webhook on completion |

### input object parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| video_url | string | Yes | Video asset URL (image URL) |
| audio_url | string | Yes | Target pure vocal audio URL; used to drive video lip movements. (image URL) |
| mode | string | Yes | Service identifier (options: lite | basic) (default: lite) |
| separate_vocal | boolean | No | Enable vocal separation to suppress background noise. (true/false) (default: false) |
| open_scenedet | boolean | No | Whether to enable scene segmentation and speaker identification. Supported only in Basic mode. (true/false) (default: false) |
| align_audio | boolean | No | Supported in lite mode. Whether to loop the video when the audio is longer than the video. (true/false) (default: true) |
| align_audio_reverse | boolean | No | Supported in lite mode. Whether to loop the video in reverse (backward). Requires align_audio to be set to true. (true/false) (default: false) |
| templ_start_seconds | number | No | Supported in lite mode. Start time of the template video, in seconds. (default: 0) |

### Request example

```json
{
  "modelId": "volcengine-video-to-video-lip-sync",
  "input": {
    "video_url": "https://example.com/input.jpg",
    "audio_url": "https://example.com/input.jpg",
    "mode": "lite",
    "separate_vocal": false,
    "open_scenedet": false,
    "align_audio": true,
    "align_audio_reverse": false,
    "templ_start_seconds": "0"
  }
}
```

### Response example

```json
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 24
}
```

## Query Task

`GET https://you.bot/api/v1/task/{taskId}?model=volcengine-video-to-video-lip-sync`

When `state` is `success`, the output is in `resultUrls`: `{ "state": "success", "resultUrls": [ ... ] }`. (Text models return inline in the create response.)

## Error Codes

| Code | Description |
|------|-------------|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed, check API Key |
| 402 | Insufficient account balance |
| 422 | Parameter validation failed |
| 429 | Request rate limit exceeded |
| 500 | Internal server error |
