Claude Sonnet 5
Send a message to test this OpenAI-compatible chat completions model.
Explore different use cases and parameter configurations
Transparent pricing with no hidden fees. Pay as you go.
| Rule & Modality | Channel | Credits | Price (USD) | Official / Reference Price | Daily Savings |
|---|---|---|---|---|---|
Claude Code PAYG Claude Sonnet 5 textAnthropicToken | Regular | Input220.02 Output1,100.11 Cache read22.00 Cache write 5m275.03 Cache write 1h440.04 credits / 1M tokens | Input: $1.0001 Output: $5.0005 Cache read: $0.100 Cache write 5m: $1.250 Cache write 1h: $2.0002 per 1M tokens | - | - |
Complete guide to using claude-sonnet-5
Access Claude Sonnet 5 through ApiPass for multi-step reasoning, code synthesis, and agent workflows. Send OpenAI-compatible chat requests, optionally configure supported reasoning effort and tools, and choose a standard response or streamed output.

Claude Sonnet 5 is presented as an agent-oriented model for complex coding, professional knowledge work, and multi-step tasks. The source highlights planning, tool use, self-checking, and computer-use capabilities. On ApiPass, this model is accessed through the text-focused, OpenAI-compatible /v1/chat/completions endpoint. Send a non-empty messages array with role and content in each message; this API reference does not document file uploads or a built-in computer-control endpoint.
Use chat messages to request plans, break down multi-step work, and evaluate possible approaches. The API supports optional reasoning_effort values of low and high; availability and behavior ultimately depend on the provider.
Ask the model to draft code, investigate bugs, review implementations, or plan changes across a codebase. Include relevant code and constraints as plain text in messages.
ApiPass accepts an optional OpenAI-compatible tools array and forwards it to the provider. Upstream tool support may vary; your application remains responsible for executing any requested tools.
The source positions Claude Sonnet 5 for planning and iterating on complex tasks. Use conversation messages to provide objectives, constraints, and prior results as an agent workflow progresses.
Balance task complexity against token usage with the optional reasoning_effort parameter. This ApiPass route documents low and high as its available values; it does not document a max value.
Apply the model to code synthesis, debugging, and maintenance. For actions involving a terminal or browser, connect and supervise tools in your own application rather than assuming the chat endpoint executes actions itself.
The supplied content emphasizes safer, more predictable behavior. Validate generated code and decisions, and enforce application-level permissions and safeguards around any connected tools.
Build chat assistants that explain code, propose refactors, review changes, and help engineers investigate defects.
Turn a goal into sequenced actions, pass tool results back as conversation messages, and ask the model to assess next steps.
Summarize technical material, compare options, and produce structured recommendations from text supplied in the conversation.
The supplied content positions Claude Sonnet 5 between earlier Sonnet models and the Opus tier. Its reported benchmark figures are source claims, not guarantees for individual API requests.
The supplied comparison reports 63.2% versus 58.1% on SWE-bench Pro and 80.4% versus 67.0% on Terminal-Bench for Claude Sonnet 5 and Sonnet 4.6, respectively. It frames Sonnet 5 as the stronger choice for agentic coding.
The supplied content describes near-Opus capability with a mid-tier cost-performance focus. Its table reports 63.2% versus 69.2% on SWE-bench Pro for Sonnet 5 and Opus 4.8, respectively.
The supplied page lists 170 credits per 1 million input tokens and 855 credits per 1 million output tokens. Verify current ApiPass pricing before relying on these figures for billing.
Non-streaming responses include usage.prompt_tokens, usage.completion_tokens, and usage.total_tokens when reported by the provider. Longer conversations and outputs can increase token consumption.
Set a positive max_tokens value when you need an output limit. If omitted, the adapter does not add max_tokens to the upstream request.
Create an ApiPass API key and keep it secure. Use it in an Authorization: Bearer YOUR_API_KEY header.
POST JSON to https://api.apipass.dev/v1/chat/completions with model set to claude-sonnet-5 and a non-empty messages array. This model uses the chat endpoint, not the asynchronous jobs endpoint.
For a non-streaming request, read choices[0].message.content and the usage fields. To stream, set stream to true and process text/event-stream chat.completion.chunk events until data: [DONE].
All APIs require authentication via Bearer Token.
Authorization: Bearer
Generate text with claude-sonnet-5 through the ApiPass OpenAI-compatible chat completions endpoint.
Send an OpenAI-compatible JSON request body. ApiPass routes claude-sonnet-5 to the APIPASS adapter, which forwards the chat payload to APIPASS's LLM endpoint.
1{
2 "model": "claude-sonnet-5",
3 "messages": [
4 {
5 "role": "user",
6 "content": "Hello!"
7 }
8 ],
9 "stream": false,
10 "temperature": 0.7,
11 "max_tokens": 512,
12 "channel": "auto"
13}modelRequiredstringThe public ApiPass model name. The APIPASS adapter also accepts the gpt-5.5 alias and maps it upstream to claude-sonnet-5.
"claude-sonnet-5"
messagesRequiredarray<object>OpenAI-style chat messages array. The adapter requires a non-empty list, and each message object must include role and content.
[{"role":"user","content":"Write a short product announcement for APIPASS Claude Sonnet 5 support in ApiPass."}]streamOptionalbooleanSet to true to receive Server-Sent Events. When false or omitted, ApiPass returns a single OpenAI-compatible chat.completion response.
false
temperatureOptionalnumberOptional sampling temperature from 0 to 2. If omitted, the adapter does not include temperature in the upstream request.
Allowed range: 0 to 2
0.7
max_tokensOptionalintegerOptional maximum number of completion tokens. If omitted, the upstream provider decides the response length.
Must be greater than 0 when provided
512
top_pOptionalnumberOptional nucleus sampling value accepted by the ApiPass chat endpoint and forwarded to APIPASS when supplied.
Allowed range: 0 to 1
0.9
frequency_penaltyOptionalnumberOptional OpenAI-compatible frequency penalty accepted by ApiPass and forwarded when supplied.
Allowed range: -2 to 2
0
presence_penaltyOptionalnumberOptional OpenAI-compatible presence penalty accepted by ApiPass and forwarded when supplied.
Allowed range: -2 to 2
0
response_formatOptionalobjectOptional response format object accepted by the ApiPass chat endpoint and forwarded to the provider if present.
{"type":"json_object"}toolsOptionalarray<object>Optional OpenAI-compatible tools array. ApiPass accepts tool definitions and forwards them to APIPASS when supplied; support depends on the upstream model.
[{"type":"function","function":{"name":"lookup_order","description":"Look up an order by ID","parameters":{"type":"object","properties":{"order_id":{"type":"string"}},"required":["order_id"]}}}]include_thoughtsOptionalbooleanOptional provider-specific flag accepted by ApiPass and forwarded when true.
false
reasoning_effortOptionalstringOptional reasoning effort value accepted by the ApiPass chat endpoint and forwarded to the provider when supplied.
Available options:
"low"
_provider_config_idOptionalstringOptional ApiPass routing override. Supply a provider_model_configs.id to force this request to a specific configured APIPASS provider.
"provider-config-id"
channelOptionalstringYou may specify the corresponding provider within APIPASS via the channel parameter; these providers handle the actual image and video generation tasks. APIPASS currently offers three provider options:
The default value for the channel parameter is auto. When enabled, APIPASS automatically allocates tasks across available providers based on real-time pricing and stability metrics to balance minimal cost and reliable performance. Retain the default auto value unless you have custom routing requirements.
Available options:
auto
Each item in the messages array follows the OpenAI chat message shape validated by ApiPass before the APIPASS adapter is called.
messages[].roleRequiredstringMessage role. ApiPass accepts developer, system, user, and assistant roles in the chat request model.
Available options:
"user"
messages[].contentRequiredstringMessage content. For Claude Sonnet 5 text generation, use plain text content for the most predictable provider behavior.
"Summarize the following text in three concise bullets."
1curl -X POST "https://api.apipass.dev/v1/chat/completions" \
2 -H "Content-Type: application/json" \
3 -H "Authorization: Bearer YOUR_API_KEY" \
4 -d '{
5 "model": "claude-sonnet-5",
6 "messages": [
7 {
8 "role": "system",
9 "content": "You are a precise and concise assistant."
10 },
11 {
12 "role": "user",
13 "content": "Write a short product announcement for APIPASS Claude Sonnet 5 support in ApiPass."
14 }
15 ],
16 "temperature": 0.7,
17 "max_tokens": 512,
18 "stream": false
19 }'1{
2 "id": "chatcmpl_gpt_5_5_demo",
3 "object": "chat.completion",
4 "created": 1765968190,
5 "model": "claude-sonnet-5",
6 "choices": [
7 {
8 "index": 0,
9 "message": {
10 "role": "assistant",
11 "content": "ApiPass now supports APIPASS Claude Sonnet 5 through the standard OpenAI-compatible chat completions endpoint."
12 },
13 "finish_reason": "stop"
14 }
15 ],
16 "usage": {
17 "prompt_tokens": 35,
18 "completion_tokens": 19,
19 "total_tokens": 54
20 }
21}idApiPass chat completion response ID.
objectResponse object type. Non-streaming calls return chat.completion.
modelThe public model name used for the request.
choices[0].message.contentAssistant reply text extracted from the APIPASS OpenAI-compatible response.
choices[0].finish_reasonCompletion finish reason. ApiPass returns stop for successful non-streaming Claude Sonnet 5 completions.
usage.prompt_tokensPrompt token count reported by the upstream provider.
usage.completion_tokensCompletion token count reported by the upstream provider.
usage.total_tokensTotal token count used for ApiPass usage accounting.

