curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-chat",
"messages": [
{
"role": "user",
"content": "Tell me about yourself"
}
]
}
'{
"id": "930c60df-bf64-41c9-a88e-3ec75f81e00e",
"model": "deepseek-chat",
"object": "chat.completion",
"created": 1770617860,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm DeepSeek, a powerful AI assistant. I excel at general conversation, code generation, mathematical reasoning and many other tasks.",
"reasoning_content": "Let me analyze this problem...",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 16,
"completion_tokens": 10,
"total_tokens": 26,
"prompt_cache_hit_tokens": 0,
"prompt_cache_miss_tokens": 16
},
"system_fingerprint": "fp_eaab8d114b_prod0820_fp8_kvcache"
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model"
}
}{
"error": {
"code": 413,
"message": "Request body too large",
"type": "request_too_large_error",
"param": "messages"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error"
}
}DeepSeek - Complete API Reference
- Call DeepSeek models using OpenAI SDK format
- Synchronous processing mode, real-time response
- Supports
deepseek-chat(general conversation) anddeepseek-reasoner(deep reasoning) models - Text Chat: Single or multi-turn contextual conversation
- System Prompts: Customize AI role and behavior
- Streaming: SSE streaming output support
- Tool Calling: Function Calling support
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-chat",
"messages": [
{
"role": "user",
"content": "Tell me about yourself"
}
]
}
'{
"id": "930c60df-bf64-41c9-a88e-3ec75f81e00e",
"model": "deepseek-chat",
"object": "chat.completion",
"created": 1770617860,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm DeepSeek, a powerful AI assistant. I excel at general conversation, code generation, mathematical reasoning and many other tasks.",
"reasoning_content": "Let me analyze this problem...",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 16,
"completion_tokens": 10,
"total_tokens": 26,
"prompt_cache_hit_tokens": 0,
"prompt_cache_miss_tokens": 16
},
"system_fingerprint": "fp_eaab8d114b_prod0820_fp8_kvcache"
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model"
}
}{
"error": {
"code": 413,
"message": "Request body too large",
"type": "request_too_large_error",
"param": "messages"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error"
}
}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 API Key Management Page to get your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
Chat model name
deepseek-chat: General conversation modeldeepseek-reasoner: Deep reasoning model, excels at math, coding and complex logical reasoning
Note: deepseek-reasoner does not support temperature, top_p, tools, tool_choice, response_format parameters. Passing these will be rejected by upstream
deepseek-chat, deepseek-reasoner "deepseek-chat"
Conversation message list, supports multi-turn conversation
Different roles have different field structures, select the corresponding role to view
1- System Message
- User Message
- Assistant Message
- Tool Message
Show child attributes
Show child attributes
Thinking mode control (Beta)
Details:
- Controls the deep thinking feature of
deepseek-reasonermodel - When enabled, the model will perform deep reasoning before responding
Show child attributes
Show child attributes
Frequency penalty parameter to reduce repetitive content
Details:
- Positive values penalize tokens based on their frequency in the generated text
- Higher values make it less likely to repeat existing content
- Default: 0 (no penalty)
-2 <= x <= 20
Maximum number of tokens to generate
Details:
- The model will stop generating when this limit is reached
- If not set, the model decides the generation length
x >= 14096
Presence penalty parameter to encourage new topics
Details:
- Positive values penalize tokens based on whether they have appeared in the text
- Higher values encourage discussing new topics
- Default: 0 (no penalty)
-2 <= x <= 20
Specify response format
Details:
- Set to
{"type": "json_object"}to enable JSON mode - In JSON mode, the model will output valid JSON content
Show child attributes
Show child attributes
Stop sequences. The model will stop generating when encountering these strings
Details:
- Can be a single string or an array of strings
- Maximum 16 stop sequences
Whether to stream the response
true: Stream via SSE (Server-Sent Events), returning content in real-time chunksfalse: Wait for the complete response before returning
false
Streaming response options
Only effective when stream=true
Show child attributes
Show child attributes
Sampling temperature, controls output randomness
Details:
- Lower values (e.g. 0.2): More deterministic, focused output
- Higher values (e.g. 1.5): More random, creative output
- Default: 1
0 <= x <= 21
Nucleus Sampling parameter
Details:
- Controls sampling from tokens whose cumulative probability reaches the threshold
- For example, 0.9 means sampling from tokens reaching 90% cumulative probability
- Default: 1.0 (consider all tokens)
Tip: Avoid adjusting both temperature and top_p simultaneously
0 <= x <= 11
Tool definition list for Function Calling
Details:
- Maximum 128 tool definitions
- Each tool requires a name, description and parameter schema
128Show child attributes
Show child attributes
Controls tool calling behavior
Options:
none: Do not call any toolsauto: Model decides whether to call toolsrequired: Force the model to call one or more tools
Default: none when no tools provided, auto when tools are provided
none, auto, required Whether to return token log probabilities
Details:
- When set to
true, the response will include log probability information for each token
Return log probabilities of the top N most likely tokens
Details:
- Requires
logprobsto be set totrue - Range:
[0, 20]
0 <= x <= 20Response
Chat completion generated successfully
Unique identifier for the chat completion
"930c60df-bf64-41c9-a88e-3ec75f81e00e"
Actual model name used
"deepseek-chat"
Response type
chat.completion "chat.completion"
Creation timestamp
1770617860
List of chat completion choices
Show child attributes
Show child attributes
Token usage statistics
Show child attributes
Show child attributes
System fingerprint identifier
"fp_eaab8d114b_prod0820_fp8_kvcache"