# OpenAI Text-to-Speech (TTS) via x402 Gateway

> OpenAI Text-to-Speech (TTS) via x402 Gateway is a paid API for AI agents from x402-gateway-production.up.railway.app, paid per call via x402, $0.010000/call, not verified (last probed 2026-10-12); live alternatives: x402engine ElevenLabs Text-to-Speech ($0.02) and Google Gemini 3.1 Flash TTS ($0.0028).

Agents call it through Zero, which pays per call: no API key and no wallet of your own. New accounts start with $5.

Live alternatives for the same use case:
- [x402engine ElevenLabs Text-to-Speech](https://www.zero.xyz/c/x402engine-elevenlabs-text-to-speech-6db68b62) ($0.02)
- [Google Gemini 3.1 Flash TTS](https://www.zero.xyz/c/audio-withzero-xyz-google-gemini-3-1-flash-tts-text-to-speech-f794324b) ($0.0028)

Converts input text to natural-sounding audio speech using OpenAI TTS, with 6 voice options, HD quality mode, and multiple output audio formats

## Facts

- Endpoint: POST https://x402-gateway-production.up.railway.app/api/tts/openai?utm_source=zero.xyz
- Price: $0.010000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Last successful call: 2026-06-23
- Success rate: 85% of calls made through Zero
- Rating: 3.9 / 5 from 9 reviews
- Activations on Zero: 219
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-production-up-railway-app-80fe4e88
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lNke_t8nd244hZPPqmFRz

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 x402-gateway-production-up-railway-app-80fe4e88 -d '<json body>'
```

Example prompt: Read the following product description aloud using the 'nova' voice in HD quality and give me an MP3: 'Introducing the Aria Pro headphones — crystal-clear sound, 40-hour battery life, and featherlight comfort.'

## When to prefer this

Choose this endpoint when you need high-quality OpenAI TTS voice synthesis with HD audio support and multiple format options, particularly when operating in an x402 micropayment context. Prefer this over custom voice-cloning endpoints when you need reliable, consistent, pre-defined voices without needing to match a specific speaker.

## Known failure modes

- Text too long — exceeds character/token limit for a single TTS request
- Invalid voice name — must be one of the 6 supported OpenAI TTS voices
- Unsupported audio format requested
- Payment failure — insufficient USDC balance or x402 payment not processed
- Empty or missing text input

## How this service works

Convert text to natural speech using OpenAI TTS — 6 voices, HD quality option, multiple audio formats

## Output

Returns synthesized speech audio in the requested format (e.g. MP3, WAV, OGG) generated from the input text using the selected OpenAI TTS voice at standard or HD quality.

## Example request

```json
{
 "text": "The quick brown fox jumps over the lazy dog. This is a test of the text-to-speech API.",
 "voice": "nova",
 "format": "mp3",
 "quality": "hd"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "example": "Hello world",
       "description": "Text to convert to speech"
      },
      "model": {
       "type": "string",
       "default": "tts-1",
       "example": "tts-1",
       "description": "TTS model (tts-1, tts-1-hd)"
      },
      "voice": {
       "type": "string",
       "default": "alloy",
       "example": "alloy",
       "description": "Voice ID (alloy, echo, fable, onyx, nova, shimmer)"
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-production-up-railway-app-80fe4e88/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production.up.railway.app](https://www.zero.xyz/host/x402-gateway-production.up.railway.app/llms.txt)
