A balanced reasoning model for multi-step programming and tool collaboration
Claude Sonnet 5 is Anthropic's Sonnet model for programming, reasoning, and agentic work, with a focus on improving sustained execution from task planning to tool collaboration. It supports analyzing problems using both text and images, making it suitable for code maintenance, technical research, and knowledge organization. On this platform, you can choose to orchestrate messages yourself or use managed multi-turn conversations to complete continuous tasks.
Continue chats with managed session IDs; the chat endpoint supports SSE and NDJSON
Reasoning and visual understanding are model capabilities; file reading, session management, and tool execution are provided by the selected endpoint and authorization configuration.
Core Capabilities
Learn what claude-sonnet-5 can bring to your work.
Turn programming tasks into complete steps
The focus of Sonnet 5 is not just completing code, but planning continuous work around a goal. Compared with Sonnet 4.6, it offers improvements in programming, reasoning, and tool use. Have it first break down the scope of changes, then generate implementation suggestions and a test plan; after connecting execution tools, continue adjusting based on runtime feedback.
Incorporate tool feedback into next-step decisions
For tasks that require querying, reading, and verification, it is well suited to take on the decision-making role in an agent. Applications can provide function tools, allowing the model to advance work based on returned results; hosted conversations can also use authorized tools for multi-turn collaboration. Execution permissions and operable objects are still set by the application, rather than obtained by the model itself.
Explain technical issues using text and images
Text and images can jointly form the context of a problem, for example by placing error screenshots, interface states, and requirement descriptions in the same input turn. Sonnet 5 can provide explanations and troubleshooting suggestions based on this, making it suitable for turning visual information into discussable textual conclusions rather than mistaking image understanding for image generation capability.
Use Cases
Start with specific tasks to find where the model can be effective.
Code maintenance and bug investigation
Provide relevant code, error logs, and expected behavior, and ask the model to output issue hypotheses, modification plans, and regression test suggestions. When testing tools are already available, return the results to continue narrowing down the issue. Deliverables should be clearly defined as patch suggestions, test cases, and items to verify, making them easier for engineers to review before merging.
Technical research with supporting materials
Give the model technical documents, screenshots, and questions that need comparison to organize differences between approaches, implementation dependencies, and risks. When files need to be read, use the file content blocks and reading tools in the conversation interface. Finally, require the report to be organized by conclusions, evidence, and open questions so the team can continue making decisions.
An assistant for ongoing work
Suitable for continuously organizing requirements, revising plans, and tracking issues around the same project. Use a hosted session ID to carry forward subsequent discussions, and connect authorized knowledge bases or code collaboration tools when needed. Limiting each turn's objective to a clear analysis or deliverable can reduce continuous expansion of task scope.
How to choose this model
Choose based on task complexity, input materials, and expected results.
Focus on task completion when migrating from Sonnet 4.6
If existing tasks are often interrupted between planning, tool feedback, or code modifications, Sonnet 5 is worth prioritizing for testing. Its improvements focus on reasoning, programming, tool use, and knowledge work. When migrating, reuse real examples, compare accuracy and the amount of follow-up correction, and recalculate Token usage rather than copying the old budget.
Divide work with Opus 4.8 by difficulty
Sonnet 5 is suitable for everyday engineering and multi-step analysis that require a balance between capability and investment; in official evaluations, higher reasoning effort can match Opus 4.8 on some tasks, but this does not mean it is equivalent across the board. For extremely difficult judgments, complex reviews, or critical deliverables, conduct parallel validation before deciding whether to use a higher-capability model.
Get started
From a small-scale task to production integration.
01
Prepare tasks and materials
Define the goal, required inputs, and output requirements, using real business examples as a starting point.
02
Try it in the API testing area
Open the trial page, confirm the parameters supported by this entry point, then submit a small-scale task to view the results.
03
Integrate according to the API documentation
Keep the complete model ID, use the request format specified in the documentation, and confirm billing rules on the Pricing page.
Usage boundaries
Before formal use, understand output quality and capability scope.
Tool-use capability does not mean automatically having browser, terminal, or system permissions. Ordinary message requests will not execute code or click interfaces on their own; the application must provide execution tools, or available tools must be connected in a hosted conversation, with permitted operations explicitly authorized.
Sonnet 5 uses an updated tokenizer, and the number of Tokens for the same input is approximately 1.0—1.35 times that of the previous version, depending on the content type. When migrating long prompts and code tasks, recount usage and adjust input organization and output budgets to avoid relying on old estimates.
Official evaluations show that it has reduced hallucination and sycophancy compared with Sonnet 4.6, but it may still make incorrect judgments. Code changes should be tested, and document conclusions should be checked against original materials; it is also not a cybersecurity model trained specifically for that purpose, so general programming ability should not be treated as a guarantee of professional security assessment.
Frequently Asked Questions
Answers to common questions about using claude-sonnet-5.
What tasks is Sonnet 5 better suited for than Sonnet 4.6?
It is mainly suited for programming, research, and knowledge work that require continuous reasoning and tool feedback, such as breaking down modification plans and revising approaches based on test results. If you already have a stable Sonnet 4.6 workflow, you can first compare it using the same set of examples; there is no need to migrate immediately just because of the version change.
Can it directly fix and run my project?
It can analyze code, propose changes, and participate in tool collaboration, but running a project requires an available execution environment and permissions. When only text is sent, you receive code or suggestions; after connecting tools, it can iterate based on execution feedback. Testing and merge reviews should still be retained in the end.
How do I submit screenshots and questions together?
Combine text and image_url blocks in the message content of Chat Completions, clearly stating the issue shown in the screenshot and the question you want answered. Hosted conversations can also use a message array to organize text and images. Images are used for understanding and analysis, and responses are presented as text.
Which endpoint should I use to read PDFs?
You can use the file_url content block of /aichat2/conversations together with the file-reading workflow for summarization or analysis. File reading is the processing method provided by the endpoint; do not submit a PDF address to Chat Completions as an image address, and important conclusions should be verified against the original text.
Do I need to resend the history for multi-turn project discussions?
Hosted conversations can preserve sessions through stateful and continue the discussion in subsequent requests by bringing back the same id. When orchestrating Chat Completions yourself, the application maintains the required messages and tool results. The former is suitable for ongoing collaboration, while the latter makes it easier to control context organization.
Model information · Updated: 2026-10-01. For invocation parameters and billing rules, see the API and pricing sections.