---
title: "Generate a speech sample (TTS)"
method: POST
path: "/v1/voices/speech"
tags: ["Voices"]
---

# Generate a speech sample (TTS)

`POST /v1/voices/speech`

## Request

- Base URL: `https://api.vivideo.ai`
- URL: `https://api.vivideo.ai/v1/voices/speech`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/vivideo/apis/vivideo-api/docs/v1/voices/speech/post.ts> (a function with typed inputs; its response is checked against the schema)

Hear a voice say a line before using it in a video. Voice cloning is not available via the API.

## Request body

- object
  - `text` string, required
  - `voice_id` string, required

## Response `200`

Generated audio sample.

- object
  - `object` string
  - `audio_url` string
  - `duration_seconds` number
  - `voice_id` string

## Other responses

- `400`: Invalid parameters (`invalid_request`, `unknown_model`, `invalid_url`).
- `401`: Missing, malformed or revoked API key (`missing_api_key`, `invalid_api_key`, `api_key_revoked`).
- `429`: Rate limit hit (`rate_limited`). Honor the `Retry-After` header / `retry_after_seconds` field.

---

[API](https://skmtc.dev/vivideo/apis/vivideo-api.md) - [All operations](https://skmtc.dev/vivideo/apis/vivideo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vivideo/apis/vivideo-api/revisions/6e8a47e72b46?raw)
