cURL
curl https://api.apipod.ai/v1/videos/generations \
-H "Authorization: Bearer $APIPOD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "heygen-avatar-iv",
"image_urls": ["https://cdn.example.com/portrait.png"],
"prompt": "Welcome to the team. Here is what to expect on your first day.",
"aspect_ratio": "16:9",
"resolution": "720p"
}'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-iv",
"image_urls": ["https://cdn.example.com/portrait.png"],
"prompt": "Welcome to the team. Here is what to expect on your first day.",
"aspect_ratio": "16:9",
"resolution": "720p",
},
)
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-iv\",\n \"image_urls\": [\n \"https://cdn.example.com/portrait.png\"\n ],\n \"prompt\": \"Welcome to the team. Here is what to expect on your first day.\"\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-iv",
image_urls: ["https://cdn.example.com/portrait.png"],
prompt: "Welcome to the team. Here is what to expect on your first day.",
aspect_ratio: "16:9",
resolution: "720p",
}),
});
console.log(await res.json());{
"code": 200,
"message": "success",
"data": {
"task_id": "vid_task_01JEXAMPLE"
}
}HeyGen Avatar
HeyGen Avatar IV
用一张人像照片和口播稿生成 720p 有声数字人视频,成片时长由稿件和合成语音决定。
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-iv",
"image_urls": ["https://cdn.example.com/portrait.png"],
"prompt": "Welcome to the team. Here is what to expect on your first day.",
"aspect_ratio": "16:9",
"resolution": "720p"
}'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-iv",
"image_urls": ["https://cdn.example.com/portrait.png"],
"prompt": "Welcome to the team. Here is what to expect on your first day.",
"aspect_ratio": "16:9",
"resolution": "720p",
},
)
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-iv\",\n \"image_urls\": [\n \"https://cdn.example.com/portrait.png\"\n ],\n \"prompt\": \"Welcome to the team. Here is what to expect on your first day.\"\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-iv",
image_urls: ["https://cdn.example.com/portrait.png"],
prompt: "Welcome to the team. Here is what to expect on your first day.",
aspect_ratio: "16:9",
resolution: "720p",
}),
});
console.log(await res.json());{
"code": 200,
"message": "success",
"data": {
"task_id": "vid_task_01JEXAMPLE"
}
}在
image_urls 中传入恰好 1 张公开 HTTPS 人像照片,在 prompt 中填写需要逐字念出的口播稿。模型使用固定 Warm Pro Narrator 音色输出 720p 有声 MP4,画幅支持 16:9、9:16、4:5、5:4、1:1 与 auto(默认 16:9)。请省略 duration 和 generate_audio,提交时按稿件字数预扣,成片交付后按实测输出秒数自动多退少补结算。请求体
application/json
此页面对您有帮助吗?