Key capabilities
- OpenAI-compatible — Works as a drop-in replacement with the OpenAI SDK
- Streaming — Supports real-time token streaming via SSE
- Strong reasoning — Designed for complex, multi-step tasks
Quick example
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Must be grok-4-1-fast-non-reasoning |
messages | array | Yes | List of { role, content } objects |
max_tokens | integer | No | Maximum tokens to generate |
temperature | float | No | 0–2. Controls randomness. Default: 1 |
stream | boolean | No | Enable SSE streaming. Default: false |
top_p | float | No | Nucleus sampling threshold |
API Reference
View the interactive API playground for Grok 4.1 Fast Non-Reasoning.