Loading...
    • Developer Guide
    • API Reference
    • MCP
    • Resources
    • Release Notes
    Search...
    ⌘K

    First steps

    Intro to ClaudeQuickstart

    Models & pricing

    Models overviewChoosing a modelWhat's new in Claude 4.5Migrating to Claude 4.5Model deprecationsPricing

    Build with Claude

    Features overviewUsing the Messages APIContext windowsPrompting best practices

    Capabilities

    Prompt cachingContext editingExtended thinkingStreaming MessagesBatch processingCitationsMultilingual supportToken countingEmbeddingsVisionPDF supportFiles APISearch resultsGoogle Sheets add-on

    Tools

    OverviewHow to implement tool useToken-efficient tool useFine-grained tool streamingBash toolCode execution toolComputer use toolText editor toolWeb fetch toolWeb search toolMemory tool

    Agent Skills

    OverviewQuickstartBest practicesUsing Skills with the API

    Agent SDK

    OverviewTypeScript SDKPython SDK

    Guides

    Streaming InputHandling PermissionsSession ManagementHosting the Agent SDKModifying system promptsMCP in the SDKCustom ToolsSubagents in the SDKSlash Commands in the SDKAgent Skills in the SDKTracking Costs and UsageTodo ListsPlugins in the SDK

    MCP in the API

    MCP connectorRemote MCP servers

    Claude on 3rd-party platforms

    Amazon BedrockVertex AI

    Prompt engineering

    OverviewPrompt generatorUse prompt templatesPrompt improverBe clear and directUse examples (multishot prompting)Let Claude think (CoT)Use XML tagsGive Claude a role (system prompts)Prefill Claude's responseChain complex promptsLong context tipsExtended thinking tips

    Test & evaluate

    Define success criteriaDevelop test casesUsing the Evaluation ToolReducing latency

    Strengthen guardrails

    Reduce hallucinationsIncrease output consistencyMitigate jailbreaksStreaming refusalsReduce prompt leakKeep Claude in character

    Administration and monitoring

    Admin API overviewUsage and Cost APIClaude Code Analytics API
    Console
    Documentation

    Extended thinking models

    All Opus and Sonnet models released after Claude Sonnet 3.7 support both standard and extended thinking modes. In standard mode, these models operate similarly to previous Claude models. In extended thinking mode, Claude will output its thinking before outputting its response, allowing you insight into its reasoning process.

    Extended thinking overview

    Extended thinking models operate in two modes:

    • Standard mode: Similar to previous Claude models, providing direct responses without showing internal reasoning
    • Extended thinking mode: Shows Claude's reasoning process before delivering the final answer

    When to use standard mode

    Standard mode works well for most general use cases, including:

    • General content generation
    • Basic coding assistance
    • Routine agentic tasks
    • Computer use guidance
    • Most conversational applications

    When to use extended thinking mode

    Extended thinking mode excels in these key areas:

    • Complex analysis: Financial, legal, or data analysis involving multiple parameters and factors
    • Advanced STEM problems: Mathematics, physics, research & development
    • Long context handling: Processing and synthesizing information from extensive inputs
    • Constraint optimization: Problems with multiple competing requirements
    • Detailed data generation: Creating comprehensive tables or structured information sets
    • Complex instruction following: Chatbots with intricate system prompts and many factors to consider
    • Structured creative tasks: Creative writing requiring detailed planning, outlines, or managing multiple narrative elements

    To learn more about how extended thinking works, see Extended thinking.


    Getting started with extended thinking models

    If you are trying extended thinking for the first time, here are some tips:

    1. Start with standard mode: Begin by using your chosen Opus or Sonnet model without extended thinking to establish a baseline performance
    2. Identify improvement opportunities: Try turning on extended thinking mode at a low budget to see if your use case would benefit from deeper reasoning. It might be the case that your use case would benefit more from more detailed prompting in standard mode rather than extended thinking from Claude.
    3. Gradual implementation: If needed, incrementally increase the thinking budget while testing performance against your requirements.
    4. Optimize token usage: Once you reach acceptable performance, set appropriate token limits to manage costs.
    5. Explore new possibilities: Our latest Opus and Sonnet models, with and without extended thinking, are more capable than previous Claude models in a variety of domains. We encourage you to try these models for use cases where you previously experienced limitations with other models.

    Building with extended thinking models

    General model information

    For pricing, context window size, and other information on all current Claude models with extended thinking support, see All models overview.

    Max tokens and context window changes with extended thinking models

    In older Claude models (prior to extended thinking models), if the sum of prompt tokens and max_tokens exceeded the model's context window, the system would automatically adjust max_tokens to fit within the context limit. This meant you could set a large max_tokens value and the system would silently reduce it as needed.

    With extended thinking models, max_tokens (which includes your thinking budget when thinking is enabled) is enforced as a strict limit. The system will now return a validation error if prompt tokens + max_tokens exceeds the context window size.

    Migrating to extended thinking models from older models

    If you are transferring prompts from another model, whether another Claude model or from another model provider, here are some tips:

    Standard mode migration

    • Simplify your prompts: Extended thinking models require less steering. Remove any model-specific guidance language you've used with previous versions, such as language around handling verbosity - such language is likely unnecessary and will save tokens and reduce costs.

    Otherwise, generally no prompt changes are needed if you're using these models with extended thinking turned off. If you encounter issues, apply general prompt engineering best practices.

    Extended thinking mode migration

    When using extended thinking, start by removing all chain-of-thought (CoT) guidance from your prompts. Extended thinking models are designed to work effectively without explicit reasoning instructions.

    • Instead of prescribing thinking patterns, observe Claude's natural thinking process first, then adjust your prompts based on what you see.
    • If you then want to provide thinking guidance, you can include guidance in natural language in your prompt and Claude will be able to generalize such instructions into its own thinking.
    • For more tips on how to prompt for extended thinking, see Extended thinking tips.

    Migrating from other model providers

    Claude's extended thinking models may respond differently to prompting patterns optimized for other providers' models. We recommend focusing on clear, direct instructions rather than provider-specific prompting techniques. Removing such instructions tailored for specific model providers may lead to better performance, as Claude is generally good at complex instruction following out of the box.

    You can use our optimized prompt improver at console.anthropic.com for assistance with migrating prompts.


    Next steps

    Try the extended thinking cookbook

    Explore practical examples of thinking in our cookbook.

    Extended thinking documentation

    Learn more about how extended thinking works and how to implement it alongside other features such as tool use and prompt caching.

    • Extended thinking overview
    • When to use standard mode
    • When to use extended thinking mode
    • Getting started with extended thinking models
    • Building with extended thinking models
    • General model information
    • Max tokens and context window changes with extended thinking models
    • Migrating to extended thinking models from older models
    • Standard mode migration
    • Extended thinking mode migration
    • Migrating from other model providers
    • Next steps
    © 2025 ANTHROPIC PBC

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    © 2025 ANTHROPIC PBC