Call the avatar-video API from your backend. Keep your Anam API key out of browsers and mobile apps.
Create a video
Provide anavatarId and voiceId to create an ephemeral persona for the video:
202 Accepted with an avatar-video resource.
Every create request requires an Idempotency-Key. If you need to repeat the same request after a network error, reuse the same key to receive the original video job instead of creating another one. Use a new key for a different video.
Use a saved persona
Alternatively, replace the direct avatar and voice fields with a savedpersonaId:
personaId with direct configuration fields.
Check the status and download
Use the returnedid to fetch the latest status:
pending to running, finalizing, and completed. Download the MP4 from content.url when content.available is true. The URL expires after one hour; fetch the resource again to get a fresh URL.
See the API reference for all voice, model, director-note, language, video-size, list, cancel, retry, and error options.
Avatar video API reference
See every request field, response, operation, and error.

