---
title: "Synthesize speech from text"
method: POST
path: "/api/audio/{agentId}/audio-messages/synthesize"
tags: ["audio"]
---

# Synthesize speech from text

`POST /api/audio/{agentId}/audio-messages/synthesize`

## Request

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

Convert text to speech using agent's voice settings

## Path parameters

- `agentId` string, uuid, required

## Request body

- object
  - `text` string, required: Text to convert to speech
  - `options` object
    - `voice` string: Voice ID or name
    - `language` string: Language code

## Response `200`

Speech synthesized successfully

## Other responses

- `400`: Invalid request
- `404`: Agent not found
- `500`: Error synthesizing 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)
