Run a CrewAI crew on any BlockRun model with no provider keys
CrewAI's LLM class takes a base URL; point it at the blockrun-litellm sidecar and every agent in a crew picks its own catalog model — no provider keys, pay per call.
How it works
CrewAI routes model calls through LiteLLM, and its LLM object accepts a model id and a base URL. With the base URL set to the blockrun-litellm sidecar, each agent in a crew names a catalog model — a frontier model for the planner, a cheaper one for the researcher — and the sidecar signs an x402 payment for every call from one wallet.
Tasks, tools, delegation and the crew's process are untouched; the sidecar is transparent to CrewAI. What changes is procurement: no OpenAI, Anthropic or Google account per model, and a per-call price that the 402 states before the call rather than an invoice after it.
Behind it is the BlockRun catalog: 78 chat models plus image, video, music and speech generation, search, market data and multi-chain RPC, priced per call. 6 open-weight models are free and need no wallet.
Setup
1. Start the sidecar
pip install 'blockrun-litellm[proxy]'\nexport BLOCKRUN_WALLET_KEY=0x<base wallet key>\nblockrun-litellm-proxy --port 40012. Give each agent a catalog model
from crewai import Agent, LLM
planner_llm = LLM(model="openai/anthropic/claude-sonnet-5", base_url="http://127.0.0.1:4001/v1", api_key="dummy")
worker_llm = LLM(model="openai/openai/gpt-5.4-mini", base_url="http://127.0.0.1:4001/v1", api_key="dummy")
planner = Agent(role="planner", goal="...", backstory="...", llm=planner_llm)Questions
- How do I connect CrewAI to BlockRun?
- Start the sidecar and build each agent's LLM with base_url set to it and a catalog model id under the openai/ prefix, as in the setup. Nothing else in the crew changes.
- Can each CrewAI agent use a different model?
- Yes. Every agent gets its own LLM object, so a planner on a frontier model and workers on a cheaper one run in one crew from one wallet.
- Do CrewAI tools and delegation work through the sidecar?
- Yes. The sidecar is a transparent OpenAI-compatible proxy; tool calling and agent delegation behave as they do against any provider.
- Where does the wallet live?
- On the machine running the sidecar. Set BLOCKRUN_WALLET_KEY in its environment; the key never goes to CrewAI or to BlockRun.
- CrewAI on BlockRun vs CrewAI with a provider key per agent?
- Same crews, same code. One wallet replaces a key per provider, every model is available to every agent, and each call is priced before it runs.
- What does a call cost through this integration?
- The provider's published token rate with no markup on tokens, plus a flat per-call fee, quoted in dollars in the 402 before the call runs. Image, video and speech calls are priced per unit the same way. The live rate card is on the models page.
- Do I need an API key or an account?
- No. On the pay-per-call door the request carries its own payment from a wallet the SDK or MCP server creates on first run; there is nothing to sign up for. Teams that prefer keys get an API key and a monthly invoice instead.
Two ways to run this
Get an API key
Sign in, get a key, and call the same endpoints with usage billed to your account. For teams that want one invoice instead of one wallet.
Get an API keyOr let your agent pay per call, in USDC
No account, no API key. Three steps, and the last one is the request this page is about.
- Point your agent at BlockRun
Install ClawRouter, or add the BlockRun MCP server to Claude Code, Cursor, Codex or OpenClaw. Any OpenAI-compatible client works too — change the base URL, nothing else.
curl -fsSL https://blockrun.ai/ClawRouter-update | bash - Fund a wallet with USDC
Send USDC to a wallet on Base or Solana. There is no account to create and no API key to issue: the wallet is the account, and it pays per call.
- Use BlockRun from CrewAI
The first call returns HTTP 402 with the exact price, your agent signs it, and the answer comes back. Payment settles on-chain; nothing is charged if the call fails.
pip install 'blockrun-litellm[proxy]'\nexport BLOCKRUN_WALLET_KEY=0x<base wallet key>\nblockrun-litellm-proxy --port 4001
Explore everything on BlockRun
- GPT-6 Astra
- GPT-5.6 Sol
- GPT-5.6 Terra
- GPT-5.6 Luna
- GPT-5.6 Sol Pro
- GPT-5.6 Terra Pro
- GPT-5.6 Luna Pro
- GPT-5.5
- GPT-5.5 Pro
- ChatGPT Instant (GPT-5.5)
- GPT-5.4
- GPT-5.4 Pro
- GPT-5.1
- GPT-5.2
- GPT-5.4 Mini
- GPT-5 Mini
- GPT-5.4 Nano
- GPT-5.2 Pro
- GPT-5.3 Codex
- GPT-4.1
- GPT-4.1 Mini
- GPT-4.1 Nano
- GPT-4o
- GPT-4o Mini
- o1
- o3
- o3-mini
- o4-mini
- Claude Haiku 4.5
- Claude Sonnet 5
- All models →