Skip to main content
POST
Responses: DeepSeek V4 Flash text generation (with chained explicit cache)
오른쪽의 플레이그라운드를 사용해 바로 테스트하십시오: Bearer sk-your-api-keyAuthorization에 넣으십시오. 기본 예제에는 이미 caching: {"type": "enabled"}store: true가 포함되어 있습니다 — 연결된 명시적 캐싱을 위한 첫 호출 쓰기 형식입니다.
Responses는 Chat Completions 위에 명시적 캐시 계층을 추가합니다. 기능, 과금 및 추론 제어는 DeepSeek V4 Flash 개요를 참조하십시오.
  • text.format json_schema는 영향이 없습니다: 스키마를 무시한 채 200을 반환하며, 3/3 응답이 코드 펜스로 감싸져 파싱에 실패했습니다
  • web_search 백엔드는 사용할 수 없습니다: 도구는 연결되어 있지만 (web_search_call 항목이 status: completed와 함께 나타남) 6/6 검색이 오류로 종료되어 results을 반환하지 않았습니다
  • mcpAccessDenied를 반환합니다: 계정/채널 수준의 내장 도구 권한입니다 — 유효한 서버 URL을 사용해도 같은 결과가 나옵니다
  • 텍스트 전용 모델 — 이미지를 전달하면 Model do not support image input을 반환합니다

매개변수 빠른 참조

명시적 캐시: 체인이 필요합니다

흔한 실수: caching가 설정된 상태에서 같은 긴 접두사를 두 번 다시 보내면 cached_tokens가 0으로 남습니다. 명시적 캐시는 접두사 일치 방식이 아닙니다. previous_response_id로 세션을 체인해야 합니다.
올바른 패턴은 첫 번째 호출에서 전체 문서를 보내 캐시를 기록한 다음, 이전 id를 체인하면서 새 질문만 보내는 것입니다. 각 라운드는 이전의 전체 컨텍스트를 적중합니다. 긴 문서에 대해 후속 질문을 할 때는 매 턴 전체 텍스트를 다시 보내는 것보다 훨씬 저렴합니다.

체인된 호출 예시

암시적 캐시

caching 없이도 암시적 캐시는 계속 적용됩니다. 동일한 긴 접두부를 반복하면 캐시 적중률은 99.9%입니다(15,633 → 15,616). 상황에 맞게 선택하십시오 — 여러 개의 독립적인 요청에 걸쳐 하나의 접두부를 재사용하는 경우에는 암시적 캐시가 적합하고, 하나의 세션에서 연속적인 후속 질문을 주고받는 경우에는 연결된 명시적 캐싱이 적합합니다.

출력 항목 유형

응답 output는 다음 항목을 포함할 수 있는 배열입니다:

인증

Authorization
string
header
필수

API Key obtained from the APIYI console

본문

application/json
model
enum<string>
기본값:deepseek-v4-flash-ga-260731
필수

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

사용 가능한 옵션:
deepseek-v4-flash-ga-260731
input
필수

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

max_output_tokens
integer
기본값:500

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

필수 범위: x <= 393216
store
boolean
기본값: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
기본값: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

응답

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