Skip to main content
Lesson 7 of 12 · Grok Reasoning Models

Responses API: The reasoning Object in Detail

Lesson 7 of 12 Updated July 28, 2026 Developer
On this page
  1. The reasoning Object in the Responses API
  2. Complete Structure of the reasoning Object
  3. Difference Between Summary and Encrypted Reasoning
  4. Common Combinations
  5. When to Omit the reasoning Object
  6. Key Takeaways

The reasoning Object in the Responses API

xAI’s Responses API offers fine-grained control over reasoning via the reasoning object. This parameter is available only on the Responses API (not on Chat Completions) and lets you configure three aspects of reasoning: effort, summary generation, and summary format.

Complete Structure of the reasoning Object

{
  "model": "grok-4.20-0309-reasoning",
  "input": "Your question here",
  "reasoning": {
    "effort": "medium",
    "generate_summary": true,
    "summary": "auto"
  }
}

effort

Controls the model’s depth of thought. Three possible values:

  • low : minimal thought, suited for simple tasks
  • medium : balance between depth and speed
  • high : maximum thought for complex problems

This parameter is the Responses API equivalent of reasoning_effort in Chat Completions, but with an additional medium value.

generate_summary

A boolean that indicates whether the model should produce a summary of its reasoning in addition to the final answer.

{
  "model": "grok-4.20-0309-reasoning",
  "input": "Compare the advantages of quicksort and mergesort.",
  "reasoning": {
    "effort": "high",
    "generate_summary": true
  }
}

When generate_summary is set to true, the response contains an additional element with a concise summary of the reasoning process. This summary is in plaintext (not encrypted), which distinguishes it from reasoning.encrypted_content.

summary

Controls the format of the generated summary. For now, the only documented value is "auto", which lets the model choose the most appropriate format.

{
  "reasoning": {
    "effort": "high",
    "generate_summary": true,
    "summary": "auto"
  }
}

Difference Between Summary and Encrypted Reasoning

These two mechanisms are complementary but distinct:

AspectSummary (generate_summary)Encrypted (include)
ReadabilityPlaintext, understandableEncrypted, opaque
Primary usageUser display, auditReuse in subsequent requests
Activationreasoning.generate_summary: trueinclude: ["reasoning.encrypted_content"]
DetailCondensed summaryFull reasoning
AvailabilityResponses API onlyResponses API only

You can enable both simultaneously to get both a readable summary and the full encrypted reasoning:

response = client.responses.create(
    model="grok-4.20-0309-reasoning",
    input="Demonstrate the infinitude of prime numbers.",
    reasoning={
        "effort": "high",
        "generate_summary": True,
        "summary": "auto"
    },
    include=["reasoning.encrypted_content"]
)

Common Combinations

Minimal Usage: Effort Only

{
  "reasoning": {
    "effort": "low"
  }
}

The model reasons with minimal effort. No summary, no encrypted reasoning returned.

Intermediate Usage: Effort + Summary

{
  "reasoning": {
    "effort": "medium",
    "generate_summary": true,
    "summary": "auto"
  }
}

The model reasons and provides a readable summary. Ideal for applications that want to show the thought process to the user.

Full Usage: Effort + Summary + Encrypted

{
  "reasoning": {
    "effort": "high",
    "generate_summary": true,
    "summary": "auto"
  },
  "include": ["reasoning.encrypted_content"]
}

Maximum configuration: deep reasoning, readable summary, and encrypted content for reuse. Reserve this for cases where you need everything.

When to Omit the reasoning Object

If you don’t need to control reasoning, you can simply omit the reasoning parameter. The model will use its default settings. This remains valid and the model will still reason (since grok-4.20-0309-reasoning is a reasoning model by nature).

Key Takeaways

  • The reasoning object is available only on the Responses API
  • effort controls depth (low, medium, high)
  • generate_summary produces a readable summary of reasoning (plaintext)
  • summary: "auto" lets the model choose the summary format
  • You can combine summary and encrypted reasoning in the same request
  • Omitting reasoning is valid: the model reasons with default settings