# OpenAI Text to Speech (TTS) via x402

> OpenAI Text to Speech (TTS) via x402 is a paid API for AI agents from openai.mm.family, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Converts text to spoken audio using OpenAI TTS models (gpt-4o-mini-tts, tts-1, tts-1-hd), returning audio bytes paid per call in USDC via x402

## Facts

- Endpoint: POST https://openai.mm.family/x402/v1/audio/speech?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openai-text-to-speech-tts-via-x402-5f2bca15
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SbaQ1qXTaAtQ5nM98N49N

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 openai-text-to-speech-tts-via-x402-5f2bca15 -d '<json body>'
```

Example prompt: Convert the following text to speech using the tts-1-hd model with the 'alloy' voice and return it as a WAV file: 'Welcome to our platform. We're glad you're here and hope you enjoy your experience.'

## When to prefer this

Choose this endpoint when you need high-quality OpenAI TTS audio generation with per-call USDC micropayment billing via the x402 protocol, especially if you want access to multiple model tiers (gpt-4o-mini-tts for cost efficiency, tts-1 for standard quality, tts-1-hd for high fidelity) and flexible audio output formats without managing OpenAI API keys directly.

## Known failure modes

- Input text exceeds 4096 character limit — request rejected
- Invalid or unsupported voice name — model may error or use a default
- Payment failure via x402 — call not processed
- Unsupported response_format value — schema validation error
- Model enum value not recognized — returns error
- Empty input string — may return silence or error

## How this service works

OpenAI text to speech (gpt-4o-mini-tts, tts-1, tts-1-hd), paid per call in USDC. OpenAI list $15 / $30 per 1M characters (tts-1 / tts-1-hd) or $12 per 1M audio tokens (gpt-4o-mini-tts, quoted at 4 per character), plus $0.0005 (Base) or $0.0005 (Solana) per call; up to 4096 characters. Standard OpenAI body (input, voice, response_format, speed). Returns the audio bytes. One endpoint per model: /x402/v1/models/<key>/audio/speech. Rates: https://openai.mm.family/x402/pricing

## Output

Binary audio bytes (default MP3, or the format specified via response_format such as opus, aac, flac, wav, or pcm) representing the synthesized speech of the input text, with content-type audio/mpeg or appropriate audio MIME type.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string"
  },
  "model": {
   "enum": [
    "gpt-4o-mini-tts",
    "tts-1",
    "tts-1-hd"
   ],
   "type": "string"
  },
  "speed": {
   "type": "number"
  },
  "voice": {
   "type": "string"
  },
  "instructions": {
   "type": "string"
  },
  "response_format": {
   "enum": [
    "mp3",
    "opus",
    "aac",
    "flac",
    "wav",
    "pcm"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "body": "binary audio bytes (mp3 by default)",
  "content_type": "audio/mpeg"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openai-text-to-speech-tts-via-x402-5f2bca15/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from openai.mm.family](https://www.zero.xyz/host/openai.mm.family/llms.txt)
