{"uid":"cap_z7pZtFgC506PLQSMHvGT6","slug":"onchain-router-text-to-speech-2eb60194","name":"Onchain Router Text-to-Speech","description":"Give agents provider-neutral access to text, image, and speech models with USDC payments on Base, local spending controls, ambiguity-safe recovery, and verified receipts. Stable public npm clients and MIT agent integrations are available now.","url":"https://onchainrouter.dev/v1/audio/speech","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"string","maxLength":2000,"minLength":1},"model":{"enum":["elevenlabs/flash-v2.5"],"type":"string"},"speed":{"type":"number","maximum":1.2,"minimum":0.7,"multipleOf":0.001},"voice":{"enum":["darian","talia","elara","baxter","eldrin","kellan","elowen","kaelen","lawrence","alicia","maisie","warren","jade","eddie","caleb","sawyer","finley","florence","wyatt","bella"],"type":"string","description":"Optional public alias; omission uses the selected model's default voice."},"response_format":{"enum":["mp3"],"type":"string"}}},"responseSchema":{"type":"json","example":{"id":"spch_example","data":[{"url":"https://onchainrouter.dev/v1/media/audio/example?access=capability"}],"model":"elevenlabs/flash-v2.5","usage":{"input_characters":19}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_oR3C9bpR6rRxE72cnrYwk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts text input to spoken audio using ElevenLabs Flash v2.5, returning a 24-hour encrypted capability URL to an MP3 file","exampleAgentPrompt":"Can you read out this product description using the 'darian' voice at normal speed and give me the MP3: 'Introducing the world's most comfortable running shoe — engineered for speed and built for endurance.'","exampleUseCases":[{"title":"Voiceover for product listing","prompt":"Turn this product description into an audio voiceover using the 'talia' voice at speed 1.0: 'Our organic cold-brew coffee is slow-steeped for 24 hours for a smooth, bold flavor with no bitterness.'"},{"title":"Podcast intro narration","prompt":"Generate an MP3 of this podcast intro script using the 'lawrence' voice at speed 0.9: 'Welcome to The Future of Work — the show where we explore how technology is reshaping careers, companies, and creativity.'"},{"title":"Accessibility audio for article","prompt":"Can you convert this article summary into spoken audio using the 'bella' voice at speed 1.0: 'Researchers at MIT have developed a new battery material that could double the range of electric vehicles while cutting charging time in half.'"}],"resultDescription":"A JSON object containing a speech ID, the model used, character usage count, and a time-limited (24-hour) encrypted capability URL pointing to the generated MP3 audio file hosted on onchainrouter.dev.","failureModes":["Input text exceeds 2000 character limit — request rejected with validation error","Invalid voice alias not in the allowed enum — returns schema validation error","Speed value outside 0.7–1.2 range or not a multiple of 0.001 — rejected","Insufficient USDC balance for x402 payment — payment authorization fails","Capability URL expires after 24 hours — audio is no longer accessible","Model field set to unsupported value — returns enum validation error"],"whenToPreferThis":"Choose this endpoint when you need fast, high-quality speech synthesis via ElevenLabs Flash v2.5 with a selection of 20 named voices, and want to pay per call in USDC via x402 with no subscription. Prefer this over alternatives when operating in an onchain or crypto-native payment context, or when a 24-hour hosted MP3 URL is sufficient for your use case.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T17:53:03.066Z","isFirstParty":false}