# AgentUtility Voice — Text-to-Speech API

> AgentUtility Voice — Text-to-Speech API is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-16).

Converts text (up to 4,000 characters) into a hosted audio file in your chosen format, voice, and speed, returning a direct audio_url ready to play.

## Facts

- Endpoint: POST https://x402.agentutility.ai/voice
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentutility-voice-text-to-speech-api-6f3a29f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6xHRd1vdoKI6dyuC1dmeZ

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 agentutility-voice-text-to-speech-api-6f3a29f6 -d '<json body>'
```

Example prompt: Read this product description aloud in the 'af_sky' voice at normal speed and give me a hosted MP3 I can drop straight into my app: 'Introducing the new AeroBlend Pro — the smoothest blending experience you'll ever have.'

## When to prefer this

Choose this endpoint when you need a hosted, directly playable audio URL from text without handling binary data or base64 encoding yourself. It is ideal for agents that need to produce voiceovers, IVR prompts, or accessibility audio on demand and require payment via USDC on Base (x402 protocol). Prefer it over raw OpenAI TTS or similar APIs when you want a managed hosted file URL returned rather than raw audio bytes, and when you need 30+ voice options and flexible format support in a single call.

## Known failure modes

- Text exceeds 4,000 character limit — request rejected
- Invalid voice ID provided — falls back to default or returns error
- Unsupported format string — returns validation error
- Speed value outside 0.25–4 range — returns validation error
- Payment not settled via x402 — 402 Payment Required response
- Upstream Venice TTS model unavailable — service error returned

## How this service works

Turn written text into spoken audio you can drop straight into a player or app. Send text (up to 4,000 characters) with an optional voice, model, speed, and output format of mp3, wav, opus, aac, or flac, and get back a hosted audio_url plus file size and content type, no base64 handling required. Runs on Venice's text-to-speech models with 30+ selectable voices and adjustable playback speed from 0.25x to 4x. Use it as a text-to-speech API, voice synthesis tool, or narration generator for voiceovers, IVR prompts, or accessibility read-aloud features.

## Output

A JSON object containing an audio_url pointing to the hosted audio file (e.g. an MP3 at a public HTTPS URL), along with the file's content type and size — no base64 decoding needed, the URL is directly embeddable in a player or app.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to synthesize into speech. Max 4000 chars."
      },
      "model": {
       "type": "string",
       "description": "TTS model id. Optional, default 'tts-kokoro'."
      },
      "speed": {
       "type": "number",
       "description": "Playback speed multiplier. Optional, 0.25-4, default 1."
      },
      "voice": {
       "type": "string",
       "description": "Voice id, e.g. 'af_sky'. Optional, default 'af_sky'."
      },
      "format": {
       "type": "string",
       "description": "Output audio format: mp3, wav, opus, aac, or flac. Optional, default mp3."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "audio_url": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "audio_url": "https://...mp3"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentutility-voice-text-to-speech-api-6f3a29f6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
