Telnyx x402 Gateway

Pay per request for Telnyx Inference and Audio.

OpenAI-compatible chat completions via Telnyx Inference. One endpoint, 22 open-weight models, pay-per-request in USDC. Plus OpenAI-compatible audio: text-to-speech (4,000+ voices) and speech-to-text, metered at Telnyx list rates. Agents can call the endpoint with a crypto wallet only: no Telnyx account, no API key, and no subscription.

Quickstart View all 22 models Audio: TTS & STT
Endpoint POST /v1/chat/completions
Price $0.002–$0.151875 USDC per call (max; each 402 is quoted to your request)
Models 22 open-weight models (select via body.model)
Payment x402 exact + upto on Base mainnet (eip155:8453)
Audio TTS $0.000006/char · STT $0.003/min (details)

Quickstart

Send an unsigned request to receive the PAYMENT-REQUIRED challenge, then retry with a signed PAYMENT-SIGNATURE header using an x402 client. Use GET /v1/models to discover model ids; price varies by selected model.

curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"moonshotai/Kimi-K3.1-Pro","messages":[{"role":"user","content":"Explain x402 micropayments to a pirate in two sentences."}],"max_tokens":300}'

# Discover available models (no payment):
curl https://x402.telnyx.com/v1/models

Payment schemes: exact, upto — upto supports EIP-2612 sponsored approval on USDC.

Available models (22)

