xAI: Grok 4
Grok 4 is xAI's latest reasoning model with a 256k context window. It supports parallel tool calling, structured outputs, and both image and text inputs. Note that reasoning is not exposed, reasoning cannot be disabled, and the reasoning effort cannot be specified. Pricing increases once the total tokens in a given request is greater than 128k tokens. See more details on the xAI docs
Providers for xAI: Grok 4
RedPill routes requests across these providers with automatic fallbacks to maximize uptime. Pricing is unified — you pay the same price no matter which provider serves your request.
| Provider | TTFT | Throughput | Uptime |
|---|---|---|---|
API
RedPill provides a unified completion API to all models & providers that you can call directly, or using the OpenAI SDK. Additionally, some third-party SDKs are available.
fetch("https://api.redpill.ai/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR-REDPILL-API-KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "x-ai/grok-4",
"messages": [
{
"role": "user",
"content": "What is the meaning of life?"
}
]
})
})The confidential AI cloud: verifiable inference with attestation reports, signed receipts, audit sessions, and E2EE paths.