- Model
xai/grok-4.1-fast-reasoning- Provider
vercel-ai-gateway- API
anthropic-messages- Base URL
https://ai-gateway.vercel.sh- 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": {
"vercel-ai-gateway": {
"apiKey": "YOUR_API_KEY",
"models": [
{
"id": "xai/grok-4.1-fast-reasoning",
"name": "Grok 4.1 Fast Reasoning",
"reasoning": true,
"input": [
"text",
"image"
],
"contextWindow": 2000000,
"maxTokens": 30000,
"cost": {
"input": 0.19999999999999998,
"output": 0.5,
"cacheRead": 0.049999999999999996,
"cacheWrite": 0
}
}
],
"api": "anthropic-messages",
"baseUrl": "https://ai-gateway.vercel.sh"
}
}
}