HeyGen Video 1 Text to Video
Model id: heygen/video-1-text-to-video. HeyGen Video 1 generates a 5–30 second video with its own soundtrack (dialogue, ambience, effects) from a text prompt, at 480p to 2K. Does not support tools/fun
Model Overview
HeyGen Video 1 generates a 5–30 second video with its own soundtrack (dialogue, ambience, effects) from a text prompt, at 480p to 2K. Does not support tools/function calling.
Setup your API Key
If you don't have an API key yet, use our Quickstart guide.
How to Make a Call
API Schemas
Create a video generation task and send it to the server
Description of the video: subject, setting, camera, light and sound. Quote dialogue to have it spoken (max 32000 characters).
Aspect ratio of the video.
16:9Possible values: Output resolution. The price per second depends on it.
768pPossible values: Video length in seconds, from 5 to 30. Billed per requested second.
5How much HeyGen rewrites the prompt before generation. "ultraquality" and "disabled" limit duration to 15 seconds.
qualityPossible values: Random seed (0–4294967295) for reproducibility.
Successful response.
The ID of the generated video.
60ac7c34-3224-4b14-8e7d-0aa0db708325The current status of the generation task.
completedPossible values: curl --request POST \
--url 'https://api.aimlapi.com/v2/video/generations' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
--header 'Content-Type: application/json' \
--data '{"model": "heygen/video-1-text-to-video", "prompt": "Describe what you want the model to generate.", "duration": 5}'Successful response.
{
"id": "60ac7c34-3224-4b14-8e7d-0aa0db708325",
"status": "completed",
"video": {
"url": "https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4"
},
"error": {
"name": "text",
"message": "text"
},
"meta": {
"usage": {
"credits_used": 120000,
"usd_spent": 0.06
}
}
}Retrieve the generated video from the server
Poll this endpoint with the generation_id returned by the submit request. When the status is completed, the response includes the generated video URL.
Bearer key
<REPLACE_WITH_YOUR_GENERATION_ID>The ID of the generated video.
60ac7c34-3224-4b14-8e7d-0aa0db708325The current status of the generation task.
completedPossible values: curl -L \
--request GET \
--url 'https://api.aimlapi.com/v2/video/generations?generation_id=<REPLACE_WITH_YOUR_GENERATION_ID>' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>'{
"id": "60ac7c34-3224-4b14-8e7d-0aa0db708325",
"status": "completed",
"video": {
"url": "https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4"
},
"error": {
"name": "text",
"message": "text"
},
"meta": {
"usage": {
"credits_used": 120000
}
}
}Code Example
The examples submit a generation task and poll every 15 seconds until the final result is available.
Last updated
Was this helpful?