---
title: Anthropic: Claude Sonnet 5 API | Text Generation | ModelsLab
description: Build with Anthropic: Claude Sonnet 5 API by Anthropic. Text generation, chat, code, and reasoning. Pay-per-use. Free tier.
url: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/anthropic/anthropic-claude-sonnet-5.md
canonical: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/anthropic/anthropic-claude-sonnet-5.md
type: product
component: Playground/LLM/Index
generated_at: 2026-07-01T01:54:29.745841Z
---

Anthropic: Claude Sonnet 5
---

 [LLMs.txt](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/anthropic-claude-sonnet-5/llms.txt) [.md](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/anthropic/anthropic-claude-sonnet-5.md)

Anthropic: Claude Sonnet 5
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

Send

### Anthropic: Claude Sonnet 5

anthropic anthropic-claude-sonnet-5

Copy model ID

PricingInput $2.00 / 1M tokens

Output $10.00 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens1000

Top P0.9

Frequency Penalty0

Presence Penalty0

Model Info

Support

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster)

[#### together\_ai/Qwen3.5 9B FP8

Qwen-Qwen3.5-9B

From $0.13/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3.5-9B)

[#### mistral\_ai/Mistral (7B) Instruct

mistralai-Mistral-7B-Instruct-v0.1

From $0.20/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/mistral_ai/mistralai-Mistral-7B-Instruct-v0.1)

[#### open\_router/Meta: Llama 4 Maverick

meta-llama-llama-4-maverick

From $0.38/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-llama-4-maverick)

[#### open\_router/Cohere: North Mini Code (free)

cohere-north-mini-code-free

Free](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/cohere-north-mini-code-free)

[#### open\_router/Cohere: Command R7B (12-2024)

cohere-command-r7b-12-2024

From $0.09/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/cohere-command-r7b-12-2024)

[#### open\_router/Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)

google-gemini-3.1-flash-image-preview

From $1.75/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/google-gemini-3.1-flash-image-preview)

[#### open\_router/NVIDIA: Nemotron 3 Super

nvidia-nemotron-3-super-120b-a12b

From $0.24/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/nvidia-nemotron-3-super-120b-a12b)

[#### open\_router/DeepSeek: DeepSeek V4 Pro

deepseek-deepseek-v4-pro

From $0.65/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/deepseek-deepseek-v4-pro)

[#### open\_router/Poolside: Laguna XS.2 (free)

poolside-laguna-xs.2-free

Free](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/poolside-laguna-xs.2-free)

[#### open\_router/Mistral: Mistral Medium 3.1

mistralai-mistral-medium-3.1

From $1.20/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-medium-3.1)

[#### open\_router/Qwen: Qwen3 14B

qwen-qwen3-14b

From $0.17/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-14b)

[#### open\_router/Google: Gemma 2 27B

google-gemma-2-27b-it

From $0.65/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/google-gemma-2-27b-it)

[#### open\_router/OpenAI: GPT-4 Turbo

openai-gpt-4-turbo

From $20.00/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-4-turbo)

[#### open\_router/AionLabs: Aion-2.0

aion-labs-aion-2.0

From $1.20/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/aion-labs-aion-2.0)

[#### google/Gemini 2.5 Flash Image Preview 

gemini-2.5-flash-image-preview

From $1.40/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/google/gemini-2.5-flash-image-preview)

[#### open\_router/Anthropic: Claude Opus 4.1

anthropic-claude-opus-4.1

From $45.00/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/anthropic-claude-opus-4.1)

[#### alibaba\_cloud/Qwen: Qwen3.5-27B

qwen-qwen3.5-27b

From $1.35/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/alibaba_cloud/qwen-qwen3.5-27b)

[#### open\_router/AionLabs: Aion-1.0-Mini

aion-labs-aion-1.0-mini

From $1.05/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/aion-labs-aion-1.0-mini)

Open Source Alternatives
---

Explore open-source models that offer similar capabilities with full transparency and flexibility

 [View all open source models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llm&provider=open-source-models)

[MU

Popular](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/modelslab/uncensored-chat)[ModelsLab](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/modelslab)

 [Modelslab: Uncensored Chat

Open Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/modelslab/uncensored-chat)

About Anthropic: Claude Sonnet 5
---

Sonnet 5 is Anthropic's most capable Sonnet-class model, with frontier performance across coding, agents, and professional work. It supports adaptive thinking with selectable reasoning effort levels (low, medium, high, max,...

### Technical Specifications

Model IDanthropic-claude-sonnet-5

CategoryLLM Models

TaskText Generation

Price$6 per million tokens

AddedJune 30, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate Anthropic: Claude Sonnet 5 into your application with a single API call. Get your API key from the [pricing page](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "anthropic-claude-sonnet-5",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

### Pricing

Anthropic: Claude Sonnet 5 API costs $6.000000 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Browse LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster) [More from Anthropic](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router) [View Pricing](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing)

Anthropic: Claude Sonnet 5 FAQ
---

### What is Anthropic: Claude Sonnet 5?

Sonnet 5 is Anthropic's most capable Sonnet-class model, with frontier performance across coding, agents, and professional work. It supports adaptive thinking with selectable reasoning effort levels (low, medium, high, max,...

### How do I use the Anthropic: Claude Sonnet 5 API?

You can integrate Anthropic: Claude Sonnet 5 into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "anthropic-claude-sonnet-5" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does Anthropic: Claude Sonnet 5 cost?

Anthropic: Claude Sonnet 5 costs $6.000000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the Anthropic: Claude Sonnet 5 model ID?

The model ID for Anthropic: Claude Sonnet 5 is "anthropic-claude-sonnet-5". Use this ID in your API requests to specify this model.

### Does Anthropic: Claude Sonnet 5 have a free tier?

Yes, ModelsLab offers a free tier that lets you try Anthropic: Claude Sonnet 5 and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-07-01*