Skip to main content

Grok Models

POST /v1/chat/completions
Grok text models use the OpenAI-compatible Chat Completions format. Point base_url to Crazyrouter and pass the Grok model ID in model.
Model availability depends on channel status, token permissions, and the live pricing configuration. Before production use, call GET /v1/models with the same API key and confirm that the target model is visible.

Common Models

ModelDescription
grok-4Main Grok 4 model
grok-4-fastGrok 4 fast variant
grok-4-fast-non-reasoningGrok 4 fast non-reasoning variant
grok-4-fast-reasoningGrok 4 fast reasoning variant
grok-4.1Grok 4.1
grok-4.1-fastGrok 4.1 fast
grok-4.1-thinkingGrok 4.1 thinking
grok-4.2Grok 4.2
grok-4-0709Dated Grok 4 model
Older grok-2 / grok-3 names may still appear in historical calls or compatibility setups, but the public pricing surface primarily keeps the grok-4* family. New integrations should start with grok-4, grok-4.1, grok-4.2, or the fast/reasoning variants.

Minimal Request

curl https://crazyrouter.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "grok-4",
    "messages": [
      {
        "role": "user",
        "content": "Reply with one short sentence: what is Grok?"
      }
    ],
    "temperature": 0.7,
    "max_tokens": 120
  }'

Streaming

Set stream: true to use SSE streaming.
curl https://crazyrouter.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "grok-4-fast",
    "stream": true,
    "messages": [
      {
        "role": "user",
        "content": "Write a concise API migration checklist."
      }
    ]
  }'

Reasoning Variants

For Grok models containing reasoning or thinking in the name, keep the request shape simple:
{
  "model": "grok-4-fast-reasoning",
  "messages": [
    {
      "role": "user",
      "content": "Compare two implementation options and explain the tradeoffs."
    }
  ],
  "max_tokens": 800
}
Reasoning fields, search fields, and experimental parameters can differ by upstream channel. For cross-channel stability, prefer standard OpenAI Chat fields: model, messages, temperature, top_p, max_tokens, and stream.
Grok image generation does not use Chat Completions. Use:
POST /v1/images/generations
See Grok Image Models for image parameters.