Skip to main content

Maximum
xai/grok-4.20-reasoning/chat

xAI Grok 4.20 Reasoning chat endpoint: 2,000,000-token context window, image_url vision input, always-on reasoning (low to xhigh), tool calling, and 200K tiered token billing.

Input $1.1125Output $2.225per 1 million tokensCached input $0.178Prompts over 200K tokensInput $2.225Cached input $0.356Output $4.45

Workbench

These examples were written for this endpoint. Replace the prompt and sample media URLs with your own accessible inputs, then check the current quote and model availability before submitting.

  • Input types
    Text
    Output types
    Text
    Input
    $1.1125 / 1 million tokens
    Cached input
    $0.178 / 1 million tokens
    Output
    $2.225 / 1 million tokens
    Context
    2M
    Max output
    2M

    $1.11/2.23per 1 million tokens · input / output

    basic

    Example single-turn request for Grok 4.20 Reasoning showing the standard chat messages payload and max_tokens setting.

    • 1024
    Use this example
  • Input types
    Text
    Output types
    Text
    Input
    $1.1125 / 1 million tokens
    Cached input
    $0.178 / 1 million tokens
    Output
    $2.225 / 1 million tokens
    Context
    2M
    Max output
    2M

    $1.11/2.23per 1 million tokens · input / output

    tool-step

    Example tool-calling request for Grok 4.20 Reasoning with a JSON-schema function definition and tool_choice set to auto.

    • 1024
    • auto
    Use this example

This example starts at Input $1.1125 / Output $2.225 per 1 million tokens. The Playground updates the estimate when you change the settings.