spacexaiCertifiedReleased 03/10/2026

Grok 4.20 Reasoning

View API reference ↓
Input / output priceFrom$1.25 / $2.50per 1M
24h uptime—
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.inferencebureau.com/v1",
  apiKey: process.env.IB_API_KEY,
});

const res = await client.chat.completions.create({
  model: "spacexai/grok-4.20-reasoning",
  messages: [{ role: "user", content: "Why is the sky blue?" }],
});

console.log(res.choices[0].message.content);

Providers

Dispatch routes requests across these providers and fails over between them without changing the model. Restrict or order providers with team Directives. Prices are gateway list prices before the platform fee.

ProviderContextMax outputLatencyThroughputInputOutputCacheCapabilitiesZDRNo trainingRegionsStatus
Google Vertex AI2M2M——$2.00$6.00Read $0.20Write —7 featuresYesYesGlobalCertified
xAI2M2M——$1.25$2.50Read $0.20Write —7 featuresYesYesGlobalCertified

Uptime

24 hours

Request success rate per provider.

Google Vertex AI—
xAI—

Getting started

Create a key on the API Keys page and set it as IB_API_KEY. See the quickstart.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.inferencebureau.com/v1",
  apiKey: process.env.IB_API_KEY,
});

const res = await client.chat.completions.create({
  model: "spacexai/grok-4.20-reasoning",
  messages: [{ role: "user", content: "Why is the sky blue?" }],
});

console.log(res.choices[0].message.content);

Top-level parameters

Standard Chat Completions parameters work as documented. These have model-specific behavior.

ParameterTypeRequiredDescription
modelstringYesModel ID in the form creator/model, e.g. spacexai/grok-4.20-reasoning. Must be allowed by your team's Directives.
max_tokensnumberNoHard cap on generated tokens, and the basis for the balance reserved per request. Grok 4.20 Reasoning supports up to 2,000,000 output tokens.
reasoning{ effort: 'low' | 'medium' | 'high' }NoReasoning effort, mapped to the provider's native configuration. Reasoning tokens count toward output usage.
toolsTool[]NoFunction definitions the model can call. Tool calls are returned in choices[].message.tool_calls.
Supportedmax_tokenstemperaturestoptoolstool_choicereasoninginclude_reasoningresponse_formatstructured_outputs

Input limits

InputSourcesLimits
Text—Prompt and response share the 2M-token context window
ImageURL, base64Sent as image_url content parts; counts as input tokens
PDFURL, base64Sent as file content parts; counts as input tokens

More models by spacexai

ModelContextInputOutputCacheRelease
spacexai/grok-4.7500K$2.00$6.00Read $0.50Write —09/21/2026
spacexai/grok-4.6500K$2.00$6.00Read $0.50Write —08/12/2026
spacexai/grok-4.5500K$2.00$6.00Read $0.30Write —07/08/2026
spacexai/grok-build-0.1256K$1.00$2.00Read $0.20Write —05/20/2026
spacexai/grok-4.31M$1.25$2.50Read $0.20Write —04/30/2026
spacexai/grok-4.3-batch1M$1.00$2.00Read $0.16Write —04/30/2026
spacexai/grok-4.20-multi-agent-beta2M$1.25$2.50Read $0.20Write —03/11/2026
spacexai/grok-4.20-non-reasoning-beta2M$1.25$2.50Read $0.20Write —03/11/2026
spacexai/grok-4.20-reasoning-beta2M$1.25$2.50Read $0.20Write —03/11/2026
spacexai/grok-4.20-multi-agent2M$1.25$2.50Read $0.20Write —03/10/2026