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
用一张人像照片和一段语音生成 1080p 对口型数字人视频,可用提示词控制动作与表情。
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"
}
}在
image_urls 中传入恰好 1 张公开 HTTPS 人像照片,在 audio_urls 中传入恰好 1 段公开 HTTPS 语音文件;prompt 可选(最多 1200 字符),用于控制动作与表情。输出为 1080p 视频,画幅自动跟随照片(auto),时长跟随输入音频。请省略 duration 和 generate_audio,提交时探测音频时长预扣,成片交付后按实测秒数复核结算。请求体
application/json
此页面对您有帮助吗?