# MolCloud Text-to-Speech (TTS)

> MolCloud Text-to-Speech (TTS) is a paid API for AI agents from api.molcloud.net, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-17).

Converts text into spoken audio (MP3) in multiple languages, returning a base64-encoded audio data URL, paid per-request via x402 USDC.

## Facts

- Endpoint: POST https://api.molcloud.net/api/ai/tts?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/molcloud-text-to-speech-tts-b33d3546
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9hNdity72xqfYysfSDXMm

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 molcloud-text-to-speech-tts-b33d3546 -d '<json body>'
```

Example prompt: Can you read this sentence out loud in French and give me the audio: 'Bienvenue dans notre application, nous sommes ravis de vous accueillir'?

## When to prefer this

Choose this endpoint when your AI agent needs pay-per-request text-to-speech with no subscription or API key setup, especially within a broader MolCloud/x402 workflow where USDC micropayments on Base are already in use. Ideal for autonomous agents that only occasionally need speech synthesis and want usage-based pricing rather than a standing account.

## Known failure modes

- Empty or missing `text` field returns an error response
- Unsupported language code may fall back to default or return an error
- Very long text inputs may be truncated or rejected
- Payment failure via x402 (insufficient USDC balance) results in 402 response before processing
- Network timeouts on the edge gateway for unusually large synthesis requests

## How this service works

41 pay-per-request AI, search, headless browser, crypto alpha & memory APIs for autonomous agents settling in USDC on Base via x402 v2.

## Output

Returns a JSON object with a `data.audioDataUrl` field containing a base64-encoded data URI (data:audio/mp3;base64,...) ready for playback or embedding, along with a `status` field ('success') and the endpoint path.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lang": {
   "type": "string",
   "default": "en",
   "description": "Language code (en, es, fr, zh, ja, kr)"
  },
  "text": {
   "type": "string",
   "description": "Text to synthesize into spoken audio"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "audioDataUrl": "data:audio/mp3;base64,..."
  },
  "status": "success",
  "endpoint": "/api/ai/tts"
 }
}
```

## More

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