xAI
xAI
Starting from
0 credits
OpenAI
OpenAI
GPT-5.6 models shared by Codex-compatible clients and direct API callers.
Starting from
0 credits
Anthropic
Anthropic
Upgrade to Fable 5.1 for sharper, more natural responses with improved context awareness and refined writing quality.
Starting from
0 credits
OpenAI
OpenAI
GPT‑6 Astra brings together years of research and big bets across pre-training, reinforcement learning, and alignment
Starting from
0 credits
Anthropic
Anthropic
Harness Fable 5 to turn raw ideas into vivid, natural-sounding text across any creative or conversational task.
Starting from
0 credits
Anthropic
Anthropic
Deploy Opus 4.8's advanced cognitive architecture to tackle your most complex reasoning and multi-step problem-solving challenges.
Starting from
0 credits
Anthropic
Anthropic
Trust Opus 5 for deep, nuanced reasoning on your hardest analytical, coding, and research problems.
Starting from
0 credits
Anthropic
Anthropic
Starting from
0 credits
OpenAI
OpenAI
Starting from
0 credits
Gemini 3 Flash Preview - Fast Response Preview
Starting from
0 credits
OpenAI
OpenAI
Orchestrate autonomous AI agents with GPT-5.5 API.
Starting from
0 credits
Gemini 3 Pro Preview - Try out the latest features
Starting from
0 credits
Anthropic
Anthropic
Choose Haiku 5.5 for fast, cost-efficient responses and everyday tasks, with Claude Messages API support.
Starting from
0 credits