# BlockRun AI Model Routing & Inference API

> BlockRun AI Model Routing & Inference API is a paid API for AI agents from blockrun.ai, paid per call via x402, $0.011/call, status unknown (last checked 2026-09-13).

Routes chat completion requests to frontier AI models (GPT-4o, Claude, etc.) with built-in on-chain USDC payment settlement on Base and Solana.

## Facts

- Endpoint: POST https://blockrun.ai/api/v1/responses
- Price: $0.011/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockrun-ai-model-routing-inference-api-5046570e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DLXjEWi_B6nGGP_tFRpui

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability blockrun-ai-model-routing-inference-api-5046570e -d '<json body>'
```

Example prompt: Use BlockRun to send this conversation to claude-haiku-4.5 — up to 1024 tokens, temperature 0.7 — and stream the response back: 'Explain the difference between proof-of-work and proof-of-stake in plain English.'

## When to prefer this

Choose this endpoint when you need to access multiple frontier AI models through a single unified interface with automatic on-chain USDC payment settlement, eliminating the need to manage separate API keys and billing accounts for OpenAI, Anthropic, and other providers. Especially valuable for AI agents running on Web3 infrastructure or when payments must be settled transparently on Base or Solana.

## Known failure modes

- Insufficient USDC balance causes payment failure and 402 response
- Invalid model ID returns an error indicating unsupported model
- Max tokens exceeded for the selected model returns a validation error
- Network latency or model provider downtime causes timeout
- Malformed messages array (missing role or content) returns 400 bad request
- Temperature out of range (>2 or <0) returns validation error

## How this service works

Pay for the outcome. One endpoint for every model, tool and data source an agent needs — each call priced before it runs, at the best value per dollar. 103 models and 100 data and tool APIs.

## Output

Returns a chat completion response including the generated text content, model used, token usage statistics, and finish reason — optionally streamed as server-sent events if streaming is enabled. Payment is settled on-chain in USDC on Base or Solana per call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "AI model ID (e.g., gpt-4o-mini, claude-haiku-4.5)"
  },
  "stream": {
   "type": "boolean",
   "description": "Enable streaming responses"
  },
  "messages": {
   "type": "array",
   "description": "Array of chat messages with role and content"
  },
  "max_tokens": {
   "type": "integer",
   "description": "Maximum tokens to generate"
  },
  "temperature": {
   "type": "number",
   "description": "Sampling temperature (0-2)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockrun-ai-model-routing-inference-api-5046570e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from blockrun.ai](https://www.zero.xyz/host/blockrun.ai/llms.txt)
