82trust / 100

Tts Lite

by Text-to-speech (lite) in AI models & inference

x402 APIPassing, checked 49 min ago

Convert text to speech with Kokoro-82M, a fraction of the price of /api/tts. Returns base64-encoded mp3 or pcm. The same request shape and the same ten voice names as /api/tts, mapped to Kokoro's own voices; the voice is synthetic-sounding where the ElevenLabs tiers are not, which is the whole trade. Use this for high-volume narration, notifications and agent speech where the cost per call matters more than the timbre; use /api/tts or /api/tts-hd when it does not.

POST https://agent402.tools/api/tts-lite

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
189 ms typical, 189 ms slowest 5%
Last check
49 min ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/tts-lite" \
  -H "content-type: application/json" \
  -d '{"format":"mp3","text":"Hello from Agent402!","voice":"alloy"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Ftts-lite
const res = await pay("https://agent402.tools/api/tts-lite", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"format":"mp3","text":"Hello from Agent402!","voice":"alloy"}),
});
console.log(await res.json());

Example input

{
  "format": "mp3",
  "text": "Hello from Agent402!",
  "voice": "alloy"
}

Example output

{
  "audio": "<base64-encoded audio>",
  "chars": 20,
  "format": "mp3",
  "model": "hexgrad/kokoro-82m",
  "provider": "openrouter",
  "voice": "af_alloy"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
49 min agoPassed402378 ms$0.005
4 h agoPassed402183 ms$0.005
9 h agoPassed402189 ms$0.005