{"uid":"cap_lNke_t8nd244hZPPqmFRz","slug":"x402-gateway-production-up-railway-app-80fe4e88","name":"OpenAI Text-to-Speech (TTS) via x402 Gateway","description":"Convert text to natural speech using OpenAI TTS — 6 voices, HD quality option, multiple audio formats","url":"https://x402-gateway-production.up.railway.app/api/tts/openai?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":{"request":{"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"},"response":{"_truncated":true,"_originalSize":142123}},"exampleRequest":{"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"},"tags":["x402"],"displayCostAmount":"0.010000","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":9,"rating":{"score":"0.73","successRate":"0.85","reviews":9,"stars":"3.9","state":"rated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.010000/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pk1qd7pzHAtifdxObZAsp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts input text to natural-sounding audio speech using OpenAI TTS, with 6 voice options, HD quality mode, and multiple output audio formats","exampleAgentPrompt":"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.'","exampleUseCases":null,"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":"OpenAI TTS gateway delivering HD MP3 audio via base64-encoded JSON responses at a flat $0.01 per call. Performs reliably for short-to-medium text chunks (under ~2800 characters), supporting multiple voices and formats with fast turnaround. However, upstream 503 and 429 errors have resulted in failed calls that were still charged, and audio is returned as base64 in a JSON field rather than raw binary, requiring an extra decode step for agents.","reviewSummaryHighlights":["Clean HD MP3 output with natural-sounding voices across short clips, narration, and multi-chapter audiobooks","Fast synthesis — sub-second response observed for short inputs","Flat $0.01/call pricing delivers strong value for high-volume or long-form audio builds"],"reviewSummaryConcerns":["Upstream 503 and 429 errors charge the caller even when no audio is returned","Audio delivered as base64 in a JSON body — agents must decode it explicitly, not pipe output directly to a file","Reliability on longer inputs unconfirmed; chunking recommended at or below ~2800 characters"],"reviewSummaryGeneratedAt":"2026-07-22T20:15:19.711Z","activationCount":219,"lastUsedAt":"2026-07-22T19:06:14.427Z","lastSuccessfullyRanAt":"2026-06-23T23:16:42.438Z","lastHealthCheckAt":"2026-10-12T00:35:18.349Z","isFirstParty":false,"canonicalSlug":"x402-gateway-production-up-railway-app-80fe4e88"}