xAI: Grok 4.1 Fast

Model details

xAI: Grok 4.1 Fast

Model
x-ai/grok-4.1-fast
Provider
openrouter
API
openai-completions
Base URL
https://openrouter.ai/api/v1
Input
text, image
Reasoning
Yes
Context window
2,000,000
Max tokens
30,000
Cost / million input
$0.2
Cost / million output
$0.5
Cost / million cache read
$0.05
Cost / million cache write
$0
Model config JSON
{
  "providers": {
    "openrouter": {
      "apiKey": "YOUR_API_KEY",
      "models": [
        {
          "id": "x-ai/grok-4.1-fast",
          "name": "xAI: Grok 4.1 Fast",
          "reasoning": true,
          "input": [
            "text",
            "image"
          ],
          "contextWindow": 2000000,
          "maxTokens": 30000,
          "cost": {
            "input": 0.19999999999999998,
            "output": 0.5,
            "cacheRead": 0.049999999999999996,
            "cacheWrite": 0
          }
        }
      ],
      "api": "openai-completions",
      "baseUrl": "https://openrouter.ai/api/v1"
    }
  }
}