{"uid":"cap_OpwnGNZkLvSSMV1vkpPx-","slug":"blockrun-ai-claude-chat-completions-openai-compatible-9b35d21f","name":"BlockRun AI – Claude Chat Completions (OpenAI-Compatible)","description":"OpenAI-compatible chat completions.","url":"https://blockrun.ai/v1/chat/completions","method":"POST","headers":{},"bodySchema":{"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)"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Yent0xEf10ZFu-WfzHr4R","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Provides OpenAI-compatible chat completions via Claude and other models through BlockRun's x402 pay-per-call gateway.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"AI agent reasoning step","prompt":"Use Claude Haiku to reason through this problem: given a list of 5 DeFi protocols ranked by TVL, which one should a conservative investor pick and why? Keep the answer under 200 tokens."},{"title":"Automated customer support reply drafting","prompt":"Draft a polite customer support reply using Claude — system prompt is 'You are a helpful support agent for a crypto wallet app', and the user said: 'My transaction has been pending for 2 hours, what should I do?' Max 150 tokens."},{"title":"Code explanation for developer tool","prompt":"I need Claude to explain this Solidity snippet to a junior developer in plain English, streaming the response as it comes — here's the code: `function transfer(address to, uint256 amount) public returns (bool)`."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:51:22.992Z","isFirstParty":false}