38 APIs live — 15 LLMs

Pay-per-call APIs
for AI agents

No API keys. No subscriptions. No rate limits.
Just send stablecoins with every request using the x402 payment protocol.

terminal
$ 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");

A vending machine for data and AI tools

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 accounts

No sign-up forms, no email verification, no dashboards. There is no concept of a "user" — just a wallet that pays.

No API keys

No secrets to rotate, no rate limit tiers, no usage quotas. The payment is the authentication.

No subscriptions

No monthly bills, no overage charges. Pay for exactly what you use — one tenth of a cent at a time.

How does money actually move?

The money is stablecoins — digital dollars that live on a blockchain. Think of them like casino chips, except they're always worth exactly $1 and you can send them anywhere in the world in seconds.

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.

Three networks, one protocol

Every endpoint accepts payment on any supported network. Pick the one that fits your agent's speed and cost requirements.

B

Base

eip155:8453
TokenUSDC
Decimals6
Confirmation~2s
FacilitatorCoinbase CDP
Fastest — 10ms
M

MegaETH

eip155:4326
TokenUSDm
Decimals18
Confirmation~10ms
VerificationDirect on-chain
S

Solana

solana:5eykt4U…
TokenUSDC
Decimals6
Confirmation~400ms
FacilitatorCoinbase CDP

38 APIs, four categories

Production-grade endpoints backed by best-in-class providers. All priced for micropayments.

LLM & AI — 20 models

All models via OpenRouter. Same request format, same payment flow — just pick a model.

OpenAI

GPT-4o

$0.04

Flagship multimodal

/api/llm/gpt-4o

GPT-4o Mini

$0.003

Fast & affordable

/api/llm/gpt-4o-mini

GPT-4.1

$0.03

Coding & long context

/api/llm/gpt-4.1

GPT-4.1 Mini

$0.006

Compact 4.1

/api/llm/gpt-4.1-mini

GPT-5

$0.035

Most capable

/api/llm/gpt-5

GPT-5 Mini

$0.007

Compact GPT-5

/api/llm/gpt-5-mini

o3

$0.03

Reasoning model

/api/llm/o3

o4 Mini

$0.02

Fast reasoning

/api/llm/o4-mini
Anthropic

Claude Opus 4.6

$0.09

Most powerful

/api/llm/claude-opus

Claude Sonnet 4.5

$0.06

Balanced & versatile

/api/llm/claude-sonnet

Claude Haiku 4.5

$0.02

Fast & affordable

/api/llm/claude-haiku
Google / DeepSeek / Meta

Gemini 2.5 Pro

$0.035

Google's best

/api/llm/gemini-pro

Gemini 2.5 Flash

$0.009

Speed + quality

/api/llm/gemini-flash

DeepSeek V3

$0.005

Open-source powerhouse

/api/llm/deepseek

DeepSeek R1

$0.01

Chain-of-thought reasoning

/api/llm/deepseek-r1

Llama 3.3 70B

$0.002

Open-source, low cost

/api/llm/llama
xAI / Qwen / Mistral / Perplexity

Grok 4

$0.06

xAI reasoning

/api/llm/grok

Qwen3 235B

$0.004

Multilingual & coding

/api/llm/qwen

Mistral Large 3

$0.006

European flagship

/api/llm/mistral

Perplexity Sonar

$0.06

Search-augmented

/api/llm/perplexity
Embeddings

Text Embeddings

$0.001

1536-dim vectors for RAG

/api/embeddings
Compute

Fast Image Gen

$0.015

FLUX Schnell — ~2s generation

POST /api/image/fast

Quality Image Gen

$0.05

FLUX.2 Pro — production quality

POST /api/image/quality

Text-in-Image

$0.12

Ideogram v3 — logos, signage

POST /api/image/text

Code Execution

$0.005

Sandboxed Python, JS, Bash, R

POST /api/code/run

Transcription

$0.10

Deepgram Nova-3 with diarization

POST /api/transcribe

TTS (OpenAI)

$0.01

