Loading...
    • Developer Guide
    • API Reference
    • MCP
    • Resources
    • Release Notes
    Search...
    ⌘K
    Using the API
    Features overviewClient SDKsBeta headersErrors
    Messages
    Create a Message
    Count tokens in a Message
    Models
    List Models
    Get a Model
    Beta
    Admin
    Completions
    Create a Text Completion
    Support & configuration
    Rate limitsService tiersVersionsIP addressesSupported regionsOpenAI SDK compatibility
    Console
    Log in
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Solutions

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

    Partners

    • Amazon Bedrock
    • Google Cloud's Vertex AI

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • 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

    Learn

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

    Help and security

    • Availability
    • Status
    • Support
    • Discord

    Terms and policies

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

    Versions

    When making API requests, you must send an anthropic-version request header. For example, anthropic-version: 2023-06-01. If you are using our client SDKs, this is handled for you automatically.

    For any given API version, we will preserve:

    • Existing input parameters
    • Existing output parameters

    However, we may do the following:

    • Add additional optional inputs
    • Add additional values to the output
    • Change conditions for specific error types
    • Add new variants to enum-like output values (for example, streaming event types)

    Generally, if you are using the API as documented in this reference, we will not break your usage.

    Version history

    We always recommend using the latest API version whenever possible. Previous versions are considered deprecated and may be unavailable for new users.

    • 2023-06-01
      • New format for streaming server-sent events (SSE):
        • Completions are incremental. For example, " Hello", " my", " name", " is", " Claude." instead of " Hello", " Hello my", " Hello my name", " Hello my name is", " Hello my name is Claude.".
        • All events are named events, rather than data-only events.
        • Removed unnecessary data: [DONE] event.
      • Removed legacy exception and truncated values in responses.
    • 2023-01-01: Initial release.
    • Version history