{"uid":"cap__JNdOAGWWbCQpOKvfKxXg","slug":"blockrun-ai-chat-completions-x402-6b913403","name":"Blockrun AI Chat Completions (x402)","description":"AI chat completions API - pay per request with USDC on Base","url":"https://blockrun-web-vbsbhh7lea-uc.a.run.app/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":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_zXCHuR_9Hj0Ca7_0L8nNI","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 AI chat completions via a pay-per-request API using USDC on Base, supporting multiple models like GPT-4o-mini and Claude Haiku.","exampleAgentPrompt":"Send a chat completion request using gpt-4o-mini with the message 'Explain quantum entanglement in simple terms', limiting the response to 300 tokens and using a temperature of 0.7.","exampleUseCases":[{"title":"On-demand LLM for agent reasoning","prompt":"I need you to call an AI chat model — use claude-haiku-4.5 — with the message 'Summarize the key risks of investing in small-cap stocks' and keep the response under 200 tokens."},{"title":"Dynamic content generation for app","prompt":"Generate a creative product description for 'EcoBreeze Bamboo Water Bottle' using gpt-4o-mini, with temperature set to 1.0 and max 150 tokens."},{"title":"Conversational assistant with history","prompt":"Continue this conversation with gpt-4o-mini: first message was 'What is machine learning?' and I replied 'Can you give me a real-world example?' — generate the AI's next response, max 250 tokens, temperature 0.5."}],"resultDescription":"Returns an AI-generated chat completion response conforming to the standard chat completions format, including the generated message content, role, finish reason, and token usage statistics.","failureModes":["Insufficient USDC balance causes payment failure and 402 response","Invalid or unsupported model ID returns an error","Malformed messages array (missing role or content) causes a 400 bad request","max_tokens set too low may result in truncated responses","Temperature out of range (0-2) may cause a validation error","Streaming not supported in all client contexts, leading to connection issues"],"whenToPreferThis":"Choose this endpoint when you need pay-per-request AI chat completions billed directly in USDC on Base via the x402 protocol, without managing API keys or subscriptions — ideal for agents that need metered, crypto-native LLM access supporting multiple models including GPT-4o-mini and Claude Haiku.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T00:34:46.278Z","isFirstParty":false,"canonicalSlug":"blockrun-ai-chat-completions-x402-6b913403"}