API · Models
Text
Grok 4.1 Fast
Grok 4.1 Fast is xAI's best tool-calling model with a 2M context window. It completes agentic tasks accurately and rapidly without extended thinking, excelling at complex real-world use cases such as customer support and finance.
Context 2M·Max out 30K
Quickstart
import { streamText } from 'ai';
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
const blackbox = createOpenAICompatible({
name: 'blackbox',
apiKey: process.env.BLACKBOX_API_KEY!,
baseURL: 'https://api.blackbox.ai/v1',
});
const result = streamText({
model: blackbox('blackboxai/x-ai/grok-4.1-fast-non-reasoning'),
prompt: 'Why is the sky blue?',
});
for await (const chunk of result.textStream) {
process.stdout.write(chunk);
}Specs & pricing
- Input $/M
- $0.20
- Output $/M
- $0.50
- Context window
- 2M
- Max output
- 30K
- Supported parameters
- tool-usevisionstreamingweb-search
Related models
| Model | Type | Context | Input $/M |
|---|---|---|---|
| Grok 4.3 | Text | 1M | $1.25 |
| Grok Build 0.1 | Text | 256K | $1 |
| Blackbox Pro | Text | 400K | $1.75 |
| Claude Opus 4.7 | Text | 1M | $5 |
| Claude Opus 4.6 | Text | 1M | $5 |