Find boundary errors in this TypeScript function. Provide a minimal fix and tests for nulls, repeated calls and errors. Code: [paste code]
USER MESSAGECode repair
Validate a minimal code change against explicit boundary cases.
No matching models
Explore all modelsClaude Sonnet 5.5 targets interactive coding, analysis and application workflows that need a balance of speed and reasoning. It supports adaptive thinking and shares the current Claude family’s text and image inputs.
{
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "A quiet mountain lake at sunrise, soft morning light."
}
],
"stream": true
}Your next idea starts here.
Run the model to preview your result.The example follows your Playground parameters.
curl --no-buffer --request POST 'https://newrouters.com/v1/messages' \
--header 'Content-Type: application/json' \
--header "x-api-key: $MODEL_API_KEY" \
--header 'anthropic-version: 2023-06-01' \
--data '{
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "A quiet mountain lake at sunrise, soft morning light."
}
],
"stream": true
}'Set MODEL_API_KEY in your environment. Keep your secret key on the server. Full documentation ↗
curl 'https://newrouters.com/v1/messages' \
-H "Content-Type: application/json" \
-H "x-api-key: $MODEL_API_KEY" \
-H "anthropic-version: 2023-06-01" \
--data '{
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Explain how an HTTP request works in three concise steps."
}
],
"stream": false
}'const apiKey = process.env.MODEL_API_KEY;
const response = await fetch("https://newrouters.com/v1/messages", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": apiKey,
"anthropic-version": "2023-06-01"
},
body: JSON.stringify({
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Explain how an HTTP request works in three concise steps."
}
],
"stream": false
})
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());import os
import json
import requests
response = requests.post(
"https://newrouters.com/v1/messages",
headers={
"Content-Type": "application/json",
"x-api-key": os.environ["MODEL_API_KEY"],
"anthropic-version": "2023-06-01"
},
json=json.loads("{\"model\":\"claude-sonnet-5-5\",\"max_tokens\":1024,\"messages\":[{\"role\":\"user\",\"content\":\"Explain how an HTTP request works in three concise steps.\"}],\"stream\":false}"),
timeout=300,
)
response.raise_for_status()
print(response.text)Set MODEL_API_KEY in your server environment. Requests use this model’s native API and your account pricing.
Estimate one request, then choose a budget for your workflow.
| Usage | Quantity | Rate | Cost |
|---|---|---|---|
| tokens | $0.6/ 1M | $0.0006 | |
| tokens | $0.03/ 1M | $0 | |
| tokens | $0.75/ 1M | $0 | |
| tokens | $1.2/ 1M | $0 | |
| tokens | $3/ 1M | $0.0015 | |
| tokens | $3/ 1M | $0 |
Public USD estimate. Your account rate and final recorded usage determine the actual charge.
| Specification | Our price | Official reference |
|---|---|---|
| Input | $0.6 / 1M tokens | $2 About 70% less than official |
| Cached input | $0.03 / 1M tokens | $0.1 About 70% less than official |
| Cache write · 5m | $0.75 / 1M tokens | $2.5 About 70% less than official |
| Cache write · 1h | $1.2 / 1M tokens | $4 About 70% less than official |
| Output | $3 / 1M tokens | $10 About 70% less than official |
| Reasoning | $3 / 1M tokens | $10 About 70% less than official |
Original prompts adapted to documented capabilities; these are not vendor-generated outputs.
Official source ↗ · 2026-10-15
Find boundary errors in this TypeScript function. Provide a minimal fix and tests for nulls, repeated calls and errors. Code: [paste code]
USER MESSAGEValidate a minimal code change against explicit boundary cases.
Design a workflow for these business rules, listing state transitions, error paths and human handoffs. First identify missing information. Rules: [paste rules]
USER MESSAGESpecify states, errors and human handoffs so the plan can become application logic.
Plan a tool-assisted workflow for this task. State the inputs for each call, when to ask for clarification, and how to verify completion: [task]
USER MESSAGEMake the workflow and stopping conditions explicit.
Review this function for empty inputs, duplicate calls and concurrency races. Propose a minimal fix and focused verification: [code]
USER MESSAGEAssess a concrete implementation with checkable cases.
Claude Sonnet 5.5 targets interactive coding, analysis and application workflows that need a balance of speed and reasoning. It supports adaptive thinking and shares the current Claude family’s text and image inputs.
Official model information ↗ · 2026-10-15
| Official context window | 1,000,000 tokens |
|---|---|
| Synchronous output limit | 128,000 tokens |
| Input / output | Text and images → text |
| Knowledge cutoff | June 2026 |
| Minimum cacheable prompt | 512 tokens |
| Default effort | high |
| Official release | 2026-09-28 |
Use it for interactive development, code review, business analysis and tool-assisted application flows. Evaluate both correctness and response time with your own workload rather than relying on a generic model ranking.
The official default effort is high. The lowest thinking configuration is between_tools, which disables up-front reasoning at high effort or below. Forced tool selection is rejected, and thinking blocks belong to their original model and conversation.
Official specifications list a 1M-token context window and 128k synchronous output. Text and image input produce text output. The 300k output option uses the vendor’s Message Batches beta and is a separate API capability; it is not the synchronous output limit advertised here.
The minimum cacheable prompt is 512 tokens. Cache writes have separate 5-minute and 1-hour rates; subsequent reads use the cache-read rate. Cache eligibility does not guarantee a hit: prompt prefixes, expiration and upstream support still matter.
Use the public model ID with POST /v1/messages and x-api-key authentication. Streaming uses the native Claude event format. Preserve tool_use and tool_result messages for multi-turn tool calls. Query the platform contract before relying on vendor-managed tools or optional beta features.
Do not reuse sampling settings from older models without checking migration guidance. Prefer omitting temperature, top_p and top_k. Thinking consumes output tokens, so leave enough output budget for both reasoning and the final answer. Official capabilities are distinct from current platform availability.
Standard input / output rates are USD 2 / 10 per million tokens. The 5-minute write / 1-hour write / cache-read rates are USD 2.50 / 4 / 0.10 per million tokens. The live platform table is authoritative for the published 0.3 multiplier. Batch, Fast mode, regional inference and managed tools can have separate vendor charges.
Reviewed on 2026-10-15
| Specification | Claude Sonnet 5.5 |
|---|---|
| Model ID | claude-sonnet-5-5 |
| Provider | Anthropic |
| API | /v1/messages |
| Context window | 1,000,000 tokens |
| Maximum output | 128,000 tokens |
| Declared capabilities | Tools · Streaming · Reasoning · Structured output |
claude · claude-sonnet-5-5
tools · stream · reasoning · structured_output
| Specification | Claude Sonnet 5.5 | Claude Fable 5 | Claude Fable 5.1 |
|---|---|---|---|
| Provider | Anthropic | Anthropic | Anthropic |
| Input → output | TextText | TextText | TextText |
| Selection basis | Current model | Same claude protocol · Same billing units | Same claude protocol · Same billing units |
| Context / max output | 1,000,000 / 128,000 | 1,000,000 / 128,000 | 1,000,000 / 128,000 |
| Starting price | $0.6 / 1M tokens | $3 / 1M tokens | $3 / 1M tokens |
Choose by the input types, output settings and billing unit your workflow needs. Try the same prompt across models to compare results for your own use case.
Keep the native request format and point your application to the platform API. Prepare a key with model access, then review status and charges in your usage records.
View API examplesEverything you need to know about API access, pricing and model capabilities.
The default is high. Adaptive thinking settings differ from older Claude models.
The vendor’s 300k batch beta is distinct from the synchronous Messages endpoint. Only platform-documented endpoints and limits are available here.
Charges depend on the recorded token usage and your account rates. Input, output and supported cache or reasoning categories are listed separately in the pricing table. The calculator uses public USD prices; the final usage receipt determines the charge.
Choose “Get API access” to open the integration guide. Sign in to your NewRouters account, prepare a key with access to this model and copy an API example.
Supported endpoints: /v1/messages、/v1/messages/count_tokens. Choose an endpoint in the API examples to see its native request format.
The current model route declares streaming support. Use the native endpoint’s streaming option and consume its events. Usage already completed may still be billed if the connection is interrupted.
Tools: supported. Structured output: supported. Request fields follow the selected native endpoint.
Keep the request ID and open your account’s LLM usage records to inspect request status, token counts and charges. Prompt and answer content are not a conversation history in this view.
Validate a minimal code change against explicit boundary cases.
Explore ↗Specify states, errors and human handoffs so the plan can become application logic.
Explore ↗Make the workflow and stopping conditions explicit.
Explore ↗Assess a concrete implementation with checkable cases.
Explore ↗Hello, API.Prepare a key, choose a model and send a minimal request.
View docs section ↗{ messages: [...] }Explore request formats for OpenAI, Claude and Gemini.
View docs section ↗build(something)Separate token estimates, account pricing and final usage receipts.
View docs section ↗