Documentation Index
Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
Use this file to discover all available pages before exploring further.
Description
The Claude series models support official native API calls. Before using, ensure that theanthropic dependency is installed or upgraded:
Model Information
| Model Name | Claude Opus 4.6 | Claude Sonnet 4.6 | Claude Sonnet 4.5 | Claude Haiku 4.5 |
|---|---|---|---|---|
| Supports Extended Thinking | Yes | Yes | Yes | Yes |
| Context Window Size | 200K tokens / 1M tokens (beta)3 | 200K tokens / 1M tokens (beta)3 | 200K | 200K |
| Maximum Output Length | 128K tokens | 128K tokens | 64K tokens | 64K tokens |
| Training Data Cutoff | August 2025 | August 2025 | July 2025 | July 2025 |
New Features in Claude 4.6
Adaptive Thinking
Claude 4.6 recommends using a new adaptive thinking mode, where Claude automatically determines whether to think and the depth of thinking based on the complexity of the question:Automatic Context Compaction (Beta)
When conversations approach the context window limit, Claude 4.6 can automatically perform server-side summary compaction of earlier content. Advantages:- Supports ultra-long conversations
- No need for client-side summarization
- Enhances agent’s ability for continuous dialogues
- Automatic compaction may lose some details
- It is recommended to evaluate tests in scenarios requiring strong consistency
Deprecations and Changes
- Removed
interleaved-thinking-2025-05-14Beta Header: In 4.6, adaptive thinking now automatically supports interleaved thinking, and there is no need to addextra_headers. If still added, this header will be safely ignored.
New Features in Claude 4
New Refusal Stop Reason
The Claude 4 model introduces a newrefusal stop reason to handle cases where the model refuses to generate content for safety reasons:
refusal stop reason.
Extended Thinking
Once extended thinking is enabled, the Claude 4 model’s Messages API will return a summary of Claude’s complete thought process. The summary provides all the intelligent advantages of extended thinking while preventing abuse. While the API remains consistent between Claude 3.7 and 4 models, the streaming response for extended thinking may return in a “chunked” mode, with possible delays between streaming events. The summary is processed by a model different from the one specified in your request. The thinking model will not see the summary output.Interleaved Thinking
Claude 4 model supports interleaving tool usage with extended thinking, allowing for more natural conversations where tool usage and responses can be mixed with regular messages. Interleaved thinking is currently in testing. To enable interleaved thinking, add the test headerinterleaved-thinking-2025-05-14 in your API request:
POST /v1/messages
Invocation
Body Request Structure
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| x-api-key | header | string | No | AIHUBMIX_API_KEY |
| Content-Type | header | string | No | none |
| body | body | object | No | none |
| » model | body | string | Yes | none |
| » messages | body | [object] | Yes | none |
| »» role | body | string | No | none |
| »» content | body | string | Yes | none |
| » max_tokens | body | number | Yes | none |
Response Example
Response Results
| Status Code | Status Meaning | Description | Data Model |
|---|---|---|---|
| 200 | OK | none | Inline |
Migrating to Claude 4
If you are migrating from the Claude 3.7 to Claude 4 models, be aware of the following changes:Update Model Name
Handle New Stop Reasons
Update your application to handle the newrefusal stop reason:
Remove Unsupported Features
- Token Efficient Tool Usage: Only available in Claude Sonnet 3.7, no longer supported in Claude 4
- Extended Output: The
output-128k-2025-02-19test header is only available in Claude Sonnet 3.7
Using in Applications (Example with Lobe-Chat)
- Go to the settings page and select the model provider Claude
- Input the API key from our site
- Enter the API proxy address directly as follows:
- It is recommended to enable “Use Client Request Mode”
-
Finally, add the models you wish to use to the model list (it is suggested to copy and paste the model name from our website’s settings page)\


Claude Text Editing Tools
Claude can use text editing tools defined by Anthropic to view and modify text files, helping you debug, fix, and improve code or other text documents. This enables Claude to interact directly with your files, providing practical operational assistance rather than just suggestions.Preparation Before Using Text Editing Tools
Select compatible models. Anthropic’s text editing tools support the following Claude models:- Claude 4 Series Models (
claude-opus-4-20250514,claude-sonnet-4-20250514):text_editor_20250429 - Claude 3.7 Sonnet (
claude-3-7-sonnet-20250219):text_editor_20250124 - Claude 3.5 Sonnet (
claude-3-5-sonnet-20241022):text_editor_20241022
Tool Configuration per Model
| Model Version | Tool Type | Tool Name | Supported Features |
|---|---|---|---|
| Claude 4 (Opus/Sonnet) | text_editor_20250429 | str_replace_based_edit_tool | view, str_replace, create |
| Claude 3.7 Sonnet | text_editor_20250124 | str_replace_editor | view, str_replace, create, undo_edit |
| Claude 3.5 Sonnet | text_editor_20241022 | str_replace_editor | view, str_replace, create, undo_edit |
Assessment of Use Cases
Here are some typical scenarios for using text editing tools:- Code Debugging: Helps identify and fix issues in code, ranging from syntax errors to logical problems.
- Code Refactoring: Improves code structure, readability, and performance through targeted edits.
- Documentation Generation: Adds documentation strings, comments, or README files to your codebase.
- Test Creation: Creates unit tests based on an understanding of the implementation.
Using Text Editing Tools
Provide Claude with text editing tools (namedstr_replace_editor) through the Messages API: You need to install the anthropic package:
Migrating to Claude 4 (Text Editing Tools)
If you are migrating from Claude 3.7 Sonnet to Claude 4 models, be aware of the following changes:Update Tool Configuration
python
Remove Unsupported Features
undo_edit command: The Claude 4 model no longer supports the undo edit functionality.- Please remove any logic that depends on
undo_editfrom your code.