Text to speech, paid per call
Send up to 3,000 characters and a voice, settle the 402 in USDC, and an ElevenLabs MP3 comes back in seconds. Priced by the character, quoted before you pay.
POST /api/x402/speech · from $0.02
Try it
curl -i -X POST https://www.trezalabs.com/api/x402/speech \
-H 'Content-Type: application/json' \
-d '{"text":"Welcome back. Today we are looking at three small habits that make a big difference.","voice":"george","model":"eleven-v3"}'Without a payment this answers 402 Payment Required, with the price for exactly this body, the USDC token and the address to pay in the PAYMENT-REQUIRED header. Nothing is charged.
npx awal@latest x402 pay https://www.trezalabs.com/api/x402/speech \
-X POST \
-d '{"text":"Welcome back. Today we are looking at three small habits that make a big difference.","voice":"george","model":"eleven-v3"}' \
--max-amount 40000awal reads the 402, pays it from your agentic wallet in USDC on Base, repeats the request and prints the response. --max-amount caps the payment in USDC units of a millionth: 40,000 is $0.04, this body's price. Any other x402 client works the same way.
npx awal@latest x402 details https://www.trezalabs.com/api/x402/speechPaying for a request accepts our Terms of Service and Privacy Policy, including the usage policies of the model provider that renders it. Not sold in sanctioned regions.
Price
Quoted per request in the 402, so read it from there rather than hard-coding it. A render that fails gets a free retry.
- ElevenLabs Eleven v3default
eleven-v3$0.42 per 1,000 characters, minimum $0.02
- ElevenLabs Multilingual v2
eleven-multilingual-v2$0.42 per 1,000 characters, minimum $0.02
Limits
- text: up to 3,000 characters.
- Returns an MP3 URL in the JSON response, with a statusUrl you can GET again for free.
- 60 requests per hour per IP address, before any payment is looked at.
- Paid in USDC on Base or Solana. Fields the endpoint does not read are refused before payment, not charged for and ignored.
- Eleven v3 takes delivery directions in square brackets, like [whispers] or [excited], and performs them without reading them out. Multilingual v2 reads 29 languages.
- Set emotion (Eleven v3), pitch in semitones and volume on any read, at no extra cost.
- A voice whose owner charges more carries a priceMultiplier on the menu, and the 402 quotes it.
A bare GET /api/x402/speech answers with the whole menu as JSON.
{
"runId": "2026-09-23T18:04:11.000Z#1a2b3c4d",
"status": "success",
"audio": "https://www.trezalabs.com/api/media/generated/x402_speech/1a2b3c4d.mp3?s=...&c=...",
"statusUrl": "https://www.trezalabs.com/api/x402/speech?runId=...&token=...",
"paidUsd": 0.04,
"model": "eleven-v3",
"voice": "george",
"characters": 84,
"transaction": "0x..."
}The same payment buys
Video
POST /api/x402/video
A prompt or a first frame in, a clip out, on Veo 3.1, Kling 3.0, Seedance 2.5, Wan 2.7 or Hailuo 3.
From $0.28
Music
POST /api/x402/music
An original Google Lyria 3 track from a description: a 30-second bed or a full song.
From $0.06
Images
POST /api/x402/image
Nano Banana, GPT Image 2.6, Seedream 5.0 Pro, FLUX.2 Pro and Recraft, up to 4K.
From $0.02
Shorts
POST /api/x402/short
A topic in, a finished 30-second narrated vertical short out: scenes, voice, music, captions.
From $0.87
Listed in the Coinbase x402 Bazaar, so agents can find it with npx awal@latest x402 bazaar search "text to speech". Full reference in the x402 docs and the OpenAPI spec.