---
title: "Generate OpenAI-Compatible Voice ≤500 chars"
method: POST
path: "/v1/audio/speech"
---

# Generate OpenAI-Compatible Voice ≤500 chars

`POST /v1/audio/speech`

## Request

- Base URL: `https://voice.forgemesh.io`
- URL: `https://voice.forgemesh.io/v1/audio/speech`
- Auth: none declared

OpenAI-compatible text-to-speech endpoint (input, voice, response_format) for drop-in use with code already built against the OpenAI TTS API, 1 of 10 standard voices, up to 500 characters, WAV/FLAC/OGG output. Use it to: swap OpenAI TTS calls for a pay-per-call x402 alternative, generate speech from an existing OpenAI-style client, avoid API-key management for short text-to-audio requests. USDC on Base.

## Request body

- object
  - `input` string, required: OpenAI-compatible input text. Use non-long route for 1-500 chars and -long route for 501-2000 chars.
  - `voice` 'M1' | 'M2' | 'M3' | 'M4' | 'M5' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5': Standard voice: M1-M5 or F1-F5
  - `model` string: Optional compatibility field; ForgeMesh Voice is always used
  - `response_format` 'wav' | 'flac' | 'ogg': Requested audio format

## Response `200`

Successful synthesis response

## Other responses

- `400`: Invalid request or wrong pricing bucket
- `402`: Payment Required

---

[API](https://skmtc.dev/forgemesh/apis/text-to-speech-voice-generation.md) · [All operations](https://skmtc.dev/forgemesh/apis/text-to-speech-voice-generation/llms.txt) · [OpenAPI document](https://skmtc.dev/forgemesh/apis/text-to-speech-voice-generation/revisions/e4ba35932ef4?raw)
