{"uid":"cap_THuXvpBizWJcNf7erfZzB","slug":"elevenlabs-text-to-speech-via-tokens-fun-be78dd70","name":"ElevenLabs Text-to-Speech via tokens.fun","description":"ElevenLabs text-to-speech: send text (up to 4000 chars) with optional voice_id, model, format, and speed; get back a hosted audio_url plus size and content type. Send 'Accept: audio/mpeg' to stream raw audio bytes directly instead. Voice catalog with free preview clips at GET /voices (no payment). Priced per character; the 402 amount is computed from your text length.","url":"https://tts-service-production-e8a7.up.railway.app/speak","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Text to synthesize into speech. Max 4000 characters."},"model":{"type":"string","description":"TTS model id from GET /voices. Optional, default eleven_flash_v2_5."},"speed":{"type":"number","description":"Playback speed 0.7-1.2. Optional, default 1."},"format":{"type":"string","description":"Output audio format. Optional, default mp3_44100_128."},"voice_id":{"type":"string","description":"ElevenLabs voice id from GET /voices. Optional; a default voice is used if omitted."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GSwgggdeL20bGygE874AT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts input text (up to 4000 characters) to speech audio using ElevenLabs, returning a hosted audio URL or streamable raw audio bytes.","exampleAgentPrompt":"Can you convert this script into speech using ElevenLabs — use the 'Rachel' voice and give me a hosted audio link I can share: 'Welcome to our weekly product update. This week we shipped three major features...'","exampleUseCases":[{"title":"Voiceover for product demo video","prompt":"Turn this product description into a voiceover using ElevenLabs — a professional-sounding female voice at normal speed, and give me the hosted audio URL: 'Introducing FlowDesk, the all-in-one workspace for modern teams. Collaborate, plan, and ship faster than ever before.'"},{"title":"Podcast narration from blog post","prompt":"Convert this blog post excerpt into speech audio I can use in my podcast — use the eleven_flash_v2_5 model and send it back as an mp3 link: 'Artificial intelligence is reshaping how we build software. In this post, we explore five tools every developer should know in 2025.'"},{"title":"Accessibility audio version of article","prompt":"Read this article section aloud and give me a hosted audio file link so I can add an audio version to my website: 'Climate change is accelerating at an unprecedented rate, with global temperatures rising 1.2 degrees Celsius above pre-industrial levels.'"}],"resultDescription":"Returns a JSON object containing a hosted audio_url (publicly accessible link to the generated audio file), the file size in bytes, and the content type (e.g. audio/mpeg). If the Accept header is set to audio/mpeg, raw audio bytes are streamed directly instead.","failureModes":["Text exceeds 4000 characters — request rejected with error","Invalid voice_id — falls back to default voice or returns error","Invalid model ID — returns error referencing valid models from /voices","Payment required (402) if x402 payment header is missing or insufficient — amount computed from text length","Unsupported audio format string — returns format error","Speed value outside 0.7–1.2 range — returns validation error"],"whenToPreferThis":"Choose this endpoint when you need to convert text to speech via ElevenLabs and want a simple hosted audio URL back without managing ElevenLabs API keys directly. It is ideal for agents that need to pay per-use with USDC via x402 protocol, require a publicly accessible audio link, or want to optionally stream raw audio bytes. Prefer this over direct ElevenLabs API calls when operating in a pay-per-call agent context without long-term API subscriptions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T17:51:23.290Z","isFirstParty":false}