curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4-flash",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, world"
}
]
}
'{
"id": "53ee6690-e14a-4e6b-890b-a135100d51c7",
"type": "message",
"role": "assistant",
"model": "deepseek-v4-flash",
"content": [
{
"type": "thinking",
"thinking": "The user is asking about Japan's capital — a basic geography question. The answer is Tokyo, just give it directly.",
"signature": "53ee6690-e14a-4e6b-890b-a135100d51c7"
},
{
"type": "text",
"text": "The capital of Japan is **Tokyo**."
}
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 7,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"output_tokens": 77,
"service_tier": "standard"
}
}DeepSeek V4 - Anthropic-Compatible API
- Invoke DeepSeek V4 models using the Anthropic Messages protocol
- Supports
deepseek-v4-flash/deepseek-v4-pro/deepseek-v4-flash-vision-exp - Request / response structures aligned with the Anthropic API
- Image understanding:
deepseek-v4-flash-vision-expsupportsimagecontent blocks (source.typemay bebase64orurl) - System prompts: Passed via the top-level
systemfield - Thinking mode: Controlled by the
thinkingobject; thinking content is returned as acontent[type=thinking]block - Streaming output: SSE event stream
- Tool calling: Compatible with Anthropic
tool_use/tool_resultflow
⚠️ Important: Sending an
imageblock todeepseek-v4-flash/deepseek-v4-prodoes not raise an error, but the upstream replaces the image with an[Unsupported Image]placeholder. The model cannot see the image, and the request is still billed. For image understanding, always setmodeltodeepseek-v4-flash-vision-exp.
curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4-flash",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, world"
}
]
}
'{
"id": "53ee6690-e14a-4e6b-890b-a135100d51c7",
"type": "message",
"role": "assistant",
"model": "deepseek-v4-flash",
"content": [
{
"type": "thinking",
"thinking": "The user is asking about Japan's capital — a basic geography question. The answer is Tokyo, just give it directly.",
"signature": "53ee6690-e14a-4e6b-890b-a135100d51c7"
},
{
"type": "text",
"text": "The capital of Japan is **Tokyo**."
}
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 7,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"output_tokens": 77,
"service_tier": "standard"
}
}https://direct.evolink.ai, which has better support for text models and long-lived connections. https://api.evolink.ai is the primary endpoint for multimodal services and serves as a fallback address for text models.Authorizations
##All APIs require Bearer Token authentication##
Get API Key:
Visit the API Key Management Page to obtain your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEY
Note: Although Anthropic's native API uses the x-api-key header, EvoLink's /v1/messages uniformly uses Bearer Token authentication.
Body
Model to invoke
deepseek-v4-flash: Fast general-purposedeepseek-v4-pro: Deep reasoningdeepseek-v4-flash-vision-exp: Experimental model with image understanding; its text capabilities, parameters, and pricing match Flash
Tip: All three models have thinking enabled by default, and responses always contain a type="thinking" content block; set thinking.type="disabled" explicitly to turn it off. An unspecified or unsupported model is automatically mapped to deepseek-v4-flash.
Image understanding requires deepseek-v4-flash-vision-exp: The other two models do not raise an error for an image block, but replace it with an [Unsupported Image] placeholder and discard the actual image.
Experimental notice: -exp marks an experimental upstream release. The model name and availability may change, so implement a fallback for production use.
deepseek-v4-flash, deepseek-v4-pro, deepseek-v4-flash-vision-exp "deepseek-v4-flash"
Maximum number of tokens to generate (required)
Notes:
- The V4 series can reach up to 384,000
- Tokens produced by thinking also count toward the max_tokens limit
1 <= x <= 3840001024
List of conversation messages, alternating between user / assistant turns
Notes:
- At least one message must be included
- The final message is typically
role=user - The
imagecontent type is supported only bydeepseek-v4-flash-vision-exp;documentis not supported
1Show child attributes
Show child attributes
System prompt, used to define the AI's role and behavior
Notes:
- Accepts a string or an array of strings
- Unlike the
systemmessage on the OpenAI endpoint, the Anthropic endpoint uses a top-levelsystemfield
"You are a helpful assistant."
Sampling temperature
Notes:
- Range
[0.0, 2.0] - Default 1; higher values are more diverse, lower values are more deterministic
0 <= x <= 21
Nucleus sampling threshold
Notes:
- Range
[0, 1] - Do not adjust temperature and top_p simultaneously
0 <= x <= 11
Custom stop sequences
Notes:
- Generation stops when the model encounters any of these strings
- Up to 4 entries (following Anthropic's specification)
4Whether to return via SSE streaming
true: Server-Sent Events streaming returnfalse: Return the complete response all at once (default)
false
Thinking mode control (V4)
Notes:
- Enabled by default on both models (
type=enabled) - When enabled, the response
contentarray includes atype="thinking"reasoning block (billed as output tokens) - Note: The API ignores Anthropic's native
budget_tokensfield; useoutput_config.effortto control depth - In multi-turn conversations, simply place the thinking block from the previous response back into the assistant
contentarray verbatim (the Anthropic protocol is more lenient — missing thinking will not cause an error, but preserving the signature helps context consistency)
Show child attributes
Show child attributes
Output configuration (V4 extension)
Notes: DeepSeek only supports the effort field
Show child attributes
Show child attributes
List of tool definitions
Notes:
- Follows the Anthropic tool definition specification
input_schemauses a JSON Schema object
Show child attributes
Show child attributes
Controls tool-calling behavior
Available types:
auto: Model decides automatically (default when tools are provided)any: Must call some tool (without specifying which)tool: Must call the specifiednamenone: Forbid tool calls
Show child attributes
Show child attributes
Response
Message object
Anthropic-style message response
Unique message ID
Response object type
message assistant Model actually used
"deepseek-v4-pro"
List of response content blocks
Possible block types:
thinking: Reasoning process (only when thinking is enabled)text: Final answer texttool_use: Tool call initiated by the model
Show child attributes
Show child attributes
Stop reason
end_turn: Natural completionmax_tokens: Reached the max_tokens limitstop_sequence: Hit a stop_sequences entrytool_use: Model triggered a tool call
end_turn, max_tokens, stop_sequence, tool_use The specific sequence hit when stop_reason=stop_sequence; otherwise null
Token usage statistics (Anthropic specification)
Show child attributes
Show child attributes