Text-to-speech
Convert text to speech using OpenAI TTS-1: returns audio (the base64-encoded file in the format asked for: mp3, opus, aac, flac, wav or pcm) with model, voice, format and chars (the characters spoken). 10 voices available. No API key needed; pay per call over x402 or MPP. Text capped at 2000 chars. Model-backed. For high-volume speech where timbre matters less, /api/tts-lite is the same interface
- Price per call
- $0.05
- Chain
- Solana
- Method
- POST
- Paid calls · 30 days
- 0
Call it from code
This API is run by its own provider and paid directly through x402. We list it so you can find it; we don't route or hold the payment.
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
const client = new x402Client();
registerExactEvmScheme(client, { signer: agentAccount });
const pay = wrapFetchWithPayment(fetch, client);
const res = await pay("https://agent402.tools/api/tts", { method: "POST" });
console.log(await res.json());https://agent402.tools/api/tts