{"openapi":"3.1.0","info":{"title":"Groq via Locus x402","version":"1.0.0","description":"Ultra-fast LLM inference — GPT-OSS, Qwen, Llama, and Groq Compound systems with an OpenAI-compatible API.","contact":{"email":"api@paywithlocus.com"},"x-guidance":"Use the documented POST operations for Groq. Send JSON matching each requestBody schema. Unpaid public x402 requests return an x402 v2 payment challenge; retry the same body with PAYMENT-SIGNATURE and the returned x-locus-request-id."},"servers":[{"url":"https://groq.x402.stage.paywithlocus.com"}],"x-agentcash-guidance":{"llmsTxtUrl":"https://stage.paywithlocus.com/x402/groq.md"},"x-service-info":{"categories":["ai"],"docs":{"homepage":"https://groq.com","apiReference":"https://console.groq.com/docs","llms":"https://stage.paywithlocus.com/x402/groq.md"}},"paths":{"/groq/chat":{"post":{"operationId":"groq_chat","summary":"Chat Completion","description":"Create a chat completion with ultra-fast inference. Supports tool use, JSON mode, reasoning, web search, and document context. OpenAI-compatible format.","tags":["AI / LLM"],"security":[],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.005000","max":"0.100000"},"protocols":[{"x402":{}}],"x-locus":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","scheme":"upto","pricing":"metered","authorization":"maximum","settlement":"actual-usage","pricingVersion":"groq-2026-08-04-v2","estimatedCost":"$0.005 – $0.10 (varies by model and tokens)"}},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model or system ID. Public metered x402 supports Llama 3.1/3.3, GPT-OSS 20B/120B, Llama 4 Scout, and Qwen 3.6 27B."},"messages":{"description":"Conversation messages array","type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"image_url":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":true}},"required":["type"],"additionalProperties":true}},{"type":"null"}]},"name":{"type":"string"},"tool_call_id":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["role"],"additionalProperties":true}},"max_completion_tokens":{"type":"number","description":"Maximum output tokens. Required for x402 so the signed authorization has a hard ceiling."},"temperature":{"type":"number","description":"Sampling temperature (0-2)"},"top_p":{"type":"number","description":"Nucleus sampling (0-1)"},"tools":{"type":"array","items":{},"description":"Tool/function definitions (max 128)"},"tool_choice":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":true}],"description":"Tool selection: \"auto\", \"none\", \"required\", or specific function"},"response_format":{"type":"object","additionalProperties":true,"description":"Output format: json_object, json_schema, or text"},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{}}],"description":"Stop sequences (up to 4)"},"seed":{"type":"number","description":"Seed for deterministic sampling"},"reasoning_format":{"type":"string","description":"Reasoning output: \"hidden\", \"raw\", or \"parsed\""}},"required":["model","messages","max_completion_tokens"],"additionalProperties":true},"example":{"model":"openai/gpt-oss-20b","messages":[{"role":"user","content":"Reply with exactly the word PONG."}],"max_completion_tokens":128}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":true,"properties":{"choices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"message":{"type":"object","additionalProperties":true,"properties":{"content":{"type":"string"}}}}}}},"description":"Partial response schema observed in an authenticated, semantically verified customer call. Only observed field types are described; optionality, other inputs and error states are not inferred."},"request":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"statusUrl":{"type":"string"}},"required":["id","statusUrl"],"additionalProperties":false},"payment":{"type":"object","properties":{"scheme":{"type":"string","enum":["exact","upto"]},"authorizedMaxUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"settledUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"capExhausted":{"type":"boolean"},"calculatedActualUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"usage":{}},"required":["scheme","authorizedMaxUsdc","settledUsdc"],"additionalProperties":false}},"required":["success","data","request","payment"],"additionalProperties":false}}}},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/groq/models":{"post":{"operationId":"groq_models","summary":"List Models","description":"List all available Groq models with their context window sizes and metadata.","tags":["AI / LLM"],"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}],"x-locus":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","scheme":"exact","estimatedCost":"$0.005 fee only"}},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true},"example":{}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":true,"properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}}},"description":"Partial response schema observed in an authenticated, semantically verified customer call. Only observed field types are described; optionality, other inputs and error states are not inferred."},"request":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"statusUrl":{"type":"string"}},"required":["id","statusUrl"],"additionalProperties":false},"payment":{"type":"object","properties":{"scheme":{"type":"string","enum":["exact","upto"]},"authorizedMaxUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"settledUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"capExhausted":{"type":"boolean"},"calculatedActualUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"usage":{}},"required":["scheme","authorizedMaxUsdc","settledUsdc"],"additionalProperties":false}},"required":["success","data","request","payment"],"additionalProperties":false}}}},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}}}}