anthropic

claude-sonnet-4

completions

Our high-performance model with exceptional reasoning and efficiency

Input:$3 / 1M tokens$0.3 / 1M tokenscached read$3.75 / 1M tokenscached write
Output:$15 / 1M tokens
Context:200K tokens
tools
text
image
text
Category Rankings
academia#12
programming#16
science#6
vision#9

Access claude-sonnet-4 through LangDB AI Gateway

Recommended

Integrate with anthropic's claude-sonnet-4 and 250+ other models through a unified API. Monitor usage, control costs, and enhance security.

Unified API
Cost Optimization
Enterprise Security
Get Started Now

Free tier available • No credit card required

Instant Setup
99.9% Uptime
10,000+Monthly Requests
Code Example
Configuration
Base URL
API Keys
Headers
Project ID in header
X-Run-Id
X-Thread-Id
Model Parameters
6 available
include_reasoning
max_tokens
stop
temperature
012
tool_choice
tools
Additional Configuration
Tools
Guards
User:
Id:
Name:
Tags:
Publicly Shared Threads5
  • anthropic
    Detailed 3-step weighing strategy to find the single lighter counterfeit coin among 12 identical coins using balance scales with three weighings.
    12 coin problem
    counterfeit coin detection
    balance scale strategy
    3 weighings solution
  • anthropic
    A complete Python Flask To-Do list API with CRUD endpoints, in-memory storage, input validation, error handling, and example usage instructions.
    python flask todo api
    restful todo list api
    in-memory todo api
    flask api error handling
  • anthropic
    Created a responsive nav bar with a hamburger menu that toggles links on screens under 600px using HTML, CSS, and vanilla JS.
    responsive navigation bar
    hamburger menu css
    mobile navigation toggle
    vanilla javascript navbar
  • anthropic
    Solved ages of siblings Emily and Derek using algebra: Emily is 16 and Derek is 8, verified with given age conditions.
    age algebra problem
    sibling age word problem
    current and past ages
    solving system of equations
  • anthropic
    Defines "ubiquitous" as an adjective meaning present everywhere, exemplified by a sentence about smartphones being found in nearly all public spaces.
    ubiquitous definition
    ubiquitous example sentence
    meaning of ubiquitous
    ubiquitous usage
Popular Models10
  • openai
    GPT-4.1 nano is the fastest, most cost-effective GPT-4.1 model.
    Input:$0.1 / 1M tokens
    Output:$0.4 / 1M tokens
    Context:1047576 tokens
    tools
    text
    image
    text
  • openai
    GPT-4.1 mini provides a balance between intelligence, speed, and cost that makes it an attractive model for many use cases.
    Input:$0.4 / 1M tokens
    Output:$1.6 / 1M tokens
    Context:1047576 tokens
    tools
    text
    image
    text
  • anthropic
    Our high-performance model with exceptional reasoning and efficiency
    Input:$3 / 1M tokens
    Output:$15 / 1M tokens
    Context:200K tokens
    tools
    text
    image
    text
  • anthropic
    claude-opus-4
    anthropic
    Our most capable and intelligent model yet. Claude Opus 4 sets new standards in complex reasoning and advanced coding
    Input:$15 / 1M tokens
    Output:$75 / 1M tokens
    Context:200K tokens
    tools
    text
    image
    text
  • gemini
    Gemini 2.5 Pro is our most advanced reasoning Gemini model, capable of solving complex problems.
    Input:$1.25 / 1M tokens
    Output:$10 / 1M tokens
    Context:1M tokens
    tools
    text
    image
    audio
    video
    text
  • openai
    gpt-4.1
    openai
    GPT-4.1 is OpenAI's flagship model for complex tasks. It is well suited for problem solving across domains.
    Input:$2 / 1M tokens
    Output:$8 / 1M tokens
    Context:1047576 tokens
    tools
    text
    image
    text
  • gemini
    Gemini 2.5 Pro Experimental is Google's state-of-the-art thinking model, capable of reasoning over complex problems in code, math, and STEM, as well as analyzing large datasets, codebases, and documents using long context.
    Input:$1.25 / 1M tokens
    Output:$10 / 1M tokens
    Context:1M tokens
    tools
    text
    image
    audio
    video
    text
  • xai
    Grok 4 is the latest and greatest flagship model, offering unparalleled performance in natural language, math and reasoning - the perfect jack of all trades.
    Input:$3 / 1M tokens
    Output:$15 / 1M tokens
    Context:256K tokens
    tools
    text
    text
  • gemini
    Google's best model in terms of price-performance, offering well-rounded capabilities.
    Input:$0.15 / 1M tokens
    Output:$0.6 / 1M tokens
    Context:1M tokens
    tools
    text
    image
    audio
    video
    text
  • gemini
    Google's best model in terms of price-performance, offering well-rounded capabilities. Gemini 2.5 Flash rate limits are more restricted since it is an experimental / preview model.
    Input:$0.15 / 1M tokens
    Output:$0.6 / 1M tokens
    Context:1M tokens
    tools
    text
    image
    audio
    video
    text