# ElevenLabs Text-to-Speech via tokens.fun

> ElevenLabs Text-to-Speech via tokens.fun is a paid API for AI agents from eleven.tokens.fun, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-15, last successful call 2026-08-05).

Converts text to speech using ElevenLabs TTS models, returning a hosted audio URL or streamable raw audio bytes

## Facts

- Endpoint: POST https://eleven.tokens.fun/speak
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Last successful call: 2026-08-05
- Activations on Zero: 7
- Tags: x402
- Canonical page: https://www.zero.xyz/c/elevenlabs-text-to-speech-via-tokens-fun-f928ddd4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NlnBG5hYMDnLSsj4nMMyd

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 elevenlabs-text-to-speech-via-tokens-fun-f928ddd4 -d '<json body>'
```

Example prompt: Can you use ElevenLabs to read this aloud in the default voice at normal speed: 'Welcome to our platform. We're glad you're here. Let's get started on your journey today.' — give me back a hosted mp3 link.

## When to prefer this

Choose this endpoint when you need high-quality AI voice synthesis powered by ElevenLabs without managing your own ElevenLabs API key, and you want per-call micropayment billing via x402 rather than a subscription. Ideal for agents that occasionally need TTS and want a hosted audio URL returned directly. Use the streaming mode (Accept: audio/mpeg) when you need real-time audio delivery rather than a URL.

## Known failure modes

- 402 Payment Required if x402 payment is not included — amount computed based on character count
- Text exceeds 4000 character limit — request rejected
- Invalid voice_id returns an error from ElevenLabs
- Invalid model ID causes synthesis failure
- Unsupported audio format string causes a bad request error
- Rate limiting or quota issues from underlying ElevenLabs API

## How this service works

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.

## Output

Returns a JSON object containing a hosted audio_url where the synthesized speech can be accessed or downloaded, along with the file size in bytes and content type. Alternatively, when the Accept: audio/mpeg header is sent, streams raw MP3 audio bytes directly.

## Request schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/elevenlabs-text-to-speech-via-tokens-fun-f928ddd4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from eleven.tokens.fun](https://www.zero.xyz/host/eleven.tokens.fun/llms.txt)
