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
Generate a 720p narrated talking-avatar MP4 video from a single portrait photo and verbatim spoken script.
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"
}
}Pass exactly 1 public HTTPS portrait photo in
image_urls and your verbatim spoken script in prompt. Output is a 720p narrated MP4 video (16:9, 9:16, 4:5, 5:4, 1:1, or auto; default 16:9) using the Warm Pro Narrator voice. Omit duration and generate_audio — output length is determined by the script and synthesized speech, and final billing settles on actual output seconds.Body
application/json
Was this page helpful?