---
title: "Generate voice"
method: POST
path: "/api/agents/generate/voice"
---

# Generate voice

`POST /api/agents/generate/voice`

## Request

- Base URL: `https://splice.film.fun`
- URL: `https://splice.film.fun/api/agents/generate/voice`
- Auth: API key in header `x-api-key`

Text-to-speech. Put only the words to speak in text (all of it is read aloud) and how to say them in style_instruction. Model settings (voice, speaker, language) go in parameters; parameters.prompt/text are refused. Uses default production if production_id omitted.

## Request body

- object
  - `production_id` string
  - `text` string, required: The words to speak, exactly as they should be heard. Never put directions here.
  - `style_instruction` string: How to say the words, never spoken: tone, emotion, accent, pace (e.g. "warm, calm, slow, Australian accent"). googleGeminiFlashTts and qwen3tts; other models ignore it with a warning.
  - `modelId` string
  - `parameters` object: Model settings, e.g. {voice, language} for Gemini or {speaker, mode} for Qwen 3 TTS.

## Response `201`

Generated

- ProductionItemId
  - `production_item_id` string, required

## Other responses

- `400`: Validation failed
- `401`: Unauthorized
- `404`: Production not found
- `503`: Generate failed

---

[API](https://skmtc.dev/film/apis/film-fun-splice-agent-api.md) · [All operations](https://skmtc.dev/film/apis/film-fun-splice-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/film/apis/film-fun-splice-agent-api/revisions/72c22f361c20?raw)
