# BlockRun Messages API — Pay-per-call Claude-compatible AI Gateway

> BlockRun Messages API — Pay-per-call Claude-compatible AI Gateway 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).

Proxies Anthropic-style chat completion requests (messages API) with per-call USDC micropayment settlement on Base or Solana, requiring no API keys

## Facts

- Endpoint: POST https://blockrun.ai/api/v1/messages
- 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-messages-api-pay-per-call-claude-compatible-ai-gateway-c62b671a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Pr4jrCdudpwJhpc0G58QQ

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-messages-api-pay-per-call-claude-compatible-ai-gateway-c62b671a -d '<json body>'
```

Example prompt: Send a message to Claude using BlockRun — no API key needed, just pay per call in USDC on Base — asking it to summarize this article: 'Crypto markets rallied today as Bitcoin crossed $100k for the first time.' Use claude-3-5-sonnet and allow up to 512 output tokens.

## When to prefer this

Choose this endpoint when you need Claude-compatible LLM inference without managing Anthropic API keys, especially in autonomous agent contexts where crypto-native micropayment settlement (USDC on Base or Solana via x402) is preferred over subscription billing. Ideal for OpenClaw, Claude Code, or Franklin Agent integrations that need a single endpoint handling models, data, and runtime with no key management overhead.

## Known failure modes

- 402 Payment Required — USDC payment not attached or insufficient balance
- invalid model ID — model string not recognized by the gateway
- malformed messages array — conversation history missing required role/content fields
- max_tokens exceeded — requested token limit beyond model capacity
- streaming error — SSE stream interrupted mid-response
- payment settlement failure — on-chain transaction rejected on Base or Solana

## 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 an Anthropic-style messages API response containing the assistant's reply text, any tool call invocations, usage token counts, and stop reason; supports optional SSE streaming for incremental token delivery. Payment of $0.01 USDC is settled on-chain per call via x402.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Anthropic-style model id"
  },
  "tools": {
   "type": "array",
   "description": "Optional tool definitions"
  },
  "stream": {
   "type": "boolean",
   "description": "Stream response as SSE"
  },
  "system": {
   "type": "string",
   "description": "Optional system prompt"
  },
  "messages": {
   "type": "array",
   "description": "Conversation history"
  },
  "max_tokens": {
   "type": "integer",
   "description": "Max output tokens"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockrun-messages-api-pay-per-call-claude-compatible-ai-gateway-c62b671a/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)
