No API keys. No subscriptions. No rate limits.
Just send stablecoins with every request using the x402 payment protocol.
$ curl https://x402-gateway-production.up.railway.app/api/crypto/price?ids=bitcoin
HTTP/1.1 402 Payment Required
# Response includes payment instructions — your agent pays automatically
$ # With x402 client, payments are automatic:
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
const client = new x402Client();
registerExactEvmScheme(client, { signer: account, networks: ["eip155:8453"] });
const paidFetch = wrapFetchWithPayment(fetch, client);
const data = await paidFetch("https://x402-gateway-production.up.railway.app/api/crypto/price?ids=bitcoin");
Instead of signing up for a dozen services, managing API keys, and juggling subscriptions — software just sends a fraction of a cent and gets back useful work.
No sign-up forms, no email verification, no dashboards. There is no concept of a "user" — just a wallet that pays.
No secrets to rotate, no rate limit tiers, no usage quotas. The payment is the authentication.
No monthly bills, no overage charges. Pay for exactly what you use — one tenth of a cent at a time.
The money is stablecoins — tokens pegged 1:1 to the US dollar, settled on-chain. No bank wires, no payment processors, no currency conversion. A $0.001 API call costs exactly $0.001.
When your software calls an endpoint, it gets back a "402 Payment Required" response — like a toll booth. The payment library reads the price, signs a stablecoin transfer from your wallet, and re-sends the request with the payment attached. The whole thing happens in one round-trip. Your code just sees the data come back.
This is what the x402 protocol does — it bakes payments into regular web requests. No checkout pages, no invoices, no payment processors. Just HTTP with money built in.
Every endpoint accepts payment on any supported network. Pick the one that fits your agent's speed and cost requirements.
Production-grade endpoints backed by best-in-class providers. All priced for micropayments.
All models via OpenRouter. Same request format, same payment flow — just pick a model.
Unified flagship, 1M ctx
/api/llm/gpt-5.4
Max reasoning tier
/api/llm/gpt-5.4-pro
SOTA agentic coding
/api/llm/gpt-5.3-codex
Premium reasoning
/api/llm/gpt-5.2-pro
Previous flagship
/api/llm/gpt-5.2
Code reasoning
/api/llm/gpt-5.2-codex
Efficient flagship
/api/llm/gpt-5.1
Flagship multimodal
/api/llm/gpt-4o
Fast & affordable
/api/llm/gpt-4o-mini
Reasoning model
/api/llm/o1
Latest small reasoning
/api/llm/o4-mini
Ultra-cheap GPT-5
/api/llm/gpt-5-nano
Most powerful
/api/llm/claude-opus
Latest balanced
/api/llm/claude-sonnet-4.6
Balanced & versatile
/api/llm/claude-sonnet
Previous-gen Opus
/api/llm/claude-opus-4.5
Fast & affordable
/api/llm/claude-haiku
Latest Google flagship
/api/llm/gemini-3.1-pro
Fastest & cheapest
/api/llm/gemini-3.1-flash-lite
Next-gen reasoning
/api/llm/gemini-3-pro
Fast next-gen
/api/llm/gemini-3-flash
Strong reasoning
/api/llm/gemini-pro
Speed + quality
/api/llm/gemini-flash
Latest open-source
/api/llm/deepseek-v3.2
Open-source powerhouse
/api/llm/deepseek
Chain-of-thought reasoning
/api/llm/deepseek-r1
Enhanced reasoning
/api/llm/deepseek-v3.2-speciale
Open-source, low cost
/api/llm/llama
1M context, latest Meta
/api/llm/llama-4-maverick
xAI reasoning
/api/llm/grok
2M context, very cheap
/api/llm/grok-4-fast
Code generation
/api/llm/grok-code
Multilingual & coding
/api/llm/qwen
Code specialist
/api/llm/qwen-coder
1M context, latest
/api/llm/qwen3.5
European flagship
/api/llm/mistral
Code-focused
/api/llm/devstral
Search-augmented
/api/llm/perplexity
Strong reasoning
/api/llm/kimi
Fast & affordable
/api/llm/minimax
Latest, 204k context
/api/llm/minimax-m2.7
Zhipu multilingual
/api/llm/glm
ByteDance flagship
/api/llm/seed
Cohere enterprise RAG
/api/llm/command-a
1536-dim vectors for RAG
/api/embeddings
FLUX Schnell — ~2s generation
POST /api/image/fast
FLUX.2 Pro — production quality
POST /api/image/quality
Ideogram v3 — logos, signage
POST /api/image/text
Sandboxed Python, JS, Bash, R
POST /api/code/run
Deepgram Nova-3 with diarization
POST /api/transcribe
6 voices, HD quality, multiple formats
POST /api/tts/openai
Ultra-realistic, multilingual voices
POST /api/tts/elevenlabs
Real-time prices via CoinGecko
GET /api/crypto/price
Rankings, volume, market cap
GET /api/crypto/markets
Price history, OHLC, charts
GET /api/crypto/history
Currently trending coins
GET /api/crypto/trending
Search by name or symbol
GET /api/crypto/search
Multichain balances via Allium
POST /api/wallet/balances
Transaction history with labels
POST /api/wallet/transactions
DEX-derived OHLC, 200 tokens/req
POST /api/token/prices
Name, symbol, decimals, chain
GET /api/token/metadata
ENS name → Ethereum address
GET /api/ens/resolve
Address → ENS name
GET /api/ens/reverse
Simulate EVM txs via Tenderly
POST /api/tx/simulate
Clean markdown from any URL
GET /api/web/scrape
Capture any URL as base64 image
GET /api/web/screenshot
Neural search with highlighted snippets
POST /api/search/web
Extract clean text from up to 10 URLs
POST /api/search/contents
Google Flights — prices, airlines, insights
GET /api/travel/flights
Google Hotels — ratings, amenities, prices
GET /api/travel/hotels
Pin JSON, files, or URLs
POST /api/ipfs/pin
Fetch files by CID
GET /api/ipfs/get
AI agents, bots, and scripts that need to use external services without a human setting up accounts first.
You ask your AI "what happened to Bitcoin this week?" It calls the price and history endpoints, pays a fraction of a cent per call, and gives you a chart and summary. It never needed a CoinGecko account.
A trading bot checks wallet balances every hour, looks at trending coins, pulls price history for analysis. It can run 1,000 calls for about $1–2. No API key management, no rate limit headaches.
An AI writing a blog post needs a custom illustration. It calls the image generation endpoint, pays 1.5 cents, and gets a unique image in 2 seconds. No Midjourney subscription, no credits system.
An AI agent needs to verify that generated code actually runs. It sends the code to the sandbox, pays half a cent, and gets back the output — without needing Docker or a dev environment.
An app records a meeting, sends the audio to the transcription endpoint, and gets back a full transcript with speaker labels — who said what, with timestamps. Ten cents per recording.
An agent generating reports pins them to IPFS for a penny each. The data becomes permanent, publicly addressable, and doesn't depend on any single company's servers staying online.
The old way of using APIs doesn't work for autonomous software.
It's the difference between having a gym membership and paying 10 cents every time you use a treadmill. For software that runs autonomously, the pay-per-use model is simpler, cheaper, and requires zero human setup.
This is especially powerful for autonomous agents — software that operates without a human babysitting it. An agent can discover available services, compare pricing across networks, and pay on the fly, all programmatically. No human needs to create accounts or manage credentials for it.
No tiers. No commitments. Pay exactly what each call costs in stablecoins. Prices are enforced by the protocol.
| Endpoint | Price |
|---|---|
| /api/crypto/price | $0.001 |
| /api/crypto/markets | $0.002 |
| /api/crypto/history | $0.003 |
| /api/crypto/trending | $0.001 |
| /api/crypto/search | $0.001 |
| /api/wallet/balances | $0.005 |
| /api/wallet/transactions | $0.005 |
| /api/wallet/pnl | $0.01 |
| /api/token/prices | $0.005 |
| /api/token/metadata | $0.002 |
| /api/image/fast | $0.015 |
| /api/image/quality | $0.05 |
| /api/image/text | $0.12 |
| /api/code/run | $0.005 |
| /api/transcribe | $0.10 |
| /api/ipfs/pin | $0.01 |
| /api/ipfs/get | $0.001 |
| /api/ens/resolve | $0.001 |
| /api/ens/reverse | $0.001 |
| /api/llm/gpt-4o | $0.04 |
| /api/llm/gpt-4o-mini | $0.003 |
| /api/llm/gpt-4.1 | $0.03 |
| /api/llm/gpt-4.1-mini | $0.006 |
| /api/llm/gpt-5 | $0.035 |
| /api/llm/gpt-5-mini | $0.007 |
| /api/llm/o3 | $0.03 |
| /api/llm/o4-mini | $0.02 |
| /api/llm/claude-opus | $0.09 |
| /api/llm/claude-sonnet | $0.06 |
| /api/llm/claude-haiku | $0.02 |
| /api/llm/gemini-pro | $0.035 |
| /api/llm/gemini-flash | $0.009 |
| /api/llm/deepseek | $0.005 |
| /api/llm/deepseek-r1 | $0.01 |
| /api/llm/llama | $0.002 |
| /api/llm/grok | $0.06 |
| /api/llm/qwen | $0.004 |
| /api/llm/mistral | $0.006 |
| /api/llm/perplexity | $0.06 |
| /api/llm/gpt-5.4 | $0.10 |
| /api/llm/gpt-5.4-pro | $0.30 |
| /api/llm/gpt-5.3-codex | $0.08 |
| /api/llm/claude-opus-4.5 | $0.09 |
| /api/llm/gemini-3.1-pro | $0.05 |
| /api/llm/gemini-3.1-flash-lite | $0.003 |
| /api/llm/qwen3.5 | $0.006 |
| /api/llm/deepseek-v3.2-speciale | $0.008 |
| /api/llm/minimax-m2.7 | $0.01 |
| /api/llm/llama-4-maverick | $0.003 |
| /api/llm/gpt-5-nano | $0.002 |
| /api/llm/o4-mini | $0.03 |
| /api/llm/grok-4-fast | $0.004 |
| /api/llm/command-a | $0.04 |
| /api/travel/flights | $0.02 |
| /api/travel/hotels | $0.02 |
| /api/embeddings | $0.001 |
| /api/web/scrape | $0.005 |
| /api/web/screenshot | $0.01 |
| /api/search/web | $0.01 |
| /api/search/contents | $0.005 |
| /api/tts/openai | $0.01 |
| /api/tts/elevenlabs | $0.02 |
| /api/tx/simulate | $0.01 |
The x402 protocol turns HTTP into a payment rail. Three steps, fully automated.
Your agent makes a normal HTTP request — GET /api/crypto/price?ids=bitcoin
The @x402/fetch wrapper reads the 402 response, picks a network, signs a stablecoin transfer, and retries with the payment attached.
The engine verifies the payment on-chain (or via the facilitator), executes the API call, and streams back the result. The settlement receipt is in the response headers.
Five lines to make your first paid API call.
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// 1. Create account and x402 client (needs USDC on Base)
const account = privateKeyToAccount("0xYOUR_PRIVATE_KEY");
const client = new x402Client();
registerExactEvmScheme(client, { signer: account, networks: ["eip155:8453"] });
// 2. Wrap fetch — it handles 402 negotiation automatically
const paidFetch = wrapFetchWithPayment(fetch, client);
// 3. Call any endpoint — payment happens transparently
const res = await paidFetch(
"https://x402-gateway-production.up.railway.app/api/crypto/price?ids=bitcoin"
);
const data = await res.json();
console.log(data); // { bitcoin: { usd: 97234.12, usd_24h_change: 2.31 } }
Install the x402engine skill and your agent can answer questions about crypto prices, generate images, run code, scrape the web, and more. Users see answers — never payments.
$ cd skills/x402engine
$ npm install
$ export EVM_PRIVATE_KEY=0x...
User: "what's the price of bitcoin?"
Agent: "Bitcoin is currently $97,500."
# payment handled invisibly — $0.001 USDC