{"uid":"cap_NimudATiGhD3JQKi9QgWC","slug":"audio-withzero-xyz-google-gemini-3-1-flash-tts-text-to-speech-f794324b","name":"Google Gemini 3.1 Flash TTS – Text-to-Speech","description":"Convert text to natural-sounding speech with Google Gemini 3.1 Flash TTS and return a hosted audio URL.","url":"https://audio.withzero.xyz/api/v1/speech/gemini-3.1-flash-tts","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":"Kore","maxLength":64,"minLength":1,"description":"Voice to speak with. Defaults to \"Kore\"."}},"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 platform. We're excited to have you here and look forward to helping you get started today.","voice":"Kore"},"response":{"url":"https://storage.googleapis.com/withzero/audio/d707e4da-99ef-4c5a-8de6-d80cbcbd566a.wav","model":"google/gemini-3.1-flash-tts-preview","seconds":6.1,"mimeType":"audio/wav","sizeBytes":293804,"price_usdc":"0.00424"}},"exampleRequest":{"input":"Welcome to our platform. We're excited to have you here and look forward to helping you get started today.","voice":"Kore"},"tags":[],"displayCostAmount":"0.00356","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":2,"rating":{"score":"1.00","successRate":"0.75","reviews":2,"stars":"5.0","state":"rated"},"availabilityStatus":"healthy","priceObserved":{"p10Cents":"0.0600","medianCents":"0.3560","p90Cents":"0.5608","minCents":"0.0600","maxCents":"0.5608","p95Cents":"0.5608","sampleCount":80,"varies":true,"failureChargeRate":null},"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0–$0.01/call (observed)","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_bDWiA83xd5jDY3mNKDroS","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":"audio.gemini-3.1-flash-tts:1"}],"brandName":"audio.withzero.xyz","brandSlug":"audio-withzero-xyz-mpp","brandBaseUrl":"https://audio.withzero.xyz","brandDocsUrl":null,"whatItDoes":"Converts text (up to 4000 characters) to natural-sounding speech using Google Gemini 3.1 Flash TTS and returns a hosted WAV audio URL.","exampleAgentPrompt":"Can you read this aloud using Google Gemini 3.1 Flash TTS with the Kore voice: 'Welcome to our platform. We're excited to have you here and look forward to helping you get started today.'","exampleUseCases":null,"resultDescription":"Returns a JSON object containing a hosted WAV audio URL (24kHz mono), the MIME type, file size in bytes, approximate audio duration in seconds, the model name used, and the USDC price charged for the request.","failureModes":["Input text empty or missing — 400 validation error","Text exceeds 4000 character limit — 400 validation error","Invalid or unrecognized voice name — may fall back to default or return error","Upstream Gemini TTS API unavailable — 502/503 error","Audio hosting failure — URL may not be accessible","Rate limiting from upstream provider — 429 error"],"whenToPreferThis":"Choose this endpoint when you specifically want Google Gemini 3.1 Flash TTS quality audio synthesis with a hosted URL returned immediately. Prefer this over alternatives when you need Gemini's specific voice characteristics, require a WAV format output at 24kHz mono, or want a zero-cost per-call TTS option backed by Gemini's model.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":3252,"lastUsedAt":"2026-09-06T21:28:34.622Z","lastSuccessfullyRanAt":"2026-09-06T21:16:33.394Z","lastHealthCheckAt":"2026-09-15T09:15:13.328Z","isFirstParty":true}