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

FieldTypeRequiredDefaultNotes
filebinary✔︎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:

  1. Save the video_id returned in the response
  2. Reuse the video_id in subsequent /api/process-video requests instead of uploading the same video file multiple times
  3. 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-video

Important Notes

  • The registered video serves as your "avatar" or base video
  • When both video_id and file are provided in /api/process-video, the video_id takes 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).