# BlockRun — The Payment Rail for AI > BlockRun is a service marketplace where AI agents discover, route, and pay for APIs using USDC via the x402 protocol. No API keys, no subscriptions, no vendor lock-in. Pay only for what you use. ## What Is BlockRun? BlockRun is the infrastructure layer that enables AI agents to autonomously pay for services. It provides: 1. **AI Model Gateway** — Access 55+ large language models through a single OpenAI-compatible API endpoint. Models include GPT-5, GPT-4o, Claude Opus 4.7, Claude Sonnet 4.6, Gemini 2.5 Pro, Grok 4.20, Grok Imagine (image+video), DeepSeek Chat, Kimi K2.6, Llama, Mistral, Cohere, Qwen, and more. 2. **ClawRouter** — An open-source smart LLM router that reduces API costs by up to 78% through 7-layer prompt compression, intelligent model routing (routes to the cheapest capable model), and response caching (~200ms latency savings). 3. **Data Marketplace** — Real-time data APIs (prediction markets, neural web search) that AI agents can purchase per-request. 4. **x402 Protocol** — HTTP-native payment standard where AI agents pay with USDC on Base or Solana. Non-custodial — private keys never leave the agent's machine. ## Who Uses BlockRun? - **AI agent builders** who need their agents to autonomously access multiple AI providers without managing API keys - **Startups** that want one payment rail for all AI providers instead of managing a dozen API keys and billing accounts - **Enterprises** that need budget controls, team management, and usage analytics for their AI spending - **Claude Code users** via the BlockRun MCP server and Claude Code plugin Trusted by Circle, Coinbase, Solana, Ampersand, T54, and Pin.AI. ## API Reference Base URL: `https://blockrun.ai` Solana endpoint: `https://sol.blockrun.ai` XRPL endpoint: `https://xrpl.blockrun.ai` Testnet: `https://testnet.blockrun.ai` ## Public Traction Live at https://blockrun.ai/metrics (refreshed hourly, on-chain verifiable): - 6,000,000+ API calls served since Feb 2026 - 1,431+ unique paying wallets - $31,000+ USDC settled on-chain (Base treasury: 0xe9030014F5DAe217d0A152f02A043567b16c1aBf) ### Chat Completions (OpenAI-compatible) ``` POST /v1/chat/completions ``` Request body: ```json { "model": "openai/gpt-4o", "messages": [ {"role": "user", "content": "Hello"} ], "max_tokens": 1024 } ``` ### Image Generation ``` POST /v1/images/generations POST /v1/images/image2image ``` ### Video Generation ``` POST /v1/videos/generations ``` ### List Available Models ``` GET /v1/models ``` ### Web Search (Exa-powered) ``` POST /api/v1/exa/search $0.01 Neural/keyword search. Optional category filter: linkedin profile, company, research paper, news, pdf, github, tweet, financial report. POST /api/v1/exa/find-similar $0.01 Find semantically similar pages to a given URL. POST /api/v1/exa/contents $0.002/URL Extract full text, highlights, and summaries from specific URLs. POST /api/v1/exa/answer $0.01 AI-generated answer grounded in live web search results. ``` ### Sandbox Compute (Modal) ``` POST /api/v1/modal/sandbox/create $0.01 Create isolated container (any Docker image, optional GPU: T4–H100). POST /api/v1/modal/sandbox/exec $0.001 Execute command in sandbox, returns stdout/stderr/exit code. POST /api/v1/modal/sandbox/status $0.001 Check sandbox status (running/terminated). POST /api/v1/modal/sandbox/terminate $0.001 Terminate sandbox and release resources. ``` ## x402 Payment Flow 1. AI agent sends an API request to BlockRun 2. BlockRun returns HTTP 402 Payment Required with the price in the `x-payment-required` header 3. Agent signs a USDC payment locally (private key never leaves the machine) 4. Agent retries the request with `x-payment` header containing the signed payment 5. BlockRun verifies payment and returns the API response 6. Settlement is non-custodial and instant on Base or Solana ## Available Models and Pricing All prices are per 1 million tokens. BlockRun charges provider cost + 30% margin. ### Chat Models | Model | Provider | Input $/M tokens | Output $/M tokens | |-------|----------|-------------------|---------------------| | gpt-5.2 | OpenAI | $1.75 | $14.00 | | gpt-4o | OpenAI | $2.50 | $10.00 | | gpt-4o-mini | OpenAI | $0.15 | $0.60 | | claude-opus-4 | Anthropic | $15.00 | $75.00 | | claude-sonnet-4 | Anthropic | $3.00 | $15.00 | | gemini-2.5-pro | Google | $1.25 | $10.00 | | gemini-2.5-flash | Google | $0.15 | $0.60 | | grok-3 | xAI | $3.00 | $15.00 | | grok-3-mini | xAI | $0.30 | $0.50 | | deepseek-chat | DeepSeek | $0.28 | $0.42 | | kimi-k2.6 | Moonshot | $0.95 | $4.00 | | kimi-k2.5 | Moonshot | $0.60 | $3.00 | ### Image Models | Model | Provider | Price | |-------|----------|-------| | dall-e-3 | OpenAI | $0.04-0.08/image | | gpt-image-1 | OpenAI | $0.02-0.04/image | | gpt-image-2 | OpenAI | $0.06-0.12/image (ChatGPT Images 2.0 — reasoning + multilingual text) | | nano-banana | Google | $0.05/image | | nano-banana-pro | Google | $0.10-0.15/image | | grok-imagine-image | xAI | $0.02/image | | grok-imagine-image-pro | xAI | $0.07/image | ### Video Models | Model | Provider | Price | |-------|----------|-------| | xai/grok-imagine-video | xAI | $0.05/sec (default 8s) | | bytedance/seedance-1.5-pro | ByteDance | $0.03/sec (default 5s, budget tier) | | bytedance/seedance-2.0-fast | ByteDance | $0.15/sec (default 5s, fast) | | bytedance/seedance-2.0 | ByteDance | $0.30/sec (default 5s, premium quality) | ## SDKs ### Python ```bash pip install blockrun-llm ``` ```python from blockrun_llm import LLMClient client = LLMClient() response = client.chat("openai/gpt-4o", "Hello!") ``` ### TypeScript / Node.js ```bash npm install @blockrun/llm ``` ```typescript import { LLMClient } from "@blockrun/llm"; const client = new LLMClient(); const response = await client.chat("openai/gpt-4o", "Hello!"); ``` ### Go ```bash go get github.com/blockrunai/blockrun-llm-go ``` ### MCP Server (for Claude Code / Cursor / ChatGPT Desktop) ```bash claude mcp add blockrun --transport http https://mcp.blockrun.ai/mcp ``` ## ClawRouter — Smart LLM Router ClawRouter is an open-source (MIT licensed) smart router for LLM API calls. It sits between your AI agent and LLM providers, automatically optimizing for cost and performance. ### Features - **Smart Routing** — Routes requests to the cheapest model capable of handling the task - **7-Layer Compression** — Reduces token usage by 15-40% without quality loss - **Response Caching** — ~200ms latency savings on repeated/similar queries - **Native OpenClaw Support** — Sessions, plugins, memory ### Installation ```bash # Via GitHub git clone https://github.com/BlockRunAI/ClawRouter.git cd ClawRouter && pip install -e . ``` GitHub: https://github.com/BlockRunAI/ClawRouter ## Supported Chains | Chain | Endpoint | Currency | Status | |-------|----------|----------|--------| | Base Mainnet | blockrun.ai | USDC | Production | | Solana Mainnet | sol.blockrun.ai | USDC | Production | | Base Sepolia | Testnet | Test USDC | Testing | | XRPL | Coming soon | — | Planned | ## Enterprise Features - Budget controls per agent, per project, or organization-wide - Team management and role-based access - Real-time usage analytics and cost tracking - Dedicated account manager and SLA guarantees - Contact: https://blockrun.ai/enterprise ## Competitive Advantages vs Alternatives - **vs Direct API keys**: No key management for 12+ providers. One funding source, all providers accessible. Automatic fallback across providers. - **vs OpenRouter**: Native crypto payments, no custodial accounts needed. x402 protocol is an open standard. - **vs Building your own**: No billing integration needed. Pay-per-use with natural budget limits. No rate limit juggling. ## Links - Website: https://blockrun.ai - Documentation: https://blockrun.ai/docs - GitHub Organization: https://github.com/BlockRunAI - ClawRouter: https://github.com/BlockRunAI/ClawRouter - Python SDK: https://github.com/blockrunai/blockrun-llm - TypeScript SDK: https://github.com/blockrunai/blockrun-llm-ts - X/Twitter: https://x.com/BlockRunAI - Blog: https://blockrun.ai/signal - Pricing: https://blockrun.ai/pricing - Enterprise: https://blockrun.ai/enterprise - Get Started: https://blockrun.ai/get-started ## Awards - OpenClaw Hackathon Winner (Circle / Coinbase)