Back to providers page
Try this model
anthropic

claude-sonnet-4

completions

Our high-performance model with exceptional reasoning and efficiency

Input:$3 / 1M tokens
Output:$15 / 1M tokens
Context:200K tokens
tools
text
image
text

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
    Bob wins when n ≡ 1, 3, or 4 (mod 5); count of such n ≤ 2024 is **1215**.
    21 days ago
    Bob wins when n ≡ 1, 3, or 4 (mod 5); there are 1215 such n ≤ 2024 giving Bob a forced winning strategy.
    combinatorial game theory
    winning and losing positions
    token removal game
    modulo pattern analysis
  • anthropic
    A* Pathfinding on Grid (Python)
    21 days ago
    Python implementation of the A* algorithm using Manhattan distance to find shortest grid path with obstacles and path visualization.
    a* pathfinding python
    astar algorithm grid
    manhattan distance heuristic
    shortest path algorithm
  • anthropic
    Probability both cards are face cards
    21 days ago
    Calculates the probability of drawing two face cards without replacement from a 52-card deck as 11/221 (~4.98%).
    probability face cards
    drawing cards without replacement
    combinatorics card probability
    calculating card probability
  • anthropic
    Python Pygame Tetris Game with Classic Features
    21 days ago
    Complete Python Tetris game using Pygame featuring classic gameplay, all tetromino shapes, scoring, controls, next piece preview, and game over screen.
    tetris python pygame
    tetrominoes game development
    pygame tetris tutorial
    classic tetris implementation
  • anthropic
    Meaning and Usage of “Ubiquitous”
    21 days ago
    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-4o-mini
    openai
    GPT-4o mini (o for omni) is a fast, affordable small model for focused tasks. It accepts both text and image inputs, and produces text outputs (including Structured Outputs). It is ideal for fine-tuning, and model outputs from a larger model like GPT-4o can be distilled to GPT-4o-mini to produce similar results at lower cost and latency.The knowledge cutoff for GPT-4o-mini models is October, 2023.
    Input:$0.15 / 1M tokens
    Output:$0.6 / 1M tokens
    Context:128K tokens
    tools
    text
    image
    text
  • anthropic
    claude-sonnet-4
    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
  • 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-preview
    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
  • gemini
    gemini-2.5-flash-preview
    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
  • gemini
    gemini-2.0-flash
    gemini
    Google's most capable multi-modal model with great performance across all tasks, with a 1 million token context window, and built for the era of Agents.
    Input:$0.1 / 1M tokens
    Output:$0.4 / 1M tokens
    Context:1M tokens
    tools
    text
    image
    audio
    video
    text
  • anthropic
    claude-3.7-sonnet
    anthropic
    Intelligent model, with visible step‑by‑step reasoning
    Input:$3 / 1M tokens
    Output:$15 / 1M tokens
    Context:200K tokens
    tools
    text
    text
    image
  • gemini
    gemini-2.0-flash-lite
    gemini
    Google's smallest and most cost effective model, built for at scale usage.
    Input:$0.07 / 1M tokens
    Output:$0.3 / 1M tokens
    Context:1M tokens
    text
    image
    audio
    video
    text
  • openai
    gpt-4.1-mini
    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

Related AI Model Resources

Explore more AI models, providers, and integration options:

  • Browse All AI Models
  • AI Providers Directory
  • More from anthropic
  • MCP Servers
  • Integration Documentation
  • Pricing & Plans
  • AI Industry Blog