x402 · USDC on Base or Solana · live

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

Turn the sound on: the narration is ElevenLabs, from one of our own channel's Shorts. It was made on our pipeline, not bought here; the speech endpoint sells the same voices, the MP3 alone.ElevenLabs

Try it

1 · Ask for the price (free)
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.

2 · Pay and collect, with Coinbase's awal wallet
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 40000

awal 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.

Or just read what it asks for
npx awal@latest x402 details https://www.trezalabs.com/api/x402/speech

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 v3defaulteleven-v3

    $0.42 per 1,000 characters, minimum $0.02

  • ElevenLabs Multilingual v2eleven-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.
  • 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.

What a paid call returns
{
  "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..."
}