---
title: "OpenAI-compatible text-to-speech"
method: POST
path: "/api/v1/audio/speech"
---

# OpenAI-compatible text-to-speech

`POST /api/v1/audio/speech`

## Request

- Base URL: `https://genmagic.co`
- URL: `https://genmagic.co/api/v1/audio/speech`
- Auth: HTTP bearer

Turn text into spoken audio. Returns raw audio bytes; a durable hosted URL rides the X-Media-Url header. Voiced verbatim (never brand-altered).

## Request body

- object
  - `input` string, required: The text to speak.
  - `model` string: Model id. Omit for the default.
  - `voice` string: Voice name (e.g. alloy). Defaults to a neutral voice.

## Response `200`

Success.

## Other responses

- `401`: authentication_error: missing or invalid API key.
- `402`: insufficient_quota: credit balance would go negative.
- `429`: rate_limit_error: over 300 requests/minute for this key.

---

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