{"uid":"cap_iloy7ot7w0aGubDhoAr5i","slug":"groq-via-locus-x402-chat-completions-b54b450e","name":"Groq via Locus x402 — Chat Completions","description":"Ultra-fast LLM inference — Llama 3.3, DeepSeek R1, Gemma 2, GPT-OSS, Qwen, Whisper, and PlayAI TTS. OpenAI-compatible API with industry-leading speed.","url":"https://groq.x402.paywithlocus.com/groq/chat?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"seed":{"type":"number"},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{}}]},"model":{"type":"string"},"tools":{"type":"array","items":{}},"top_p":{"type":"number"},"messages":{"type":"array","items":{"type":"object","required":["role"],"properties":{"name":{"type":"string"},"role":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","required":["type"],"properties":{"text":{"type":"string"},"type":{"type":"string"},"image_url":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}},{"type":"null"}]},"tool_calls":{"type":"array","items":{"type":"object","additionalProperties":true}},"tool_call_id":{"type":"string"}},"additionalProperties":true}},"temperature":{"type":"number"},"tool_choice":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":true}]},"response_format":{"type":"object","additionalProperties":true},"reasoning_format":{"type":"string"},"max_completion_tokens":{"type":"number"}}},"responseSchema":{"type":"json","example":{"data":{},"payment":{"scheme":"exact","settledUsdc":"0.001000","authorizedMaxUsdc":"0.001000"},"request":{"id":"00000000-0000-4000-8000-000000000000","statusUrl":"/requests/00000000-0000-4000-8000-000000000000"},"success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rLyonJTydfWBtNbzFNpIl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Send OpenAI-compatible chat completion requests to ultra-fast Groq-hosted LLMs (Llama, GPT-OSS, Qwen, DeepSeek, Gemma) with per-call USDC micropayment via x402","exampleAgentPrompt":"Using Groq's ultra-fast inference, send this conversation to Llama 3.3 — messages: [{\"role\":\"user\",\"content\":\"Summarize the main benefits of quantum computing in 3 bullet points\"}] — with temperature 0.7 and a max of 512 output tokens, and pay the per-call fee automatically.","exampleUseCases":[{"title":"Real-time agent reasoning loop","prompt":"I need you to run this multi-turn conversation through Llama 3.3 on Groq — it's time-sensitive, so I need the fastest inference possible. Here are the messages: [{\"role\":\"system\",\"content\":\"You are a helpful assistant.\"},{\"role\":\"user\",\"content\":\"What are three key risks in launching a SaaS product?\"}]. Use temperature 0.5 and cap the output at 300 tokens."},{"title":"Structured JSON extraction from text","prompt":"Send this prompt to GPT-OSS 20B on Groq and tell it to return a JSON object with fields 'name', 'date', and 'amount' extracted from the text: 'Invoice from Acme Corp dated March 14 2025 for $4,200.' Set response_format to json_object and max tokens to 200."},{"title":"DeepSeek R1 multi-step reasoning with trace","prompt":"I want to use DeepSeek R1 on Groq to solve this logic puzzle step by step: 'If all Bloops are Razzies and all Razzies are Lazzies, are all Bloops definitely Lazzies?' Return the full reasoning trace in raw format with max 1024 completion tokens."}],"resultDescription":"Returns a JSON object with a 'data' field containing the OpenAI-compatible chat completion (including the assistant message, finish reason, and usage stats), a 'payment' object showing settled and authorized USDC amounts, a 'request' object with a UUID and status URL, and a 'success' boolean.","failureModes":["Insufficient USDC authorization — x402 payment header missing or amount below required $0.005","max_completion_tokens not specified — required by x402 to set a hard ceiling on the signed authorization","Invalid model ID — model not available on this public metered endpoint","Messages array empty or malformed — API returns 400 bad request","Token limit exceeded — response truncated or error if max_completion_tokens too low for the task","Rate limiting — Groq upstream throttle returns 429","Network timeout — real-time inference request exceeds gateway timeout"],"whenToPreferThis":"Choose this endpoint when you need the lowest-latency LLM inference available (Groq is industry-leading for tokens/sec), want OpenAI-compatible chat completions without a monthly subscription, need to pay per-call in USDC via x402 micropayments, or want access to open-source frontier models like Llama 3.3, GPT-OSS 120B, Qwen, or DeepSeek R1 without managing API keys. Prefer over standard OpenAI when speed is critical or when your agent runtime uses x402 payment rails.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T06:38:11.412Z","isFirstParty":false,"canonicalSlug":"groq-via-locus-x402-chat-completions-b54b450e"}