# tx402.ai — Agent-Native LLM Inference Gateway # x402 protocol · USDC micropayments · No API keys · No accounts > tx402.ai is an x402 payment gateway for EU-sovereign LLM inference. > AI agents pay per-request with USDC on Base. No API keys, no accounts, no KYC. > Wallet = authentication. EU-based, GDPR-compliant, zero data retention. > Powered by Tensorix EU infrastructure — https://tensorix.ai ## Quick Start for AI Agents ### Using @x402/fetch + @x402/evm (recommended) ```typescript import { wrapFetchWithPayment, x402Client } from "@x402/fetch"; import { ExactEvmScheme, toClientEvmSigner } from "@x402/evm"; import { createWalletClient, http } from "viem"; import { base } from "viem/chains"; import { privateKeyToAccount } from "viem/accounts"; const account = privateKeyToAccount("0xYOUR_PRIVATE_KEY"); const wallet = createWalletClient({ account, chain: base, transport: http(), }); const client = new x402Client(); const signer = toClientEvmSigner(wallet); signer.address = account.address; client.register("eip155:8453", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://tx402.ai/v1/chat/completions", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ model: "deepseek/deepseek-v3.2", messages: [{ role: "user", content: "Hello" }], max_tokens: 512, }), }, ); const data = await response.json(); ``` ### x402 Flow (automatic with wrapFetchWithPayment) 1. POST /v1/chat/completions → 402 response with USDC price + nonce 2. SDK signs USDC payment for quoted amount (PAYMENT-SIGNATURE header) 3. SDK retries with payment header → 200 + LLM response > With wrapFetchWithPayment, steps 2-3 happen automatically. > The agent just calls fetchWithPayment() once — the SDK handles the rest. ### API Endpoints - GET / Gateway info (JSON) or landing page (HTML) - GET /health Health check - GET /v1/models Available models + pricing + aliases (OpenAI-compatible) - POST /v1/chat/completions Chat completions (x402 gated) - POST /v1/completions Text completions (x402 gated) - POST /v1/embeddings Embeddings (x402 gated) - GET /openapi.json OpenAPI 3.1 specification - GET /llms.txt This file - GET /robots.txt Crawler directives - GET /.well-known/ai-plugin.json AI plugin manifest - GET /.well-known/x402 x402 protocol discovery (models, pricing, treasury) - GET /.well-known/openapi.json OpenAPI spec (alternate path) ### Model Aliases (use these for convenience) minimax → minimax/minimax-m2.5 m2 → minimax/minimax-m2 m2.1 → minimax/minimax-m2.1 m2.5 → minimax/minimax-m2.5 deepseek → deepseek/deepseek-v3.2 deepseek-chat → deepseek/deepseek-chat-v3.1 deepseek-r1 → deepseek/deepseek-r1-0528 glm → z-ai/glm-5 glm-5 → z-ai/glm-5 glm-4 → z-ai/glm-4.7 kimi → moonshotai/kimi-k2.5 moonshot → moonshotai/kimi-k2.5 llama → meta-llama/llama-4-maverick maverick → meta-llama/llama-4-maverick llama-70b → meta-llama/llama-3.3-70b-instruct qwen → qwen/qwen3-235b-a22b-2507 qwen-coder → qwen/qwen3-coder-30b-a3b-instruct qwen-vl → qwen/qwen3-vl-235b-a22b-instruct mixtral → mistralai/mixtral-8x22b-instruct gpt-oss → openai/gpt-oss-120b gpt-120b → openai/gpt-oss-120b gpt-20b → openai/gpt-oss-20b z-ai/glm-4.7-fallback → z-ai/glm-4.7 glm-4.7-fallback → z-ai/glm-4.7 ## Available Models ### qwen/qwen3-235b-a22b-2507 - Input: $0.09/M tokens | Output: $0.58/M tokens - Context: 131,000 tokens | Max output: 262,144 - Est. cost/request: $0.000335 ### deepseek/deepseek-r1-0528 - Input: $0.825/M tokens | Output: $3.25/M tokens - Context: 164,000 tokens | Max output: 8,192 - Est. cost/request: $0.002038 ### qwen/qwen-2.5-72b-instruct - Input: $0.0875/M tokens | Output: $0.325/M tokens - Context: 33,000 tokens - Est. cost/request: $0.000207 ### deepseek/deepseek-chat-v3.1 - Input: $0.25/M tokens | Output: $1/M tokens - Context: 164,000 tokens | Max output: 163,840 - Est. cost/request: $0.000625 ### meta-llama/llama-4-maverick - Input: $0.17/M tokens | Output: $0.85/M tokens - Context: 1,050,000 tokens - Est. cost/request: $0.000511 ### mistralai/mixtral-8x22b-instruct - Input: $2.5/M tokens | Output: $7.5/M tokens - Context: 66,000 tokens - Est. cost/request: $0.005000 ### meta-llama/llama-3.3-70b-instruct - Input: $0.13/M tokens | Output: $0.39/M tokens - Context: 131,000 tokens - Est. cost/request: $0.000260 ### minimax/minimax-m2 - Input: $0.3125/M tokens | Output: $1.25/M tokens - Context: 196,608 tokens | Max output: 196,608 - Est. cost/request: $0.000782 ### minimax/minimax-m2.1 - Input: $0.375/M tokens | Output: $3/M tokens - Context: 196,608 tokens | Max output: 131,072 - Est. cost/request: $0.001688 ### openai/gpt-oss-20b - Input: $0.0375/M tokens | Output: $0.175/M tokens - Context: 131,000 tokens | Max output: 32,768 - Est. cost/request: $0.000107 ### deepseek/deepseek-chat-v3-0324 - Input: $0.375/M tokens | Output: $1.25/M tokens - Context: 163,840 tokens | Max output: 8,192 - Est. cost/request: $0.000813 ### qwen/qwen3-coder-30b-a3b-instruct - Input: $0.075/M tokens | Output: $0.3125/M tokens - Context: 262,000 tokens - Est. cost/request: $0.000194 ### deepseek/deepseek-v3.2 - Input: $0.375/M tokens | Output: $0.625/M tokens - Context: 163,840 tokens | Max output: 163,840 - Est. cost/request: $0.000500 ### qwen/qwen3-vl-235b-a22b-instruct - Input: $0.2625/M tokens | Output: $2.375/M tokens - Context: 131,000 tokens - Est. cost/request: $0.001319 ### z-ai/glm-4.6 - Input: $0.5/M tokens | Output: $2.1875/M tokens - Context: 203,000 tokens | Max output: 131,000 - Est. cost/request: $0.001344 ### openai/gpt-oss-120b - Input: $0.05/M tokens | Output: $0.25/M tokens - Context: 131,000 tokens | Max output: 32,768 - Est. cost/request: $0.000150 ### moonshotai/kimi-k2.5 - Input: $0.625/M tokens | Output: $3.5/M tokens - Context: 262,144 tokens | Max output: 262,144 - Est. cost/request: $0.002063 ### z-ai/glm-5 - Input: $1.25/M tokens | Output: $4/M tokens - Context: 202,752 tokens | Max output: 202,752 - Est. cost/request: $0.002626 ### z-ai/glm-4.7 - Input: $0.75/M tokens | Output: $2.75/M tokens - Context: 200,000 tokens | Max output: 200,000 - Est. cost/request: $0.001750 ### minimax/minimax-m2.5 - Input: $0.375/M tokens | Output: $1.5/M tokens - Context: 196,608 tokens | Max output: 65,536 - Est. cost/request: $0.000938 ## Payment Details - Chain: Base (EIP-155:8453) - Token: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) - Treasury: see GET /wallet - Protocol: x402 v2 ## Pricing Notes - If max_tokens is not set, defaults to 1024 (controls output cost) - Set max_tokens in your request to control your spend precisely - Minimum charge: $0.000001 USDC ## Why tx402.ai? - **No API keys** — payment IS authentication - **No accounts** — any wallet with USDC on Base can use it - **EU sovereign** — inference runs on Tensorix EU infrastructure - **GDPR compliant** — zero data retention, no logging of prompts/responses - **Agent-native** — built for autonomous AI agents, not humans ## Links - Gateway: https://tx402.ai - x402 Protocol: https://x402.org - Tensorix: https://tensorix.ai - Version: 0.3.1