6 voices, HD quality, multiple formats

POST /api/tts/openai

TTS (ElevenLabs)

$0.02

Ultra-realistic, multilingual voices

POST /api/tts/elevenlabs
Crypto & Blockchain

Price Feed

$0.001

Real-time prices via CoinGecko

GET /api/crypto/price

Market Data

$0.002

Rankings, volume, market cap

GET /api/crypto/markets

Historical Data

$0.003

Price history, OHLC, charts

GET /api/crypto/history

Trending

$0.001

Currently trending coins

GET /api/crypto/trending

Coin Search

$0.001

Search by name or symbol

GET /api/crypto/search

Wallet Balances

$0.005

Multichain balances via Allium

POST /api/wallet/balances

Wallet Transactions

$0.005

Transaction history with labels

POST /api/wallet/transactions

Wallet P&L

$0.01

Realized & unrealized P&L

POST /api/wallet/pnl

Token Prices

$0.005

DEX-derived OHLC, 200 tokens/req

POST /api/token/prices

Token Metadata

$0.002

Name, symbol, decimals, chain

GET /api/token/metadata

ENS Resolve

$0.001

ENS name → Ethereum address

GET /api/ens/resolve

ENS Reverse

$0.001

Address → ENS name

GET /api/ens/reverse

TX Simulation

$0.01

Simulate EVM txs via Tenderly

POST /api/tx/simulate
Web

Web Scrape

$0.005

Clean markdown from any URL

GET /api/web/scrape

Web Screenshot

$0.01

Capture any URL as base64 image

GET /api/web/screenshot
Storage

IPFS Pin

$0.01

Pin JSON, files, or URLs

POST /api/ipfs/pin

IPFS Retrieve

$0.001

Fetch files by CID

GET /api/ipfs/get

Built for autonomous software

AI agents, bots, and scripts that need to use external services without a human setting up accounts first.

AI research assistant

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.

crypto/price crypto/history ~$0.004/query

Portfolio tracker bot

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.

wallet/balances crypto/trending ~$0.006/check

Content creation agent

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.

image/fast image/quality $0.015–0.12/image

Coding assistant

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.

code/run $0.005/execution

Meeting transcription pipeline

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.

transcribe $0.10/recording

Decentralized data archival

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.

ipfs/pin ipfs/get $0.01/pin

Why this matters

The old way of using APIs doesn't work for autonomous software.

Today: the API key treadmill

  1. 01 Sign up for a service with email + password
  2. 02 Navigate a dashboard to generate an API key
  3. 03 Store the key securely (env vars, secrets manager)
  4. 04 Handle rate limits, quotas, and overage billing
  5. 05 Rotate keys periodically, manage per-service billing
  6. 06 Repeat for every new service your agent needs

With x402: just pay

  1. 01 Fund a wallet with stablecoins
  2. 02 Call any endpoint — payment is automatic
  3. 03 That's it. No keys, no accounts, no billing pages.

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.

Simple pricing

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/embeddings$0.001
/api/web/scrape$0.005
/api/web/screenshot$0.01
/api/tts/openai$0.01
/api/tts/elevenlabs$0.02
/api/tx/simulate$0.01

How it works

The x402 protocol turns HTTP into a payment rail. Three steps, fully automated.

1

Agent calls an endpoint

Your agent makes a normal HTTP request — GET /api/crypto/price?ids=bitcoin

HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6Miw...
Content-Type: application/json
{ "error": "X-PAYMENT header is required", "accepts": [...] }
2

Agent signs a payment

The @x402/fetch wrapper reads the 402 response, picks a network, signs a stablecoin transfer, and retries with the payment attached.

X-PAYMENT: <base64-encoded signed payment>
GET /api/crypto/price?ids=bitcoin
3

Engine verifies & responds

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.

HTTP/1.1 200 OK
PAYMENT-RESPONSE: <settlement receipt>
{ "bitcoin": { "usd": 97234.12, "usd_24h_change": 2.31 } }

Quick start

Five lines to make your first paid API call.

TypeScript
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 } }