DeepSeek V4 Pro 0813 quietly released

Aug 12, 2026 11:37 PM - 1 hour ago 3

To meet the request for Codex, our API now supports the Responses API format, pinch the base_url being https://api.deepseek.com.

With a elemental configuration, you tin usage DeepSeek models successful Codex.

Integrating DeepSeek Models into Codex​

Please mention to Integrate pinch Codex.

Calling DeepSeek Models via the Responses API​


from openai import OpenAI

client = OpenAI(api_key="<your DeepSeek API Key>", base_url="https://api.deepseek.com")

response = client.responses.create(
model="deepseek-v4-flash",
instructions="You are a adjuvant assistant.",
input="Hi, really are you?",
)

print(response.output_text)

Streaming​

Set stream: existent to person the consequence arsenic a series of semantic server-sent events (SSE). Each arena carries an arena section indicating the arena type, and a monotonically expanding sequence_number. The watercourse ends pinch a response.completed / response.incomplete / response.failed arena — location is nary data: [DONE] message.

stream = client.responses.create(
model="deepseek-v4-flash",
instructions="You are a adjuvant assistant.",
input="Hi, really are you?",
stream=True,
)

for arena in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="")

The afloat database of events:

EventDescription
response.createdThe first event; the consequence has been created pinch position in_progress
response.in_progressThe consequence is being generated
response.output_item.added / response.output_item.doneAn output point (reasoning / connection / function_call / custom_tool_call / web_search_call) starts / completes
response.content_part.added / response.content_part.doneA contented portion wrong an output point starts / completes
response.reasoning_text.delta / response.reasoning_text.doneIncremental chain-of-thought matter / the afloat chain-of-thought text
response.output_text.delta / response.output_text.doneIncremental output matter / the afloat output text
response.function_call_arguments.delta / response.function_call_arguments.doneIncremental usability telephone arguments / the afloat arguments
response.custom_tool_call_input.delta / response.custom_tool_call_input.doneIncremental civilization instrumentality telephone (apply_patch) input / the afloat input
response.web_search_call.in_progress / response.web_search_call.searching / response.web_search_call.completedStatus updates of a server-side web hunt instrumentality call
response.completedThe last arena erstwhile the consequence completes normally, carrying the afloat consequence entity including usage
response.incompleteThe last arena erstwhile the consequence is truncated (e.g. reaching max_output_tokens), carrying the afloat consequence object
response.failedThe last arena erstwhile the consequence fails, carrying the afloat consequence entity pinch correction details

Compatibility Details​

This conception lists the compatibility specifications of the DeepSeek API pinch the Responses API. For the afloat Responses API format definition, please mention to the official OpenAI API reference.

Top-level Request Parameters​

ParameterSupport Status
modelSupported. deepseek-v4-flash / deepseek-v4-pro, spot Models & Pricing
inputSupported. String aliases input point list; astatine slightest 1 of input and instructions is required
instructionsSupported. Inserted arsenic the first strategy message
streamSupported
temperatureSupported (range [0.0, 2.0]; nary effect successful reasoning mode)
top_pSupported (no effect successful reasoning mode)
max_output_tokensSupported
top_logprobsSupported (range [0, 20])
toolsPartially supported. usability / web_search supported; different types ignored, spot the Tools array below
tool_choiceSupported. nary / car / required / a circumstantial instrumentality ({"type": "function", "name": ...} aliases {"type": "web_search"} / {"type": "web_search_2025_08_26"})
reasoningPartially supported. effort supported; summary accepted but nary summary is generated
textPartially supported. format afloat supported; verbosity accepted but has nary effect
userSupported. See Rate Limit & Isolation
parallel_tool_callsIgnored (parallel instrumentality calling is ever enabled)
max_tool_callsIgnored
previous_response_idNot supported (stateless API)
conversationNot supported (stateless API)
storeNot supported. The consequence ever carries store: false
backgroundNot supported
metadataNot supported
includeNot supported
promptNot supported
truncationNot supported. Requests exceeding the discourse model return a 400 error
service_tierNot supported
safety_identifierNot supported
prompt_cache_key / prompt_cache_retentionNot supported. Context caching is managed automatically, spot Context Caching
context_managementNot supported
stream_optionsNot supported

Unsupported parameters are silently ignored and do not origin errors, truthful existing Responses API clients tin link without modification.

Input Items​

TypeSupport Status
messageSupported. Roles personification / adjunct / strategy / developer (developer is treated arsenic system); contented supports strings and input_text / output_text contented parts. Image and record inputs are not supported (input_image parts do not origin an error, but are replaced pinch a placeholder text)
function_callSupported. Merged into the adjacent adjunct message
function_call_outputSupported
reasoningSupported. Plain-text contented is merged into the adjacent adjunct message; summary and encrypted_content are not supported
web_search_callSupported. Pass backmost as-is; the server automatically restores the hunt results
Other typesIgnored

Tools​

TypeSupport Status
functionSupported
web_search / web_search_2025_08_26Supported, executed connected the server side. search_context_size and user_location are ignored
customOnly {"type": "custom", "name": "apply_patch"} is supported (for Codex compatibility); different names return a 400 error
file_search / code_interpreter / computer_use / mcp / different built-in toolsIgnored

Response Fields​

The consequence entity is compatible pinch the OpenAI Responses API consequence structure. Fields that dangle connected unsupported capabilities ever return fixed values (e.g. store: false, previous_response_id: null, parallel_tool_calls: true).

Token usage is returned successful usage:

  • input_tokens: number of input tokens, wherever input_tokens_details.cached_tokens is the number of tokens hitting the context cache
  • output_tokens: number of output tokens, wherever output_tokens_details.reasoning_tokens is the number of chain-of-thought tokens
More