# BlockRun Pay-Per-Call AI Chat Completions

> BlockRun Pay-Per-Call AI Chat Completions is a paid API for AI agents from blockrun.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Sends chat messages to AI models (e.g. GPT-4o-mini, Claude Haiku) and returns completions, billed per call in USDC with no API key required.

## Facts

- Endpoint: POST https://blockrun.ai/api/v1/chat/completions
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockrun-pay-per-call-ai-chat-completions-31573690
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8lrUyLQMoPDI0laLqkUWN

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-pay-per-call-ai-chat-completions-31573690 -d '<json body>'
```

Example prompt: Send this conversation to gpt-4o-mini on BlockRun and get a completion — messages are [{role: user, content: 'Explain proof of work in two sentences'}], max 200 tokens, temperature 0.7, no streaming.

## When to prefer this

Choose this endpoint when your agent needs LLM completions without managing separate API keys for OpenAI or Anthropic, especially in Web3-native or crypto-payment contexts where paying per call in USDC over Base or Solana is preferred over subscription billing. Ideal for autonomous agents using the x402 payment protocol or frameworks like OpenClaw, Claude Code, or Franklin Agent.

## Known failure modes

- Insufficient USDC balance or failed x402 micropayment — returns 402 Payment Required
- Invalid or unsupported model ID — returns 400 with model not found error
- Messages array missing or malformed — returns 400 validation error
- Max tokens exceeds model context limit — returns 400 or truncated response
- Network timeout on long completions — returns 504 or partial stream
- Rate limiting if too many concurrent calls — returns 429

## 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 OpenAI-compatible chat completion object containing the assistant's generated message, finish reason, and token usage counts. If streaming is enabled, returns server-sent events with incremental token chunks.

## Example request

```json
{
 "model": "gpt-4o-mini",
 "stream": false,
 "messages": [
  {
   "role": "user",
   "content": "What is artificial intelligence?"
  }
 ],
 "max_tokens": 150,
 "temperature": 0.7
}
```

## 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-pay-per-call-ai-chat-completions-31573690/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)
