Text-to-speech: MeloTTS MP3 in 6 languages (en, ko, ja, zh, es, fr), safety-screened
ai_ttsUse 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: $0.004 USDC (Base or Solana) via x402.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "ai_tts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Speech language (default en); one built-in voice per language | |
| text | Yes | Text to speak (1-500 chars). Empty or longer text → 400 before payment (not charged) |