# BlockRun AI – Claude Chat Completions (OpenAI-Compatible)

> BlockRun AI – Claude Chat Completions (OpenAI-Compatible) is a paid API for AI agents from blockrun.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Provides OpenAI-compatible chat completions via Claude and other models through BlockRun's x402 pay-per-call gateway.

## Facts

- Endpoint: POST https://blockrun.ai/v1/chat/completions
- Price: $0.002/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-claude-chat-completions-openai-compatible-9b35d21f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OpwnGNZkLvSSMV1vkpPx-

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-claude-chat-completions-openai-compatible-9b35d21f -d '<json body>'
```

Example prompt: Send this conversation to Claude Haiku — system prompt: 'You are a concise assistant', user message: 'Explain how zero-knowledge proofs work in two sentences' — stream the response and cap it at 300 tokens.

## When to prefer this

Choose this endpoint when you need OpenAI-compatible chat completions from Claude models and want to pay per call via x402 micropayments in USDC without managing an Anthropic API key subscription. It is especially useful for AI agents that need to call LLMs on-demand within a broader agentic workflow, or when building systems that already use the OpenAI SDK and want to swap in Claude with minimal code changes.

## Known failure modes

- 402 Payment Required if x402 payment header is missing or insufficient
- Invalid model ID returns a 400 or model-not-found error
- Exceeding max_tokens silently truncates the response
- Malformed messages array (missing role or content) causes a 400 error
- Network timeout on long generations if max_tokens is very large
- Streaming errors mid-response if connection is dropped

## How this service works

OpenAI-compatible chat completions.

## Output

Returns an OpenAI-compatible chat completion object containing the model's generated message, finish reason, token usage counts, and optional streamed delta chunks if streaming is enabled.

## 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",
   "items": {
    "type": "object",
    "properties": {
     "role": {
      "type": "string"
     },
     "content": {
      "type": "string"
     }
    }
   },
   "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-claude-chat-completions-openai-compatible-9b35d21f/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)
