# Aile Text-to-Speech API

> Aile Text-to-Speech API is a paid API for AI agents from api.aile.sh, paid per call via x402, $0.00365/call, status unknown (last checked 2026-10-09).

Converts text to spoken audio using premium AI voice models (e.g. ElevenLabs) via a pay-per-use USDC marketplace, returning audio bytes in the chosen format.

## Facts

- Endpoint: POST https://api.aile.sh/v1/audio/speech?utm_source=zero.xyz
- Price: $0.00365/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aile-text-to-speech-api-c7e1e135
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KEAL3rp1TV5R2Ml7U_kp_

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 aile-text-to-speech-api-c7e1e135 -d '<json body>'
```

Example prompt: Using the ElevenLabs eleven_multilingual_v2 model on Aile, convert this paragraph to speech with the 'Rachel' voice and give me an mp3: 'Welcome to our weekly podcast. Today we explore the future of artificial intelligence.'

## When to prefer this

Choose this endpoint when you need access to premium third-party speech synthesis models (such as ElevenLabs) without managing individual provider subscriptions, and when you want pay-per-use USDC micropayment billing per 1,000 characters. Ideal for agents that need flexible, multi-provider TTS access through a single API surface with crypto-native settlement on Solana.

## Known failure modes

- Invalid or unsupported model string — returns error if model is not listed in GET /v1/models?output_modalities=speech
- Voice ID not found for the selected provider — returns provider error
- Insufficient USDC balance to cover the per-1000-character charge — payment rejected
- Input text too long or empty — validation error
- Unsupported response_format for the chosen model — format mismatch error
- SSE streaming requested but audio streaming requires an API key — returns auth error

## How this service works

Rent trusted AI models priced per token; lend idle subscriptions and API keys. A live, metered market that settles every call in USDC on Solana.

## Output

The response body is raw audio bytes in the requested format (default: audio/mpeg). The Content-Type header reflects the provider's audio type. For SSE stream_format, audio is framed as server-sent events. No JSON wrapper — just the binary audio data ready to play or save.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input",
  "model"
 ],
 "properties": {
  "input": {
   "type": "string",
   "description": "The text to speak. THE PRICE IS PER 1,000 CHARACTERS of it."
  },
  "model": {
   "type": "string",
   "description": "`<provider>/<model>`, e.g. `elevenlabs/eleven_multilingual_v2`. GET /v1/models?output_modalities=speech lists what is servable, with prices."
  },
  "speed": {
   "type": "number"
  },
  "voice": {
   "type": "string",
   "description": "The provider's voice id or name."
  },
  "stream_format": {
   "enum": [
    "sse"
   ],
   "type": "string",
   "description": "`sse` frames the finished audio as events. `audio` streaming needs an API key."
  },
  "response_format": {
   "enum": [
    "mp3",
    "opus",
    "aac",
    "flac",
    "wav",
    "pcm"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "note": "The answer body is the audio bytes, with the provider's own content-type (audio/mpeg by default)."
}
```

## More

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