{"uid":"cap_F5nRpZndzQlTWd097OItB","slug":"blockrun-ai-c2a4ec8a","name":"BlockRun.AI LLM Chat Completions Gateway","description":"AI chat completions API - pay per request with USDC on Base","url":"https://blockrun-web-vbsbhh7lea-uc.a.run.app/api/v1/chat/completions?utm_source=zero.xyz","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":{"request":{"model":"gpt-4o-mini","stream":false,"messages":[{"role":"user","content":"What are the top 3 benefits of renewable energy?"}],"max_tokens":300,"temperature":0.7},"response":{"id":"chatcmpl-DryVs9ATLbkwq6wwWpc5ZFVPewzXt","model":"gpt-4o-mini","usage":{"total_tokens":253,"prompt_tokens":104,"completion_tokens":149,"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0},"completion_tokens_details":{"audio_tokens":0,"reasoning_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"The top three benefits of renewable energy are:\n\n1. **Environmental Sustainability**: Renewable energy sources, such as solar, wind, and hydro, produce little to no greenhouse gas emissions during operation. This helps reduce air and water pollution, combat climate change, and protect ecosystems.\n\n2. **Energy Independence**: By utilizing renewable energy, countries can reduce their reliance on imported fossil fuels, enhancing energy security and stability. This independence can protect economies from volatile fossil fuel prices and geopolitical tensions.\n\n3. **Job Creation and Economic Growth**: The renewable energy sector has been a significant source of job creation, with opportunities in manufacturing, installation, maintenance, and research and development. As the sector grows, it also stimulates economic development in local communities."},"finish_reason":"stop"}],"created":1781756368}},"exampleRequest":{"model":"gpt-4o-mini","stream":false,"messages":[{"role":"user","content":"What are the top 3 benefits of renewable energy?"}],"max_tokens":300,"temperature":0.7},"tags":["x402"],"displayCostAmount":"0.028087","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":5,"rating":{"score":"0.77","successRate":"0.97","reviews":5,"stars":"4.1","state":"rated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.028087/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_PDu0d-NnQvEkiOq25cCrb","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":"Pay-per-call AI chat completions gateway supporting ChatGPT, Claude, Gemini, DeepSeek, and Grok via x402 micropayments on Base","exampleAgentPrompt":"Using the BlockRun pay-as-you-go LLM gateway, send a chat message to gpt-4o-mini asking 'What are the top 3 benefits of renewable energy?' with a temperature of 0.7 and max 300 tokens.","exampleUseCases":null,"resultDescription":"Returns a chat completion response in OpenAI-compatible format containing the assistant's generated message, the model used, token usage statistics (prompt, completion, total), and finish reason. Response structure mirrors the standard OpenAI chat completions API format.","failureModes":["Payment failure: x402 payment not accepted or insufficient USDC balance — returns 402 Payment Required","Invalid model ID: unsupported or misspelled model identifier — returns 400 Bad Request","Malformed messages array: missing role or content fields — returns 400 with validation error","Rate limiting or upstream provider outage — returns 429 or 503","Temperature out of range (must be 0-2) — returns 400 validation error","Token limit exceeded for chosen model — returns 400 or truncated response"],"whenToPreferThis":"Choose this endpoint when you need pay-as-you-go access to multiple major LLMs (OpenAI, Anthropic, Google, DeepSeek, xAI) without subscription commitments, paying only $0.001 USDC per call via x402 on Base. Ideal for agents that need to switch between models dynamically, operate on-chain, or avoid API key management across multiple providers. Prefer this over direct provider APIs when you want unified billing, blockchain-native micropayments, or model flexibility in a single endpoint.","instructions":null,"reviewSummary":"BlockRun.AI delivers consistent latency and competitive per-token pricing across major LLMs including OpenAI and Anthropic models via the x402 protocol on Base. It performs reliably as a primary or fallback gateway, handling large prompts and failover scenarios well in most cases. One recorded status 400 failure occurred during an automated failover chain, and the gateway silently substitutes unknown model names rather than returning an error, requiring callers to verify the actual model used via response metadata.","reviewSummaryHighlights":["Consistent latency and transparent pricing across large-prompt and failover calls","Reliable fallback behavior — picks up standard OpenAI-format requests seamlessly","Broad LLM coverage including Anthropic, Google, DeepSeek, and xAI via a single gateway"],"reviewSummaryConcerns":["Silent model substitution for unknown model names — actual model served must be confirmed from response.model field","Occasional status 400 errors in automated failover chains"],"reviewSummaryGeneratedAt":"2026-08-14T02:16:23.417Z","activationCount":1190,"lastUsedAt":"2026-09-05T08:15:49.379Z","lastSuccessfullyRanAt":"2026-09-05T08:15:49.379Z","lastHealthCheckAt":"2026-10-12T06:31:20.595Z","isFirstParty":false,"canonicalSlug":"blockrun-ai-c2a4ec8a"}