HeyGen Video - Text to Video
Generate video from a text prompt with HeyGen Video. Optionally attach up to 9 reference images, 3 reference videos and 3 reference audio files (12 in total) to guide the subjects and style. Audio is always generated.
Endpoint
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Request Parameters
| Field Name | Type | Example | Description | Required |
|---|---|---|---|---|
| type | string | TEXT_TO_VIDEO | Feature identifier | ✔️ |
| model | string | heygen/heygen-video-1 | AI model to use | ✔️ |
| conversationId | string | TEXT_TO_VIDEO | Conversation context | ✔️ |
| promptObject.prompt | string | A cat surfing on a neon wave, cinematic lighting | Text description of the video. 1-32000 characters | ✔️ |
| promptObject.resolution | string | 768p | Output resolution: 480p, 768p or 2K | ✔️ |
| promptObject.duration | number | 5 | Video duration in seconds, an integer from 5 to 15 | ✔️ |
| promptObject.ratio | string | 16:9 | Aspect ratio: 21:9, 16:9, 4:3, 1:1, 3:4 or 9:16. At 2K only 16:9 and 9:16 are accepted. Defaults to 16:9 when omitted | ❌ |
| promptObject.seed | number | 12345 | Random seed for reproducible generation. Integer from 0 to 4294967295 | ❌ |
| promptObject.prompt_enhancement | string | quality | How the prompt is expanded before generation: turbo (fastest), quality (default, balanced) or disabled (prompt sent exactly as written). Sent to the provider as prompt_enhancement | ❌ |
| promptObject.imageUrls | string[] | ["images/character.png"] | S3 object keys (not public URLs) returned by the Asset API — upload each file first, then pass the returned paths. Up to 9 reference images (reference-to-video) | ❌ |
| promptObject.videoUrls | string[] | ["videos/clip.mp4"] | S3 object keys returned by the Asset API. Up to 3 reference videos | ❌ |
| promptObject.audioUrls | string[] | ["audios/voice.mp3"] | S3 object keys returned by the Asset API. Up to 3 reference audio files. Images, videos and audio together: max 12 | ❌ |
References and prompt labels
- In reference-to-video, list order becomes the label you address in the prompt: the first entry of
imageUrlsis<Picture 1>, the second is<Picture 2>; the first entry ofvideoUrlsis<Video 1>, and so on. Images, videos and audio are numbered independently. - The API does not rewrite these labels.
prompt_enhancementcan reword the rest of the prompt; set it todisabledto keep your text as written.
Code Examples
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "TEXT_TO_VIDEO",
"model": "heygen/heygen-video-1",
"conversationId": "TEXT_TO_VIDEO",
"promptObject": {
"prompt": "A cat surfing on a neon wave, cinematic lighting",
"resolution": "768p",
"duration": 5,
"ratio": "16:9",
"imageUrls": ["images/character.png"]
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'TEXT_TO_VIDEO',
model: 'heygen/heygen-video-1',
conversationId: 'TEXT_TO_VIDEO',
promptObject: {
prompt: 'A cat surfing on a neon wave, cinematic lighting',
resolution: '768p',
duration: 5,
ratio: '16:9',
imageUrls: ['images/character.png']
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "TEXT_TO_VIDEO",
"model": "heygen/heygen-video-1",
"conversationId": "TEXT_TO_VIDEO",
"promptObject": {
"prompt": "A cat surfing on a neon wave, cinematic lighting",
"resolution": "768p",
"duration": 5,
"ratio": "16:9",
"imageUrls": ["images/character.png"]
}
}
response = requests.post(url, headers=headers, json=data)
Response
{
"aiRecord": {
"model": "heygen/heygen-video-1",
"type": "TEXT_TO_VIDEO",
"metadata": {
"credit": 540000,
"usage": {
"cost": 0.18
}
},
"status": "SUCCESS",
"aiRecordDetail": {
"resultObject": [
"development/videos/2026_10_24_10_00_00_000_000000.mp4"
]
}
}
}