# Grok Chat Completions

> Grok Chat Completions is a paid API for AI agents from Grok at grok.mpp.paywithlocus.com, paid per call via MPP, Model-dependent (~$0.001–$0.02) (dynamic), status unknown (last checked 2026-10-10).

Sends a conversation to xAI's Grok models and returns a text (or multimodal) completion, supporting grok-3, grok-3-mini, grok-4, and code-focused variants

## Facts

- Endpoint: POST https://grok.mpp.paywithlocus.com/grok/chat?utm_source=zero.xyz
- Price: Model-dependent (~$0.001–$0.02) (dynamic)
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Provider: Grok
- Docs: https://docs.x.ai
- Website: https://x.ai
- Tags: llm, chat, x-search, web-search, image-generation, tts, ai
- Canonical page: https://www.zero.xyz/c/grok-chat-7aad051d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SgKpqaRrWRrNRORc4_2z2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability grok-chat-7aad051d -d '<json body>'
```

Example prompt: Ask Grok-4 to explain the tradeoffs between relational and document databases in three concise paragraphs, using a slightly creative tone with temperature 0.8 and a max of 500 tokens.

## When to prefer this

Choose this endpoint when you need a standard OpenAI-compatible chat completion interface backed by xAI's Grok model family (grok-3, grok-3-mini, grok-4, grok-code-fast-1). Prefer it over other Grok endpoints when you don't specifically need web search, X/Twitter search, image generation, image editing, code execution sandboxing, or TTS — those specialized capabilities have dedicated sibling endpoints. Use this for general-purpose LLM tasks: Q&A, summarization, reasoning, code help, and multi-turn conversations.

## Known failure modes

- Invalid or unsupported model ID returns a 400 or model-not-found error
- Missing required 'messages' field returns a validation error
- Temperature or top_p outside allowed range causes a parameter error
- Exceeding max_tokens limit or context window size truncates or errors the response
- Payment failure or insufficient USDC balance blocks the request
- Malformed message role (not system/user/assistant) causes a schema error
- Image URL unreachable or unsupported format in multimodal input causes a content error

## How this service works

Generate text with Grok models. OpenAI-compatible format with support for text, vision, and function calling.

## Output

Returns an assistant message object containing the generated text response from the selected Grok model, reflecting the conversation context, sampling parameters, and any multimodal inputs provided.

## Example request

```json
{
 "model": "grok-3-mini",
 "messages": [
  {
   "role": "user",
   "content": "Explain the concept of machine learning in simple terms."
  }
 ],
 "max_tokens": 300,
 "temperature": 0.7
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "model",
  "messages",
  "max_tokens"
 ],
 "properties": {
  "n": {
   "type": "number",
   "description": "Number of completions to generate (default 1)"
  },
  "stop": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "array",
     "items": {
      "type": "string"
     }
    }
   ],
   "description": "Stop sequences"
  },
  "model": {
   "type": "string",
   "description": "Metered x402 model ID: 'grok-4.6', 'grok-4.5', 'grok-4.5-latest', 'grok-4.3', 'grok-4.20-0309-reasoning', or 'grok-4.20-0309-non-reasoning'. Multi-agent is excluded because xAI does not support an output-token cap for it."
  },
  "top_p": {
   "type": "number",
   "description": "Nucleus sampling threshold (0.0–1.0)"
  },
  "stream": {
   "type": "boolean",
   "description": "Stream partial results as SSE (text/event-stream). Recommended for reasoning models that exceed the edge buffered-response timeout."
  },
  "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
   },
   "description": "Conversation messages. Each: { role: \"system\"|\"user\"|\"assistant\", content: \"text\" } or multimodal: { role: \"user\", content: [{ type: \"text\", text: \"...\" }, { type: \"image_url\", image_url: { url: \"...\" } }] }"
  },
  "max_tokens": {
   "type": "number",
   "description": "Maximum output tokens. R
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/grok-chat-7aad051d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from grok.mpp.paywithlocus.com](https://www.zero.xyz/host/grok.mpp.paywithlocus.com/llms.txt)
