# HeyGen Video Text to Video API

> HeyGen Video Text to Video turns a text prompt into a 5-15 second video at up to 2K resolution.

Source: https://www.sandbase.ai/models/heygen/heygen-video/text-to-video
API reference: https://www.sandbase.ai/models/heygen/heygen-video/text-to-video/docs

## Facts

- Provider: HeyGen
- Type: Video model
- Model ID: `heygen/heygen-video/text-to-video`
- Price: From $0.18 per run
- Capabilities: text to video
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "heygen/heygen-video/text-to-video",
  "duration": 5,
  "resolution": "768p",
  "aspect_ratio": "16:9"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call HeyGen Video Text to Video through SandBase?

Create a SandBase API key, then send requests with the model ID "heygen/heygen-video/text-to-video" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate HeyGen account?

No. One SandBase API key and balance gives you access to HeyGen Video Text to Video and the other models in the catalog; you do not need to sign up with HeyGen separately.

## README

### HeyGen Video Text to Video
HeyGen Video turns a text prompt into a 5–15 second video at up to 2K resolution.
#### Fields
| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Scene, action, camera and sound. |
| `aspect_ratio` | `21:9` / `16:9` / `4:3` / `1:1` / `3:4` / `9:16` | `16:9` | Output frame shape. |
| `resolution` | `480p` / `768p` / `1080p` / `2k` | `768p` | Output resolution; 1080p and 2k cost more. |
| `duration` | 5–15 | 5 | Output length in seconds. |
#### Billing
Billed per output second: $0.02 at 480p, $0.036 at 768p, $0.06 at 1080p and 2k.
| Output | Price |
|---|---|
| 5s, 768p (default) | $0.18 |
| 5s, 480p | $0.10 |
| 10s, 1080p | $0.60 |
| 15s, 2k | $0.90 |
Failed runs are not charged.
#### Prompting
- Describe subject, action, camera move and light in order.
#### Limits
- Clips are 5–15 seconds.
#### Also on SandBase
Other HeyGen Video endpoints: `heygen/heygen-video/image-to-video`, `heygen/heygen-video/reference-to-video`.
