cURL
curl https://api.apipod.ai/v1/videos/generations \
-H "Authorization: Bearer $APIPOD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "heygen-avatar-6-turbo",
"image_urls": ["https://cdn.example.com/portrait.png"],
"audio_urls": ["https://cdn.example.com/speech.wav"],
"prompt": "Face the camera and use small, natural hand gestures while speaking.",
"resolution": "1080p"
}'import os, requests
res = requests.post(
"https://api.apipod.ai/v1/videos/generations",
headers={"Authorization": f"Bearer {os.environ['APIPOD_API_KEY']}"},
json={
"model": "heygen-avatar-6-turbo",
"image_urls": ["https://cdn.example.com/portrait.png"],
"audio_urls": ["https://cdn.example.com/speech.wav"],
"prompt": "Face the camera and use small, natural hand gestures while speaking.",
"resolution": "1080p",
},
)
print(res.json())package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apipod.ai/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"heygen-avatar-6-turbo\",\n \"image_urls\": [\n \"https://cdn.example.com/portrait.png\"\n ],\n \"audio_urls\": [\n \"https://cdn.example.com/speech.wav\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}falseconst res = await fetch("https://api.apipod.ai/v1/videos/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.APIPOD_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "heygen-avatar-6-turbo",
image_urls: ["https://cdn.example.com/portrait.png"],
audio_urls: ["https://cdn.example.com/speech.wav"],
prompt: "Face the camera and use small, natural hand gestures while speaking.",
resolution: "1080p",
}),
});
console.log(await res.json());{
"code": 200,
"message": "success",
"data": {
"task_id": "vid_task_01JEXAMPLE"
}
}HeyGen Avatar
HeyGen Avatar 6 Turbo
Generate a 1080p audio-driven lip-sync avatar video from a single portrait photo and speech audio, with optional motion prompts.
POST
https://api.apipod.ai
/
v1
/
videos
/
generations
cURL
curl https://api.apipod.ai/v1/videos/generations \
-H "Authorization: Bearer $APIPOD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "heygen-avatar-6-turbo",
"image_urls": ["https://cdn.example.com/portrait.png"],
"audio_urls": ["https://cdn.example.com/speech.wav"],
"prompt": "Face the camera and use small, natural hand gestures while speaking.",
"resolution": "1080p"
}'import os, requests
res = requests.post(
"https://api.apipod.ai/v1/videos/generations",
headers={"Authorization": f"Bearer {os.environ['APIPOD_API_KEY']}"},
json={
"model": "heygen-avatar-6-turbo",
"image_urls": ["https://cdn.example.com/portrait.png"],
"audio_urls": ["https://cdn.example.com/speech.wav"],
"prompt": "Face the camera and use small, natural hand gestures while speaking.",
"resolution": "1080p",
},
)
print(res.json())package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apipod.ai/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"heygen-avatar-6-turbo\",\n \"image_urls\": [\n \"https://cdn.example.com/portrait.png\"\n ],\n \"audio_urls\": [\n \"https://cdn.example.com/speech.wav\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}falseconst res = await fetch("https://api.apipod.ai/v1/videos/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.APIPOD_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "heygen-avatar-6-turbo",
image_urls: ["https://cdn.example.com/portrait.png"],
audio_urls: ["https://cdn.example.com/speech.wav"],
prompt: "Face the camera and use small, natural hand gestures while speaking.",
resolution: "1080p",
}),
});
console.log(await res.json());{
"code": 200,
"message": "success",
"data": {
"task_id": "vid_task_01JEXAMPLE"
}
}Pass exactly 1 public HTTPS portrait photo in
image_urls and 1 public HTTPS speech audio URL in audio_urls. prompt is optional (up to 1200 characters) to direct posture, expressions, and hand gestures. Output is 1080p with aspect ratio following the photo (auto) and duration following the speech audio. Omit duration and generate_audio.Body
application/json
Was this page helpful?