Skip to main content
POST
/
v1
/
videos
/
generations
Lipsync 2 Video Lip Sync
curl --request POST \
  --url https://api.foxapi.cc/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "lipsync-2",
  "video": "https://example.com/portrait-video.mp4",
  "audio": "https://example.com/speech.mp3",
  "sync_mode": "loop",
  "temperature": 0.5,
  "active_speaker": false,
  "callback_url": "https://your-domain.com/webhooks/lipsync-completed"
}
'
{
  "created": 1757165031,
  "id": "task-unified-1757165031-a1b2c3d4",
  "model": "lipsync-2",
  "object": "video.generation.task",
  "progress": 0,
  "status": "pending",
  "type": "video",
  "usage": {
    "credits_reserved": 123,
    "user_group": "<string>"
  }
}

Authorizations

Authorization
string
header
required

All APIs require Bearer Token authentication

Add to request header:

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
enum<string>
default:lipsync-2
required

Lipsync model variant

  • lipsync-2: Standard quality
  • lipsync-2-pro: Higher quality
Available options:
lipsync-2,
lipsync-2-pro
Example:

"lipsync-2"

video
string<uri>
required

Public URL of the input video file

Requirements:

  • Format: MP4
  • Must be a publicly accessible URL
Example:

"https://example.com/portrait-video.mp4"

audio
string<uri>
required

Public URL of the input audio file

Requirements:

  • Format: MP3 / WAV
  • Must be a publicly accessible URL
  • Audio duration directly affects output video duration and billing (depends on sync_mode)
Example:

"https://example.com/speech.mp3"

sync_mode
enum<string>
default:loop

Video-audio synchronization mode, determines output video duration

ValueBehaviorOutput Duration
bounceVideo plays back and forth to match audio length= audio duration
loopVideo loops to match audio length= audio duration
cut_offAudio is cut when video ends= min(video, audio)
silenceVideo padded with silence at the end= video duration
remapAudio timeline remapped to match video= audio duration
Available options:
bounce,
loop,
cut_off,
silence,
remap
Example:

"loop"

temperature
number
default:0.5

Mouth movement expressiveness control

  • 0.0 - 0.3: Conservative, natural mouth movements
  • 0.4 - 0.6: Balanced expressiveness
  • 0.7 - 1.0: Exaggerated, dynamic mouth movements
Required range: 0 <= x <= 1
Example:

0.5

active_speaker
boolean
default:false

Whether to enable active speaker detection

When enabled, analyzes speaking segments in audio and only syncs mouth movements during speech. Improves realism for multi-person scenes or videos with silent segments.

Example:

false

callback_url
string<uri>

HTTPS callback address after task completion

Callback Timing:

  • Triggered when task is completed, failed, or cancelled

Security Restrictions:

  • Only HTTPS protocol is supported
  • URL length must not exceed 2048 characters

Callback Mechanism:

  • Timeout: 10 seconds
  • Maximum 3 retries on failure
Example:

"https://your-domain.com/webhooks/lipsync-completed"

Response

Lipsync task created successfully

created
integer

Task creation timestamp

Example:

1757165031

id
string

Task ID

Example:

"task-unified-1757165031-a1b2c3d4"

model
string

Actual model name used

Example:

"lipsync-2"

object
enum<string>

Specific task type

Available options:
video.generation.task
progress
integer

Task progress percentage (0-100)

Required range: 0 <= x <= 100
Example:

0

status
enum<string>

Task status

Available options:
pending,
processing,
completed,
failed
Example:

"pending"

type
enum<string>

Task output type

Available options:
video
Example:

"video"

usage
object

Usage and billing information