Loading...
Loading...
Best practices for HeyGen - AI avatar video creation API. Use when creating AI avatar videos, generating talking head videos, or integrating HeyGen with Remotion.
npx skill4agent add yonatangross/orchestkit heygen-avatars// Check remaining quota
const response = await fetch("https://api.heygen.com/v2/user/remaining_quota", {
headers: { "X-Api-Key": process.env.HEYGEN_API_KEY! }
});
// Generate avatar video
const video = await fetch("https://api.heygen.com/v2/video/generate", {
method: "POST",
headers: {
"X-Api-Key": process.env.HEYGEN_API_KEY!,
"Content-Type": "application/json"
},
body: JSON.stringify({
video_inputs: [{
character: { type: "avatar", avatar_id: "your-avatar-id" },
voice: { type: "text", input_text: "Hello world!", voice_id: "your-voice-id" }
}],
dimension: { width: 1280, height: 720 }
})
});remotion-composerelevenlabs-narrationdemo-producervideo-pacing