Register Avatar Endpoint
POST /api/register-avatar
Register a video for reuse. The server responds immediately with a video_id that can be reused in the /api/process-video endpoint.
Request Format
- Content-Type:
multipart/form-data
Parameters
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| file | binary | ✔︎ | — | Video for registration (any common container/codec) |
Response Format
Success Response (200 OK)
{
"video_id": "a1b2c3d4-e5f6-e7",
"registration_status": true
}Usage
Once you register a video with this endpoint:
- Save the
video_idreturned in the response - Reuse the
video_idin subsequent/api/process-videorequests instead of uploading the same video file multiple times - Benefits: Faster processing times and reduced bandwidth usage for repeated video processing tasks
Example: cURL
# example request to register-avatar endpoint
curl -X POST "https://api.aiframe.ai/api/register-avatar" \
-H "X-API-Key: YOUR_API_KEY" \
-F file=@"/path/to/video.mov"Using the Registered Avatar
After registration, use the returned video_id in process-video requests:
curl -X POST \
-H "X-API-Key: your_api_key_here" \
--form "video_id=a1b2c3d4-e5f6-e7" \
--form "description=Your new content here" \
--form "voice_generator=1" \
https://api.aiframe.ai/api/process-videoImportant Notes
- The registered video serves as your "avatar" or base video
- When both
video_idandfileare provided in/api/process-video, thevideo_idtakes priority - Registered videos are stored securely and associated with your API key
For detailed response formats and error codes, please see the API Reference (Swagger).