# x402factory.ai Base Text-to-Speech API

> x402factory.ai Base Text-to-Speech API is a paid API for AI agents from x402factory.ai, paid per call via x402, $0.0282/call, status unknown (last checked 2026-09-15).

Converts text input into a hosted audio URL using per-character dynamic pricing paid via x402 on Base network

## Facts

- Endpoint: POST https://x402factory.ai/base/tts
- Price: $0.0282/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402factory-ai-227965f7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_U-GOUzp1dTX4qeWb5KgSS

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 x402factory-ai-227965f7 -d '<json body>'
```

Example prompt: Can you turn this text into spoken audio using x402factory's TTS endpoint — say 'Welcome to our platform, we're glad you're here' in English with the default voice, and give me back the hosted audio URL?

## When to prefer this

Use this endpoint when you need programmatic text-to-speech synthesis with per-character micropayment billing via x402 on the Base blockchain, avoiding subscription fees. Ideal for AI agents that need to generate audio on-demand and pay only for what they use in USDC.

## Known failure modes

- Payment failure if wallet has insufficient USDC balance on Base
- Invalid language code returns error
- Unsupported voice selection returns error
- Empty or missing text field causes request rejection
- Network timeout if x402 payment handshake stalls
- Input text too long may exceed pricing cap or server limits

## How this service works

Base text-to-speech API paid via x402. Converts text input into a hosted audio URL. Dynamic pricing for TTS: the prepaid price is computed per request based on the input and charged upfront via x402. Estimated characters for this request: 15. Prepaid price for this request: 0.009000 USDC.

## Output

A hosted audio URL pointing to the synthesized speech file generated from the input text, returned after x402 micropayment is processed on Base network using USDC.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Text to convert to speech when action is omitted (TTS mode). Required for paid TTS calls."
  },
  "action": {
   "enum": [
    "list"
   ],
   "type": "string",
   "description": "Optional action. Omit for TTS. Use 'list' to list available voices instead of generating speech."
  },
  "voice_id": {
   "type": "string",
   "description": "Optional ElevenLabs voice_id. If omitted, a default narrator voice is used."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "ok": {
  "type": "boolean",
  "description": "True on success"
 },
 "chars": {
  "type": "number",
  "description": "Number of characters used for pricing in TTS calls."
 },
 "action": {
  "type": "string",
  "description": "Action performed: 'tts' for text-to-speech, 'list' for voice listing."
 },
 "voices": {
  "type": "array",
  "description": "For action=list: available voices with trimmed metadata (voice_id, name, accent, descriptive, age, language, use_case)."
 },
 "tts_url": {
  "type": "string",
  "description": "Public URL of the generated audio file hosted on ImageKit (TTS only)."
 },
 "voice_id": {
  "type": "string",
  "description": "Voice ID used for the TTS call (TTS only)."
 },
 "price_usdc": {
  "type": "number",
  "description": "Price charged for this call in USDC (6 decimals, rounded up). Minimum is 0.001 USDC."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402factory-ai-227965f7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402factory.ai](https://www.zero.xyz/host/x402factory.ai/llms.txt)
