xAI's fast and cost-effective model with 2M token context window. Offers both reasoning and non-reasoning modes at significantly lower pricing than flagship models.
2.0M tokens
1
available
Cheapest
xAI
$0.70/1M tokens
xAI
Sorted by total cost (input + output per 1M tokens). Click a row to view provider details.
| Provider | Pricing (per 1M) | Rate Limits | Regions | Health | Latency |
|---|---|---|---|---|---|
In: $0.20Out: $0.50 | 500 RPM / 1.0M TPM | us-east-1global | Healthy | 0ms |
Use this model via xAI with an OpenAI-compatible SDK.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.xai.com/v1",
apiKey: process.env.XAI_API_KEY,
});
const response = await client.chat.completions.create({
model: "grok-4-1-fast-reasoning",
messages: [
{ role: "user", content: "Hello!" }
],
});
console.log(response.choices[0].message.content);Using xAI API • OpenAI-compatible SDK