{"uid":"cap_co0Xef1eS7gT0gjlAtCd0","slug":"x402-gateway-production-up-railway-app-f5e3f601","name":"Grok-4 Fast LLM via x402 Gateway","description":"xAI's fast model — 2M context window at very low cost, great for large document processing","url":"https://x402-gateway-production.up.railway.app/api/llm/grok-4-fast","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","bodyType","body","method"],"properties":{"body":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","example":"user"},"content":{"type":"string","example":"Hello"}},"additionalProperties":false},"example":[{"role":"user","content":"Hello"}],"minItems":1,"description":"Array of message objects with role and content"},"max_tokens":{"type":"number","default":1024,"example":1024,"description":"Maximum tokens to generate"}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004000","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.004000/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wF4BywYvxSWEIAzJvNzqc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs inference on xAI's Grok-4 Fast model with a 2M token context window, optimized for large document processing at low cost","exampleAgentPrompt":"Use Grok-4 Fast to summarize this 500-page legal contract — I need the key obligations, deadlines, and risk clauses highlighted in plain English.","exampleUseCases":[{"title":"Extract insights from research corpus","prompt":"I've got about 300 academic papers combined into one giant document — can you run them through Grok-4 Fast and pull out the key findings, methodologies, and any conflicting conclusions across the studies?"},{"title":"Summarize entire codebase for onboarding","prompt":"Take this massive codebase export and use Grok-4 Fast to generate a plain-English walkthrough of how the system works, what each major module does, and where the main entry points are — I need this ready for new engineers joining next week."},{"title":"Analyze lengthy financial audit report","prompt":"I have a 400-page financial audit report I need processed quickly and cheaply — use Grok-4 Fast to flag any anomalies, summarize the key findings by department, and call out anything that looks like it needs urgent attention."}],"resultDescription":"A text completion or chat response generated by xAI's Grok-4 Fast model, supporting up to 2 million tokens of context, returned as a JSON payload with the model's output text.","failureModes":["Prompt exceeds 2M token context window — request rejected with context length error","Invalid or missing API credentials — 401 unauthorized","Payment failure via x402 protocol — 402 payment required","Model overload or rate limit — 429 too many requests","Malformed request body — 400 bad request"],"whenToPreferThis":"Choose this endpoint when you need to process very large documents (up to 2M tokens) at low cost, and speed matters more than maximum capability. Ideal for summarization, extraction, or reasoning over long-context inputs where Grok-4 Fast's cost-performance tradeoff is favorable over premium models like GPT-4o or Claude Opus.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:43:29.119Z","isFirstParty":false}