Each tier offers two payment schemes: exact (a fixed price quoted in the 402 for your request: input tokens plus your max_tokens at Telnyx list rates, no markup, $0.002 minimum, never above the listed per-call price; lower max_tokens to lower the quote) and upto (per-token metered pricing at Telnyx list rates, up to the model's full context + output capabilities — for any usage size). For requests within exact's limits, upto never costs more than exact; for larger requests only available via upto, you pay per-token up to the spending cap. Pick a model, set body.model, and copy the curl snippet.

moonshotai/Kimi-K3.1-Pro frontier
Exact price
up to $0.05106 per call, quoted to your request (example call: $0.003282)
Upto ceiling
$0.632180 max (per-token)
Context (exact / upto)
12,000 / 300,000 tokens
Max output (exact / upto)
2,048 / 2,560 tokens
Per-message (exact / upto)
12,000 / 900,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"moonshotai/Kimi-K3.1-Pro","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
moonshotai/Kimi-K3.1-Pro-thinking frontier
Exact price
up to $0.064188 per call, quoted to your request (example call: $0.010690)
Upto ceiling
$0.640188 max (per-token)
Context (exact / upto)
12,000 / 300,000 tokens
Max output (exact / upto)
3,328 / 3,328 tokens
Min max_tokens
1,024 tokens (reasoning model — smaller budgets are rejected)
Per-message (exact / upto)
12,000 / 900,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"moonshotai/Kimi-K3.1-Pro-thinking","messages":[{"role":"user","content":"hi"}],"max_tokens":1024}'
moonshotai/Kimi-K3 frontier
Exact price
up to $0.151875 per call, quoted to your request (example call: $0.055672)
Upto ceiling
$0.410068 max (per-token)
Context (exact / upto)
12,000 / 66,666 tokens
Max output (exact / upto)
8,192 / 16,384 tokens
Min max_tokens
4,096 tokens (reasoning model — smaller budgets are rejected)
Per-message (exact / upto)
12,000 / 200,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"moonshotai/Kimi-K3","messages":[{"role":"user","content":"hi"}],"max_tokens":4096}'
zai-org/GLM-5.3-Flash large
Exact price
up to $0.005817 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.042739 max (per-token)
Context (exact / upto)
33,333 / 300,000 tokens
Max output (exact / upto)
2,048 / 4,096 tokens
Min max_tokens
512 tokens (reasoning model — smaller budgets are rejected)
Per-message (exact / upto)
32,000 / 900,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"zai-org/GLM-5.3-Flash","messages":[{"role":"user","content":"hi"}],"max_tokens":512}'
deepseek-ai/DeepSeek-V4.1-Flash-1017 large
Exact price
up to $0.013389 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.110592 max (per-token)
Context (exact / upto)
33,333 / 300,000 tokens
Max output (exact / upto)
2,048 / 16,384 tokens
Per-message (exact / upto)
32,000 / 900,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"deepseek-ai/DeepSeek-V4.1-Flash-1017","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
zai-org/GLM-5.3 frontier
Exact price
up to $0.053375 per call, quoted to your request (example call: $0.016484)
Upto ceiling
$0.411425 max (per-token)
Context (exact / upto)
26,666 / 300,000 tokens
Max output (exact / upto)
4,096 / 8,192 tokens
Min max_tokens
4,096 tokens (reasoning model — smaller budgets are rejected)
Per-message (exact / upto)
32,000 / 900,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"zai-org/GLM-5.3","messages":[{"role":"user","content":"hi"}],"max_tokens":4096}'
openai/gpt-oss-120b mid
Exact price
up to $0.004928 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.013053 max (per-token)
Context (exact / upto)
33,333 / 116,666 tokens
Max output (exact / upto)
8,192 / 16,384 tokens
Min max_tokens
2,048 tokens (reasoning model — smaller budgets are rejected)
Per-message (exact / upto)
32,000 / 350,000 chars
sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"openai/gpt-oss-120b","messages":[{"role":"user","content":"hi"}],"max_tokens":2048}'
zai-org/GLM-5.2 reasoning
Exact price
up to $0.037784 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.102360 max (per-token)
Context (exact / upto)
26,666 / 66,666 tokens
Max output (exact / upto)
2,048 / 8,192 tokens
Per-message (exact / upto)
32,000 / 200,000 chars
sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"zai-org/GLM-5.2","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
MiniMaxAI/MiniMax-M3-MXFP8 frontier
Exact price
up to $0.012144 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.027903 max (per-token)
Context (exact / upto)
33,333 / 66,666 tokens
Max output (exact / upto)
2,048 / 8,192 tokens
Per-message (exact / upto)
32,000 / 200,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"MiniMaxAI/MiniMax-M3-MXFP8","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
moonshotai/Kimi-K2.6 mid
Exact price
up to $0.014017 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.079043 max (per-token)
Context (exact / upto)
12,000 / 66,666 tokens
Max output (exact / upto)
1,024 / 8,192 tokens
Per-message (exact / upto)
12,000 / 200,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"moonshotai/Kimi-K2.6","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
deepseek-ai/DeepSeek-V4-Flash-0731 large
Exact price
up to $0.00527 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.041534 max (per-token)
Context (exact / upto)
33,333 / 300,000 tokens
Max output (exact / upto)
2,048 / 8,192 tokens
Per-message (exact / upto)
32,000 / 900,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"deepseek-ai/DeepSeek-V4-Flash-0731","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
MiniMaxAI/MiniMax-M2.7 frontier
Exact price
up to $0.007289 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.019609 max (per-token)
Context (exact / upto)
8,000 / 66,666 tokens
Max output (exact / upto)
4,096 / 4,096 tokens
Min max_tokens
512 tokens (reasoning model — smaller budgets are rejected)
Per-message (exact / upto)
8,000 / 200,000 chars
sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"MiniMaxAI/MiniMax-M2.7","messages":[{"role":"user","content":"hi"}],"max_tokens":512}'
moonshotai/Kimi-K2.5 mid
Exact price
up to $0.016823 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.066327 max (per-token)
Context (exact / upto)
20,000 / 66,666 tokens
Max output (exact / upto)
1,024 / 8,192 tokens
Per-message (exact / upto)
20,000 / 200,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"moonshotai/Kimi-K2.5","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
zai-org/GLM-5.1-FP8 reasoning
Exact price
up to $0.023639 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.104246 max (per-token)
Context (exact / upto)
12,000 / 66,666 tokens
Max output (exact / upto)
2,048 / 8,192 tokens
Per-message (exact / upto)
12,000 / 200,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"zai-org/GLM-5.1-FP8","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
Qwen/Qwen3.8-27B mid
Exact price
up to $0.015432 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.128008 max (per-token)
Context (exact / upto)
20,000 / 240,000 tokens
Max output (exact / upto)
2,048 / 10,240 tokens
Per-message (exact / upto)
20,000 / 720,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"Qwen/Qwen3.8-27B","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
Qwen/Qwen3-235B-A22B reasoning
Exact price
up to $0.010651 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.058140 max (per-token)
Context (exact / upto)
8,000 / 66,666 tokens
Max output (exact / upto)
2,048 / 8,192 tokens
Per-message (exact / upto)
8,000 / 200,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"Qwen/Qwen3-235B-A22B","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
google/gemma-4-26B-A4B-it small
Exact price
up to $0.00319 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.003600 max (per-token)
Context (exact / upto)
12,000 / 12,000 tokens
Max output (exact / upto)
1,024 / 3,072 tokens
Per-message (exact / upto)
12,000 / 12,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"google/gemma-4-26B-A4B-it","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
meta-llama/Llama-3.3-70B-Instruct large
Exact price
up to $0.007502 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.044545 max (per-token)
Context (exact / upto)
8,000 / 66,666 tokens
Max output (exact / upto)
1,024 / 4,096 tokens
Per-message (exact / upto)
8,000 / 200,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"meta-llama/Llama-3.3-70B-Instruct","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
moonshotai/Kimi-K2.6-long long-context
Exact price
up to $0.054615 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.079191 max (per-token)
Context (exact / upto)
66,666 / 66,666 tokens
Max output (exact / upto)
2,048 / 8,192 tokens
Per-message (exact / upto)
200,000 / 200,000 chars
cached credit · sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"moonshotai/Kimi-K2.6-long","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
meta-llama/Meta-Llama-3.1-70B-Instruct large
Exact price
up to $0.007502 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.044545 max (per-token)
Context (exact / upto)
8,000 / 66,666 tokens
Max output (exact / upto)
1,024 / 4,096 tokens
Per-message (exact / upto)
8,000 / 200,000 chars
sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"meta-llama/Meta-Llama-3.1-70B-Instruct","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
meta-llama/Meta-Llama-3.1-8B-Instruct small
Exact price
up to $0.002399 per call, quoted to your request (example call: $0.002000)
Upto ceiling
$0.014849 max (per-token)
Context (exact / upto)
8,000 / 66,666 tokens
Max output (exact / upto)
512 / 4,096 tokens
Per-message (exact / upto)
8,000 / 200,000 chars
sponsored approval · exact + upto
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"meta-llama/Meta-Llama-3.1-8B-Instruct","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
google/gemma-2b-it small
Exact price
up to $0.002 per call, quoted to your request (example call: $0.002000)
Context
2,000 tokens
Max output
256 tokens
Per-message
2,000 chars
exact
curl -i -X POST https://x402.telnyx.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"google/gemma-2b-it","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'

