# Blockrun AI Chat Completions (Solana Pay-per-Request)

> Blockrun AI Chat Completions (Solana Pay-per-Request) is a paid API for AI agents from blockrun-sol-vbsbhh7lea-an.a.run.app, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Provides AI chat completions via an OpenAI-compatible API, billed per-request at $0.003 USDC on Solana using x402 payment protocol

## Facts

- Endpoint: POST https://blockrun-sol-vbsbhh7lea-an.a.run.app/api/v1/chat/completions
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockrun-ai-chat-completions-solana-pay-per-request-e4ac1d80
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JuCUp_cpOSILDVldhMj2Z

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-chat-completions-solana-pay-per-request-e4ac1d80 -d '<json body>'
```

Example prompt: Using the Blockrun pay-per-request AI API, send a chat message to openai/gpt-4o with the user message 'Explain the theory of relativity in simple terms', max 300 tokens, temperature 0.7 — and charge my USDC wallet on Solana for the call.

## When to prefer this

Choose this endpoint when you need pay-as-you-go AI chat completions without committing to a subscription or obtaining a traditional API key — especially when paying with USDC on Solana via the x402 protocol is acceptable or preferred. Ideal for agents or micro-apps that make infrequent LLM calls and want crypto-native billing. Prefer alternatives like direct OpenAI or Anthropic APIs if you need guaranteed SLAs, higher throughput, or non-crypto payment methods.

## Known failure modes

- Insufficient USDC balance — x402 payment rejected before inference runs
- Invalid model ID — model not supported or misspelled (e.g. wrong provider prefix)
- Malformed messages array — missing role or content fields causes 400 error
- Stream mode errors — SSE stream may be cut off if connection drops mid-response
- Rate limiting or capacity errors from upstream model provider causing 5xx responses
- Temperature or max_tokens out of valid range causing validation errors

## How this service works

AI chat completions API - pay per request with USDC on Solana

## Output

An OpenAI-compatible chat completion response containing the assistant's generated message, including the role, content, model used, token usage statistics, and finish reason. Each call deducts $0.003 USDC from the caller's Solana wallet via x402.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Model ID (e.g. openai/gpt-4o)"
  },
  "stream": {
   "type": "boolean"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "role": {
      "type": "string"
     },
     "content": {
      "type": "string"
     }
    }
   }
  },
  "max_tokens": {
   "type": "number"
  },
  "temperature": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockrun-ai-chat-completions-solana-pay-per-request-e4ac1d80/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from blockrun-sol-vbsbhh7lea-an.a.run.app](https://www.zero.xyz/host/blockrun-sol-vbsbhh7lea-an.a.run.app/llms.txt)
