To meet the demand for using the Anthropic API ecosystem, our API has added support for the Anthropic API format. With simple configuration, you can integrate the capabilities of DeepSeek into the Anthropic API ecosystem.
Note: The API_TIMEOUT_MS parameter is configured to prevent excessively long outputs that could cause the Claude Code client to time out. Here, we set the timeout duration to 10 minutes.
Enter the Project Directory, and Execute Claude Code
message = client.messages.create( model="deepseek-chat", max_tokens=1000, system="You are a helpful assistant.", messages=[ { "role": "user", "content": [ { "type": "text", "text": "Hi, how are you?" } ] } ] ) print(message.content)
Note: When you pass an unsupported model name to DeepSeek’s Anthropic API, the API backend will automatically map it to the deepseek-chat model.
Anthropic API Compatibility Details
HTTP Header
Field
Support Status
anthropic-beta
Ignored
anthropic-version
Ignored
x-api-key
Fully Supported
Simple Fields
Field
Support Status
model
Use DeepSeek Model Instead
max_tokens
Fully Supported
container
Ignored
mcp_servers
Ignored
metadata
Ignored
service_tier
Ignored
stop_sequences
Fully Supported
stream
Fully Supported
system
Fully Supported
temperature
Fully Supported (range [0.0 ~ 2.0])
thinking
Ignored
top_k
Ignored
top_p
Fully Supported
Tool Fields
tools
Field
Support Status
name
Fully Supported
input_schema
Fully Supported
description
Fully Supported
cache_control
Ignored
tool_choice
Value
Support Status
none
Fully Supported
auto
Supported (disable_parallel_tool_use is ignored)
any
Supported (disable_parallel_tool_use is ignored)
tool
Supported (disable_parallel_tool_use is ignored)
Message Fields
Field
Variant
Sub-Field
Support Status
content
string
Fully Supported
array, type=”text”
text
Fully Supported
cache_control
Ignored
citations
Ignored
array, type=”image”
Not Supported
array, type = “document”
Not Supported
array, type = “search_result”
Not Supported
array, type = “thinking”
Ignored
array, type=”redacted_thinking”
Not Supported
array, type = “tool_use”
id
Fully Supported
input
Fully Supported
name
Fully Supported
cache_control
Ignored
array, type = “tool_result”
tool_use_id
Fully Supported
content
Fully Supported
cache_control
Ignored
is_error
Ignored
array, type = “server_tool_use”
Not Supported
array, type = “web_search_tool_result”
Not Supported
array, type = “code_execution_tool_result”
Not Supported
array, type = “mcp_tool_use”
Not Supported
array, type = “mcp_tool_result”
Not Supported
array, type = “container_upload”
Not Supported
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.