curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4-flash",
"input": "Introduce Hangzhou in one sentence."
}
'{
"id": "resp_9f2c1a4b8e7d",
"object": "response",
"created_at": 1755000000,
"status": "completed",
"model": "deepseek-v4-flash",
"output": [
{
"id": "rs_2b7f",
"type": "reasoning",
"summary": [],
"content": [
{
"type": "reasoning_text",
"text": "The user wants a one-sentence introduction covering both geography and culture."
}
]
},
{
"id": "msg_5d1a",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "Hangzhou is the capital of Zhejiang Province, known for West Lake and its digital economy.",
"annotations": []
}
]
}
],
"error": null,
"incomplete_details": null,
"usage": {
"input_tokens": 694,
"input_tokens_details": {
"cached_tokens": 640
},
"output_tokens": 20,
"output_tokens_details": {
"reasoning_tokens": 10
},
"total_tokens": 714
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid authentication credentials",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota"
}
}{
"error": {
"code": 403,
"message": "Model access denied",
"type": "permission_error"
}
}{
"error": {
"code": 404,
"message": "Model not found",
"type": "not_found_error"
}
}{
"error": {
"code": 413,
"message": "Request entity too large",
"type": "invalid_request_error"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"code": 502,
"message": "Bad gateway",
"type": "server_error"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "server_error"
}
}DeepSeek V4 - Responses API
- Call DeepSeek V4 models using the OpenAI Responses protocol
- Supported models:
deepseek-v4.1-flash/deepseek-v4-flash/deepseek-v4-pro/deepseek-v4-flash-vision-exp - Input shapes:
inputcan be plain text or an array of input items (message, function call, function result, reasoning, search record) - Image understanding:
deepseek-v4.1-flash/deepseek-v4-flash-vision-expacceptsinput_imagecontent blocks insidecontentand supports multiple images - System instructions: provided via
instructions, equivalent to a leading system message - Thinking mode: controlled by
reasoning.effort; thinking content is returned as areasoningoutput item - Streaming: semantic SSE events ending with
response.completed; no[DONE]is sent - Tool calling: supports Function Calling and the built-in
web_searchtool - Structured output: enabled via
text.formatfor JSON object or JSON Schema - Context caching: requests sharing a prefix hit the cache automatically, greatly reducing input cost
Streaming events: response.created, response.output_item.added, response.reasoning_text.delta, response.output_text.delta, with terminal events response.completed / response.incomplete / response.failed. Every event carries a sequence_number for ordering.
Fields with no effect: the following OpenAI fields can be sent without error, but produce no actual effect.
| Field | Behavior |
|---|---|
store | Always false; responses are not stored |
previous_response_id | Always null; resuming a conversation is not supported |
conversation | Not supported |
background / metadata / include | Ignored |
prompt / truncation / service_tier | Ignored |
safety_identifier / context_management | Ignored |
stream_options | Ignored |
prompt_cache_key / prompt_cache_retention | Ignored |
parallel_tool_calls | Ignored; parallel tool calls are always enabled |
max_tool_calls | Ignored |
file_search / code_interpreter / mcp tools | Ignored |
Other limitations:
- Custom tools (
type: custom) supportapply_patchonly - The
web_searchtool ignoressearch_context_sizeanduser_location - File content blocks are converted to placeholder text; images are supported only by
deepseek-v4.1-flash/deepseek-v4-flash-vision-expand are likewise converted to placeholders when sent to the other two models - Images may appear only in messages with
role: user; placing one insystemorassistantreturns HTTP 400 - Input exceeding the context window returns 400 directly, with no automatic truncation
curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4-flash",
"input": "Introduce Hangzhou in one sentence."
}
'{
"id": "resp_9f2c1a4b8e7d",
"object": "response",
"created_at": 1755000000,
"status": "completed",
"model": "deepseek-v4-flash",
"output": [
{
"id": "rs_2b7f",
"type": "reasoning",
"summary": [],
"content": [
{
"type": "reasoning_text",
"text": "The user wants a one-sentence introduction covering both geography and culture."
}
]
},
{
"id": "msg_5d1a",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "Hangzhou is the capital of Zhejiang Province, known for West Lake and its digital economy.",
"annotations": []
}
]
}
],
"error": null,
"incomplete_details": null,
"usage": {
"input_tokens": 694,
"input_tokens_details": {
"cached_tokens": 640
},
"output_tokens": 20,
"output_tokens_details": {
"reasoning_tokens": 10
},
"total_tokens": 714
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid authentication credentials",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota"
}
}{
"error": {
"code": 403,
"message": "Model access denied",
"type": "permission_error"
}
}{
"error": {
"code": 404,
"message": "Model not found",
"type": "not_found_error"
}
}{
"error": {
"code": 413,
"message": "Request entity too large",
"type": "invalid_request_error"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"code": 502,
"message": "Bad gateway",
"type": "server_error"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "server_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 the API Key Management Page to obtain your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
Model ID
deepseek-v4.1-flash: DeepSeek V4.1 Flash with text and native image understanding, 1M context and up to 384K output tokensdeepseek-v4-flash: fast and general-purpose, suited to everyday chat, summarization and extractiondeepseek-v4-pro: deep reasoning, suited to complex math, code and multi-step planningdeepseek-v4-flash-vision-exp: Legacy model name, now routed to DeepSeek V4.1 Flash; usedeepseek-v4.1-flashfor new integrations
Image understanding requires deepseek-v4.1-flash / deepseek-v4-flash-vision-exp: The other two models do not raise an error for input_image, but replace it with placeholder text and discard the actual image. The request is still billed.
deepseek-v4-flash, deepseek-v4-pro, deepseek-v4-flash-vision-exp, deepseek-v4.1-flash "deepseek-v4-flash"
Model input. At least one of input and instructions must be provided.
- String form: the whole text is treated as a single
usermessage - Array form: a list of input items supporting five types —
message,function_call,function_call_output,reasoning,web_search_call
Image input: With deepseek-v4.1-flash / deepseek-v4-flash-vision-exp, a message item may mix input_text and input_image blocks in its content array.
Multi-turn conversations: the endpoint is stateless, so continuing a conversation requires putting the full history into the array.
"Introduce Hangzhou in one sentence."
System-level instructions, equivalent to a system message inserted at the very front; used to set the role, tone and output constraints.
"You are a meticulous technical writer. Keep answers concise."
Whether to stream the response
false(default): returns the complete response object at oncetrue: pushes semantic SSE events; the final event isresponse.completed/response.incomplete/response.failed, and no[DONE]is sent
false
Maximum number of output tokens for this generation (including thinking tokens). Range 1 to 393216 (384K). Leave empty to let the model decide.
1 <= x <= 3932164096
Sampling temperature; higher values make output more random. Has no effect in thinking mode.
0 <= x <= 21
Nucleus sampling threshold. Adjust either this or temperature, not both. Has no effect in thinking mode.
x <= 11
Return the most likely candidate tokens and their log probabilities at each position.
0 <= x <= 200
Thinking mode configuration. DeepSeek V4 enables thinking by default; thinking content is returned as a reasoning output item, and its tokens count toward output and are billed at the output rate.
Show child attributes
Show child attributes
Text output format configuration.
Show child attributes
Show child attributes
List of tools available to the model. Function tools are executed by the client, which returns the result as function_call_output; web_search is executed directly server-side with no client involvement.
Show child attributes
Show child attributes
Tool choice strategy
none: tool calling disabledauto(default): the model decidesrequired: at least one tool must be called{"type": "function", "name": "get_weather"}: force a specific function{"type": "web_search"}: force a web search
"auto"
Response
Generation successful
Response object of the Responses endpoint.
Unique identifier of this response
"resp_9f2c1a4b8e7d"
Object type, always response
"response"
Creation time as a Unix timestamp (seconds)
1755000000
Response status
completed: finished normallyin_progress: still generatingincomplete: truncated, e.g. by length; seeincomplete_detailsfailed: generation failed; seeerror
in_progress, completed, incomplete, failed "completed"
ID of the model that actually generated this response
"deepseek-v4-flash"
List of output items in generation order. Fields per type:
reasoning: the thinking process, withid,status,content(list ofreasoning_textblocks) andsummarymessage: the final answer, withid,status,roleandcontent(list ofoutput_textblocks)function_call: a function call from the model, withid,status,call_id,nameandarguments; the client executes it and returns the result asfunction_call_outputweb_search_call: a web search record executed server-side, withid,statusandaction(describing the search performed)
Failure reason; null on success
Truncation reason; null when not truncated
Token usage statistics (including cache and reasoning breakdowns)
Show child attributes
Show child attributes