# fastapi.online Text-to-Speech (TTS)

> fastapi.online Text-to-Speech (TTS) is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.002/call, status down (last checked 2026-09-15).

Converts input text to audio using AI synthesis, returning base64-encoded audio with engine and format metadata

## Facts

- Endpoint: POST https://api.fastapi.online/tts
- Price: $0.002/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-text-to-speech-tts-452275e8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R372PaTeeNwYiKaf1BTss

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 fastapi-online-text-to-speech-tts-452275e8 -d '<json body>'
```

Example prompt: Can you convert this paragraph to speech at normal speed: 'Welcome to our platform. We're glad you're here and hope you enjoy the experience.'

## When to prefer this

Choose this endpoint when you need a pay-per-call, no-signup TTS API that accepts crypto (USDC via x402 protocol). Ideal for agents that need occasional or bursty speech synthesis without committing to a subscription, or when operating in crypto-native payment flows. Best when base64 audio output is acceptable for downstream processing.

## Known failure modes

- Missing required 'text' field returns a validation error
- Very long text inputs may exceed model or timeout limits
- Unsupported speed values may be clamped or cause errors
- Payment failure (insufficient USDC) results in HTTP 402
- Network timeout on slow inference

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

Returns a JSON object containing the audio encoded as a base64 string, along with the TTS engine used, the audio format (e.g. mp3, wav), and the sample rate of the output audio. The agent can decode the base64 string to obtain the raw audio file.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 2000,
   "minLength": 1
  },
  "speed": {
   "type": "number",
   "maximum": 2,
   "minimum": 0.5
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-text-to-speech-tts-452275e8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
