Pay per call, or from a balance
glim works two ways: pay per call straight from a crypto wallet with no account, or top up a prepaid balance and use an API key. Same endpoints, same prices — pick whichever fits your agent.
Pay per call with a wallet
An unpaid request gets an HTTP 402 challenge listing the price and accepted networks. Your client pays on-chain and retries — no signup. Pay with USDC on Base, Solana, or Monad (x402), or on Tempo (MPP). The x402-proxy CLI runs the whole 402 loop for you:
# Pay per call with a crypto wallet — no account, no key.
# x402-proxy reads the 402 challenge and auto-pays from your wallet.
npx x402-proxy https://glim.sh/api/v1/twitter/get/cascade_fyi
# Check your wallet balance any time
npx x402-proxy walletFor MCP clients, the same proxy bridges a stdio server to the paid endpoint, so any wallet-paying agent can connect:
# Same wallet, for MCP clients — bridges stdio to the paid endpoint
npx x402-proxy mcp https://glim.sh/mcp402 challenge, then pay — so you always pay the current price for the current network. If glim ever moves hosts, only the URL changes.Prepaid balance & API key
Prefer not to attach a wallet per call? Sign in at glim.sh/app, top up a balance, and create an API key. Send it as an x-api-key header (or Authorization: Bearer) on REST, or connect the MCP server over OAuth — calls are billed against your balance:
# Prepaid balance: top up at glim.sh/app, then send your key
curl -X POST https://glim.sh/api/v1/web/search \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"x402 protocol"}'Full API reference
Every endpoint, parameter, and example response lives in the machine-readable spec:
- Interactive API reference — browse and try every endpoint in the browser
- OpenAPI spec — the raw OpenAPI 3.1 document for codegen and tooling
- llms.txt — a compact, agent-readable index of tools, prices, and the payment flow