# OpenRouter APIs — HeyGen: HeyGen Voice Turbo (heygen/heygen-voice-1-turbo)

Guide for calling every confirmed OpenRouter API that serves `heygen/heygen-voice-1-turbo`.

Model page: https://openrouter.ai/heygen/heygen-voice-1-turbo
Create an API key: https://openrouter.ai/settings/keys

## Authentication

Send this header with every request:

- Authorization: Bearer $OPENROUTER_API_KEY

## Text-to-Speech API

Synthesize audio with `heygen/heygen-voice-1-turbo` through OpenRouter's Text-to-Speech API.

Docs: https://openrouter.ai/docs/api/api-reference/tts/create-speech

### Endpoint

POST https://openrouter.ai/api/v1/audio/speech

Headers:
- Content-Type: application/json

### Request fields (heygen/heygen-voice-1-turbo)

- model: string (required) — `"heygen/heygen-voice-1-turbo"`
- input: string (required) — text to synthesize
- voice: "f34178ba32584bfb98434bf6d07f1253" | "2bf391d4c9b84cd48fad6204a8ac4021" | "671f346ac17c4ff398c93d8bdf97f2b9" | "7307eb1a76f54ad1a5d12eab76be788c" | "9c3daa60c47541b7970e7b68ef88ca4b" | "b326ed8f858944be9809a1dbc32015e7" | "c70c94f1bf2c4e48a30ab495af6dbd6f" | "bac324f1eba546d785ad55c3dce90d18" | "26be0fe6d9c84879b43d320e6146689e" | "a3186e55be9647d8b128908d0a0ee0c2" (optional) — provider-specific voice identifier
- response_format: "mp3" | "pcm" (optional) — output audio encoding; defaults to pcm

### Response

Success returns raw audio bytes, not JSON.

- `Content-Type` identifies the audio encoding, such as `audio/mpeg` or `audio/pcm`.
- `X-Generation-Id` identifies the billed generation.
- Write the response body directly to an audio file; do not call `response.json()`.

### Examples

#### Synthesize speech

```bash
curl https://openrouter.ai/api/v1/audio/speech \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  --output output.pcm \
  -d '{
  "model": "heygen/heygen-voice-1-turbo",
  "input": "Hello! This is a text-to-speech test.",
  "voice": "f34178ba32584bfb98434bf6d07f1253"
}'
```

### Error differences

- 400 — malformed audio input or an audio option the routed provider does not support
- 502 — the upstream audio operation failed

## Errors

Failures return `{"error": {"code": <number>, "message": <string>}}` with the HTTP status:

- 400 — malformed request or an unsupported parameter
- 401 — missing or invalid API key
- 402 — insufficient credits
- 403 — spend limit reached, key disabled, or access blocked
- 404 — unknown model or no provider can serve the request
- 429 — rate limited; retry with backoff
- 502 — the operation failed upstream; failed generations are not billed

---

Canonical version of this document: https://openrouter.ai/heygen/heygen-voice-1-turbo/llms.txt
