Process Video Endpoint
POST /api/process-video
Create a new video-processing task. The server responds immediately with a video_id
; processing happens asynchronously.
Request Format
- Content-Type:
multipart/form-data
Parameters
All parameters are optional, but certain combinations are required:
Field | Type | Required | Default | Notes |
---|---|---|---|---|
file | binary | ✖︎ | null | Video to process (any common container/codec). Video is not required if video_id of registered avatar from /api/register-avatar is provided. |
description | string | ✖︎ | null | Caption or prompt that accompanies the video. Provided only if voice_generator is set either to "0" or "1". Not required if voice_generator == "2" and audio is provided. |
blur_background | bool | ✖︎ | true | Disable by sending false |
voice_generator | string 2 | ✖︎ | "0" | Selects the speech-synthesis engine |
voice_id | string | ✖︎ | "default" | Only used when voice_generator == "1" |
credential_voice_generator | string | ✖︎ | "default" | Optional and valid only when voice_generator == "1" |
lip_sync_correction | bool | ✖︎ | false | Enables lip-sync enhancement |
lip_sync_correction_model | string lipsync2 | ✖︎ | "lipsync2" | Model name when lip-sync correction is active |
eye_contact_correction | bool | ✖︎ | false | Enables gaze-alignment correction |
video_id | string | ✖︎ | null | A string video_id received after registering a video using /api/register-avatar. The video_id is given priority over the uploaded video file so that if both are provided then the video_id will be used to fetch the registered video. |
audio | binary | ✖︎ | null | An audio that accompanies the video and description will not be used when audio is provided. Audio can be provided only if voice_generator == "2" |
Examples
Example 1: Standard video processing with uploaded file
curl -X POST "https://api.aiframe.ai/api/process-video" \
-H "X-API-Key: YOUR_API_KEY" \
-F file=@"/path/to/video.mov" \
-F "description=Your caption here" \
-F "blur_background=true" \
-F "voice_generator=1" \
-F "voice_id=default" \
-F "credential_voice_generator=default" \
-F "lip_sync_correction=true" \
-F "lip_sync_correction_model=lipsync2" \
-F "eye_contact_correction=true"
Example 2: Using registered avatar (video_id)
curl -X POST "https://api.aiframe.ai/api/process-video" \
-H "X-API-Key: YOUR_API_KEY" \
-F "description=Your caption here" \
-F "blur_background=true" \
-F "voice_generator=1" \
-F "voice_id=default" \
-F "credential_voice_generator=default" \
-F "lip_sync_correction=false" \
-F "lip_sync_correction_model=lipsync2" \
-F "eye_contact_correction=true" \
-F "video_id=YOUR_REGISTERED_VIDEO_ID"
Example 3: Using audio input with registered avatar
curl -X POST "https://api.aiframe.ai/api/process-video" \
-H "X-API-Key: YOUR_API_KEY" \
-F "blur_background=true" \
-F "voice_generator=2" \
-F "voice_id=default" \
-F "credential_voice_generator=default" \
-F "lip_sync_correction=false" \
-F "lip_sync_correction_model=lipsync2" \
-F "eye_contact_correction=true" \
-F "video_id=YOUR_REGISTERED_VIDEO_ID" \
-F audio=@"/path/to/audio.mp3"
For detailed response formats and error codes, please see the API Reference (Swagger).