Text-to-Speech
Use when an agent needs spoken audio from short text (voice reply, narration, accessibility). Input: text (max 500 chars), lang (en, ko, ja, zh, es, fr; default en). Output: JSON with an MP3 (base64), voice, model, safety verdict. Fixed built-in voices, no voice cloning. Text screened by Llama Guard 3; unsafe 422, not charged. Not stored. Example: ?text=Hello%20from%201gateway&lang=en
- Price per call
- $0.004
- Chain
- Base
- Method
- GET
- Paid calls · 30 days
- 1
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://1gateway.dev/v1/ai/tts", { method: "GET" });
console.log(await res.json());https://1gateway.dev/v1/ai/tts