Audio: text-to-speech & speech-to-text

OpenAI-compatible audio endpoints at Telnyx list rates, zero margin — the same x402 payment flow as inference: exact flat per-call, or upto metered (per character for TTS, per second for STT).

Unsigned, these curls return 402 with the payment offer in the base64 payment-required response header (x402 v2 — the body is just {}). Pay by retrying with a signed PAYMENT-SIGNATURE header via an x402 client; a paid TTS call then returns raw mp3 bytes (save them with curl -o).

POST /v1/audio/speech text-to-speech
Metered (upto)
$0.000006 per character ($0.002 minimum settle per call)
Exact price
$0.018 per call
Input cap
3,000 characters
Voices
4,000+ from Telnyx, Azure, MiniMax, Inworld, AWS Polly and more — free catalog at GET /v1/audio/voices (OpenAI voice names like alloy work too)
Output
mp3
curl -i -X POST https://x402.telnyx.com/v1/audio/speech \
  -H 'Content-Type: application/json' \
  -d '{"input":"Hello from Telnyx.","voice":"alloy"}'
POST /v1/audio/transcriptions speech-to-text
Metered (upto)
$0.003 per minute, metered per second ($0.002 minimum settle ≈ 40s)
Exact price
$0.015 per call
Model
Whisper large-v3-turbo (model=whisper-1 accepted), 100 languages
Upload cap
wav/mp3, up to 5 min / 12 MB (multipart)
Response
json or verbose_json (segment timestamps + duration)
curl -i -X POST https://x402.telnyx.com/v1/audio/transcriptions \
  -F file=@speech.mp3 \
  -F model=whisper-1