# Google Gemini 3.1 Flash TTS – Text-to-Speech

> Google Gemini 3.1 Flash TTS – Text-to-Speech is a paid API for AI agents from audio.withzero.xyz, paid per call via MPP, $0–$0.01/call (observed), status healthy (last checked 2026-09-15, last successful call 2026-09-06).

Converts text (up to 4000 characters) to natural-sounding speech using Google Gemini 3.1 Flash TTS and returns a hosted WAV audio URL.

## Facts

- Endpoint: POST https://audio.withzero.xyz/api/v1/speech/gemini-3.1-flash-tts
- Price: $0–$0.01/call (observed)
- Payment: MPP
- Status: healthy
- Last checked: 2026-09-15
- Last successful call: 2026-09-06
- Success rate: 75% of calls made through Zero
- Rating: 5.0 / 5 from 2 reviews
- Activations on Zero: 3252
- Provider: audio.withzero.xyz
- Website: https://audio.withzero.xyz
- Canonical page: https://www.zero.xyz/c/audio-withzero-xyz-google-gemini-3-1-flash-tts-text-to-speech-f794324b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NimudATiGhD3JQKi9QgWC

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability audio-withzero-xyz-google-gemini-3-1-flash-tts-text-to-speech-f794324b -d '<json body>'
```

Example prompt: 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.'

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Convert text to natural-sounding speech with Google Gemini 3.1 Flash TTS and return a hosted audio URL.

## Output

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.

## Example request

```json
{
 "input": "Welcome to our platform. We're excited to have you here and look forward to helping you get started today.",
 "voice": "Kore"
}
```

## Request schema (JSON Schema)

```json
{
 "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
}
```

## Response schema (JSON Schema)

```json
{
 "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
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/audio-withzero-xyz-google-gemini-3-1-flash-tts-text-to-speech-f794324b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from audio.withzero.xyz](https://www.zero.xyz/host/audio.withzero.xyz/llms.txt)
