RedPill
x-ai logo

xAI: Grok 4

Chat
x-ai/grok-4
Created Dec 13, 2025|256K context|$3.00/M input tokens|$15.00/M output tokens
Intel TDX

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 to the best providers that are able to handle your prompt size and parameters, with fallbacks to maximize uptime.

x-ai logo
x-ai
Input Price
$3.00
Output Price
$15.00
Total Context
256K

API

RedPill provides an OpenAI-compatible 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?"
      }
    ]
  })
})