# Groq

> **You are on:** `https://beta-api.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API |
> |---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com |
> | Beta | beta.paywithlocus.com | beta-api.paywithlocus.com |
> | Stage | stage.paywithlocus.com | stage-api.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> 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.

**Category:** AI / LLM | **Website:** [groq.com](https://groq.com) | **Docs:** [console.groq.com/docs](https://console.groq.com/docs)

## Access Methods

| Method | Base URL | Auth |
|--------|----------|------|
| **MPP (Tempo)** | `https://groq.mpp.paywithlocus.com/groq/` | HTTP 402 auto-payment |
| **Wrapped API** | `https://beta-api.paywithlocus.com/api/wrapped/groq/` | `Authorization: Bearer <LOCUS_API_KEY>` |

**OpenAPI discovery:** `GET https://groq.mpp.paywithlocus.com/openapi.json`

## Endpoints

### Chat Completion

Create a chat completion with ultra-fast inference. Supports tool use, JSON mode, reasoning, web search, and document context. OpenAI-compatible format.

**Estimated cost:** $0.005 – $0.10 (varies by model and tokens)

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `model` | string | Yes | Model ID (e.g. "llama-3.3-70b-versatile", "deepseek-r1-distill-llama-70b") |
| `messages` | array | Yes | Conversation messages array |
| `max_completion_tokens` | number | No | Maximum output tokens |
| `temperature` | number | No | Sampling temperature (0-2) |
| `top_p` | number | No | Nucleus sampling (0-1) |
| `tools` | array | No | Tool/function definitions (max 128) |
| `tool_choice` | string/object | No | Tool selection: "auto", "none", "required", or specific function |
| `response_format` | object | No | Output format: json_object, json_schema, or text |
| `stop` | string/array | No | Stop sequences (up to 4) |
| `seed` | number | No | Seed for deterministic sampling |
| `reasoning_format` | string | No | Reasoning output: "hidden", "raw", or "parsed" |

```bash
curl -X POST https://groq.mpp.paywithlocus.com/groq/chat \
  -H "Content-Type: application/json" \
  -d '{"model":"<string>","messages":"<array>","max_completion_tokens":"<number>","temperature":"<number>","top_p":"<number>","tools":"<array>","tool_choice":"<string/object>","response_format":"<object>","stop":"<string/array>","seed":"<number>","reasoning_format":"<string>"}'
```

### List Models

List all available Groq models with their context window sizes and metadata.

**Estimated cost:** $0.005 fee only

_No parameters required._

```bash
curl -X POST https://groq.mpp.paywithlocus.com/groq/models \
  -H "Content-Type: application/json" \
  -d '{}'
```
