{"uid":"cap_W-wnAWcZhJlwAWLyxIleS","slug":"audio-withzero-xyz-xai-grok-voice-text-to-speech-5219a71b","name":"xAI Grok Voice Text-to-Speech","description":"Convert text to natural-sounding speech with xAI's Grok Voice and return a hosted audio URL.","url":"https://audio.withzero.xyz/api/v1/speech/grok-voice","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","example":{"input":"Hello from WithZero — this is a text to speech sample."},"required":["input","voice"],"properties":{"input":{"type":"string","maxLength":4000,"minLength":1,"description":"The text to convert to speech (1–4000 characters)."},"voice":{"type":"string","default":"default","maxLength":64,"minLength":1,"description":"Voice to speak with. Defaults to \"default\"."}},"additionalProperties":false},"responseSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["url","mimeType","sizeBytes","seconds","model","price_usdc"],"properties":{"url":{"type":"string","description":"Hosted URL of the generated audio (WAV, 24kHz mono)."},"model":{"type":"string","description":"The model that produced the audio."},"seconds":{"type":"number","description":"Approximate duration of the generated audio in seconds."},"mimeType":{"type":"string","description":"Content type of the generated audio."},"sizeBytes":{"type":"number","description":"Size of the generated audio in bytes."},"price_usdc":{"type":"string","description":"The amount charged for this request, in USDC."}},"additionalProperties":false},"example":{"request":{"input":"Welcome to our annual product launch. We're thrilled to share what we've been building.","voice":"default"},"response":{"url":"https://storage.googleapis.com/withzero/audio/9dc54632-87d0-469a-b561-1f3e317a0c0d.wav","model":"x-ai/grok-voice-tts-1.0","seconds":4.3,"mimeType":"audio/wav","sizeBytes":204044,"price_usdc":"0.00174"}},"exampleRequest":{"input":"Welcome to our annual product launch. We're thrilled to share what we've been building.","voice":"default"},"tags":[],"displayCostAmount":"0.00174","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.00174/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_L2bm6oqcGmAL_QZyDLvfd","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":"audio.grok-voice:1"}],"brandName":"audio.withzero.xyz","brandSlug":"audio-withzero-xyz-mpp","brandBaseUrl":"https://audio.withzero.xyz","brandDocsUrl":null,"whatItDoes":"Converts text input into natural-sounding speech using xAI's Grok Voice model and returns a hosted WAV audio URL.","exampleAgentPrompt":"Can you read this aloud using xAI's Grok Voice: 'Welcome to our annual product launch. We're thrilled to share what we've been building.' Use the default voice.","exampleUseCases":[{"title":"Podcast episode audio generation","prompt":"I've written the transcript for my podcast episode. Can you convert it to audio using Grok Voice so I can listen through it before publishing?"},{"title":"Accessibility audio for blog articles","prompt":"Turn this blog post into spoken audio with Grok Voice so my readers can listen while they commute. Make sure it sounds natural and professional."},{"title":"Customer announcement voiceover creation","prompt":"We need to send an audio message to our customers announcing new features. Can you synthesize this announcement text into speech using xAI's Grok Voice?"}],"resultDescription":"Returns a JSON object containing a hosted URL pointing to a WAV audio file (24kHz mono), the MIME type, file size in bytes, approximate duration in seconds, the model name used, and the USDC amount charged for the request.","failureModes":["Text input exceeds 4000 characters — request rejected with validation error","Empty or missing input field — returns 400 bad request","Invalid or unrecognized voice identifier — may fall back to default or return error","Service unavailable or xAI model downtime — 500 or 503 response","Audio hosting failure — URL returned may be temporarily inaccessible"],"whenToPreferThis":"Choose this endpoint when you specifically want xAI's Grok Voice model for text-to-speech synthesis, particularly if you need a hosted audio URL returned directly without managing file storage yourself. Prefer this over Google Gemini TTS or OpenAI TTS when you want xAI's voice characteristics or are comparing voice quality across providers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":3,"lastUsedAt":"2026-07-29T00:21:11.088Z","lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:42:20.913Z","isFirstParty":true}