---
title: "Generate speech from text"
method: POST
path: "/api/audio/{agentId}/speech/generate"
tags: ["audio"]
---

# Generate speech from text

`POST /api/audio/{agentId}/speech/generate`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/audio/{agentId}/speech/generate`
- Auth: none declared

Generate speech audio from text using agent's voice settings

## Path parameters

- `agentId` string, uuid, required

## Request body

- object
  - `text` string, required: Text to convert to speech

## Response `200`

Speech generated successfully

## Other responses

- `400`: Invalid request
- `404`: Agent not found
- `500`: Error generating speech

---

[API](https://skmtc.dev/elizaos/apis/eliza-os-api.md) - [All operations](https://skmtc.dev/elizaos/apis/eliza-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/elizaos/apis/eliza-os-api/revisions/d606a12682bb?raw)
