# Telnyx x402 Text-to-Speech (Audio/Speech)

> Telnyx x402 Text-to-Speech (Audio/Speech) is a paid API for AI agents from x402.telnyx.com, paid per call via x402, $0.018/call, status unknown (last checked 2026-10-12).

Converts input text into spoken audio (MP3) using Telnyx's TTS engine, billed per-request at $0.018 USDC via x402 micropayment protocol.

## Facts

- Endpoint: POST https://x402.telnyx.com/v1/audio/speech?utm_source=zero.xyz
- Price: $0.018/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/telnyx-x402-text-to-speech-audio-speech-3268bac4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X0dvwvQDklVzM3BVzO-Yf

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability telnyx-x402-text-to-speech-audio-speech-3268bac4 -d '<json body>'
```

Example prompt: Can you read aloud this text using the 'nova' voice and give me an MP3: 'Welcome to our platform. We're glad you're here. Let's get started together.'

## When to prefer this

Choose this endpoint when you need OpenAI-compatible TTS voice names (alloy, echo, fable, onyx, nova, shimmer) but want to pay per-request with USDC via the x402 micropayment protocol without managing a traditional API subscription. It is ideal for agents or workflows that need frictionless, crypto-native billing and want to leverage Telnyx's voice infrastructure. Prefer this over standard Telnyx REST API when operating in a crypto-payment context or building x402-native agent pipelines.

## Known failure modes

- Text input exceeds 3000 character limit — request rejected
- Invalid or unsupported voice ID — may return an error or fall back to default
- Payment failure via x402 protocol — request not fulfilled if USDC payment is rejected
- Empty text input — validation error returned
- Unsupported response_format value — only 'mp3' is accepted

## How this service works

Pay USDC per request for Telnyx Inference and Audio (text-to-speech, speech-to-text) through x402.

## Output

Returns raw binary audio bytes in MP3 format (audio/mpeg) containing the synthesized speech for the provided text input. The response is a binary stream, not a JSON envelope.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "maxLength": 3000,
   "minLength": 1,
   "description": "Text to synthesize (max 3000 characters)."
  },
  "model": {
   "type": "string",
   "description": "Accepted for OpenAI SDK compatibility; the voice id selects the engine."
  },
  "voice": {
   "type": "string",
   "description": "OpenAI voice name (alloy, echo, fable, onyx, nova, shimmer, …) or Telnyx voice id (Provider.Model.VoiceId). Full catalog: GET /v1/audio/voices."
  },
  "response_format": {
   "enum": [
    "mp3"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": "<binary audio/mpeg bytes>"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/telnyx-x402-text-to-speech-audio-speech-3268bac4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.telnyx.com](https://www.zero.xyz/host/x402.telnyx.com/llms.txt)
