{"uid":"cap_4G5S629mbJBWewMcbrGj1","slug":"x402-hub-xai-query-endpoint-d365891f","name":"X402 Hub – xAI Query Endpoint","description":"63 paid API endpoints protected by x402 micropayments on Base","url":"https://x402-hub.vercel.app/api/xai?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Query parameter for the API"}}},"responseSchema":{"type":"object","properties":{"data":{"type":"object","description":"Response data from upstream API"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.125","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.125/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.125","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.125","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_3C2pBqhIOIhYDMoAnm_CD","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.125","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Sends a natural language query to xAI (Grok) via a micropayment-gated proxy, returning AI-generated responses for $0.125 USDC per call","exampleAgentPrompt":"Ask xAI Grok this question and charge my wallet: 'What are the key differences between transformer and state space models in 2025?'","exampleUseCases":[{"title":"On-demand AI research assistant","prompt":"Use the xAI Grok endpoint to answer this for me: 'Summarize the most significant breakthroughs in protein folding research over the last two years.'"},{"title":"Pay-per-query AI coding help","prompt":"Send this to xAI Grok and give me the answer: 'Write a Python function that parses nested JSON and flattens it into a single-level dictionary with dot-notation keys.'"},{"title":"Agent fact-checking via Grok","prompt":"Query xAI with this question: 'Is it true that the James Webb Space Telescope can directly image Earth-like exoplanet atmospheres, and what has it found so far?'"}],"resultDescription":"Returns a structured JSON object with a 'data' field containing the xAI/Grok model's response to the submitted query, including generated text or inference output.","failureModes":["Payment failure if wallet has insufficient USDC balance — returns 402 Payment Required","Invalid or missing 'query' field returns a 400 Bad Request","xAI upstream API outage or rate limit may return 502 or 503","Malformed query string may return empty or low-quality response data","Network timeout from upstream xAI latency"],"whenToPreferThis":"Choose this endpoint when you need pay-per-call access to xAI's Grok model without a subscription, especially in agentic workflows that require on-demand AI inference billed in USDC micropayments via the x402 protocol. Prefer this over subscription-based xAI API access when cost-per-query is more efficient than flat monthly pricing, or when your agent needs to dynamically access multiple AI providers and wants unified x402 payment semantics.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T18:45:45.936Z","isFirstParty":false,"canonicalSlug":"x402-hub-xai-query-endpoint-d365891f"}