Skip to main content
POST
Responses: DeepSeek V4 Flash text generation (with chained explicit cache)
Use the playground on the right to test directly: put Bearer sk-your-api-key in Authorization. The default example already carries caching: {"type": "enabled"} and store: true — the first-call write shape for chained explicit caching.
Responses adds an explicit cache layer over Chat Completions. For capabilities, pricing and thinking control, see the DeepSeek V4 Flash overview.
  • text.format json_schema has no effect: returns 200 while ignoring the schema; 3/3 responses were wrapped in code fences and failed to parse
  • web_search backend is unusable: the tool is wired (web_search_call items appear with status: completed) but 6/6 searches errored and returned no results
  • mcp returns AccessDenied: an account/channel-level built-in-tool entitlement — a valid server URL gives the same result
  • Text-only model — passing images returns Model do not support image input

Parameter Quick Reference

Explicit Cache: Chaining Is Required

Common mistake: resending the same long prefix twice with caching set leaves cached_tokens at 0. The explicit cache is not prefix-matched — you must chain the session with previous_response_id.
The correct pattern: send the full document on the first call to write the cache, then send only the new question while chaining the previous id. Each round hits the entire prior context. For follow-up questions over a long document, this is far cheaper than resending the full text every turn.

Chained Call Example

Implicit Cache

Without caching, the implicit cache still applies: repeating an identical long prefix hit 99.9% (15,633 → 15,616). Choose per scenario — one prefix reused across many independent requests suits the implicit cache, while one session with successive follow-ups suits chained explicit caching.

Output Item Types

The response output is an array that may contain these items:

Authorizations

Authorization
string
header
required

API Key obtained from the APIYI console

Body

application/json
model
enum<string>
default:deepseek-v4-flash-ga-260731
required

Model ID, fixed to deepseek-v4-flash-ga-260731

Available options:
deepseek-v4-flash-ga-260731
input
required

Input content. Either a string or a standard OpenAI Responses message array. Text only — no images

max_output_tokens
integer
default:500

Max output tokens, hard ceiling 393,216. Reasoning counts toward this

Required range: x <= 393216
store
boolean
default:true

Whether to store this response. Must be true to chain with previous_response_id

previous_response_id
string

The id of the previous response. Combined with caching, this hits the explicit cache in full

caching
object

Explicit cache switch. Pass {"type": "enabled"} on the first call to write, then chain with previous_response_id to hit

reasoning
object

Reasoning control. Measured: effort=minimal always yields 0 reasoning tokens; the other tiers do not form a monotonic ladder

stream
boolean
default:false

Stream the response over SSE. Measured TTFB around 2.3 seconds

tools
object[]

Tool list. The function type works; web_search is wired but its backend errors, and mcp returns AccessDenied

Response

Generation succeeded

id
string

Response ID, used as the next call's previous_response_id

model
string
output
object[]

Output item array. May contain reasoning / message / function_call / web_search_call items

caching
object

Explicit cache status echo

usage
object

Usage. input_tokens_details.cached_tokens is the cache hit; output_tokens_details.reasoning_tokens is reasoning spend