BlockRun
Integrations / OpenAI Agents SDK

Run the OpenAI Agents SDK on any BlockRun model

Point the OpenAI Agents SDK at the blockrun-litellm sidecar and its agents run on any model in the catalog — OpenAI's, Anthropic's, open-weight — with no OpenAI key.

How it works

The Agents SDK talks to an OpenAI-compatible base URL. The blockrun-litellm sidecar is one, running locally and signing an x402 payment for each request from your wallet, so the SDK needs no OpenAI key and can name any catalog model in the agent definition.

This keeps the SDK's own tool loop, handoffs and tracing intact; the only thing that changes is which endpoint answers and how it is paid. Switching an agent from a frontier model to a cheaper one is a one-string change.

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]'
export BLOCKRUN_WALLET_KEY=0x<base wallet key>
blockrun-litellm-proxy --port 4001

2. Point the SDK at it

export OPENAI_BASE_URL=http://127.0.0.1:4001/v1
export OPENAI_API_KEY=dummy

Questions

Do tools and handoffs still work?
Yes. The sidecar is a transparent OpenAI-compatible proxy; the SDK's loop is unchanged.
Can an agent use a non-OpenAI model?
Yes — name any catalog id in the agent's model field.

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 OpenAI Agents SDK

    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]'
    export BLOCKRUN_WALLET_KEY=0x<base wallet key>
    blockrun-litellm-proxy --port 4001