BlockRun

Use BlockRun as an OpenAI-compatible provider in Zed's assistant

Point Zed's OpenAI provider api_url at the blockrun-litellm sidecar and the assistant can chat and edit with any catalog model — fast for inline edits, frontier for the agent.

How it works

Zed configures language-model providers in settings.json, and its OpenAI provider accepts a custom api_url with a list of available models. With the URL set to the blockrun-litellm sidecar, the assistant panel can name any catalog model, and the sidecar signs an x402 payment for each request from your wallet.

Nothing about Zed's inline assist, threads or agent panel changes; the endpoint that answers does. Because each model is one entry in the list, a fast model for inline edits and a frontier model for the agent panel sit side by side in the same picker.

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 4001

2. settings.json

{
  "language_models": {
    "openai": {
      "api_url": "http://127.0.0.1:4001/v1",
      "available_models": [
        { "name": "anthropic/claude-sonnet-5", "display_name": "Claude Sonnet 5 via BlockRun", "max_tokens": 200000 }
      ]
    }
  }
}

Questions

How do I use BlockRun in Zed?
Start the sidecar, set the OpenAI provider's api_url to it in settings.json and list the catalog models you want, as in the setup. Set the OpenAI API key in Zed to any placeholder; the sidecar ignores it.
Which models can Zed's assistant use through BlockRun?
Any catalog id you add to available_models — one entry per model, each with the context length you want Zed to assume.
Does Zed's agent panel work through the sidecar?
Yes. The agent panel uses the same provider; tool calls and streaming pass through the sidecar unchanged.
Does the sidecar need to run before Zed?
Yes, or the first request fails to connect. Run it as a background service on the machine Zed runs on.
Zed on BlockRun vs Zed's own model access?
Zed's built-in providers keep working. BlockRun adds every catalog model under one provider with no key, priced per call.
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 key 

Or 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.

  1. 01
    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
  2. 02
    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.

  3. 03
    Use BlockRun from Zed

    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