Skip to main content
POST
Chat completion: DeepSeek V4 Flash text generation
Use the playground on the right to test directly: put Bearer sk-your-api-key in Authorization. The default example already disables deep thinking (thinking.disabled), so you get a fast response on send.
This model thinks a lot by default — even a one-line question emits hundreds of reasoning tokens first. Keep "thinking": {"type": "disabled"} from the example while debugging. For capabilities, pricing and caching, see the DeepSeek V4 Flash overview.
  • When thinking is on, give max_tokens room (reasoning counts toward the output quota) — 3000+ recommended
  • response_format has no effect: passing json_schema returns 200 while ignoring the schema entirely. Use tools for structured output
  • n is silently ignored: passing n=2 returns 200 with exactly one element in choices
  • Text-only model — passing image content blocks returns Model do not support image input

Parameter Quick Reference

Context and Output Ceilings

A 322,055-token input returned in 14.77 seconds with the mid-document needle retrieved correctly.

Implicit Cache

No parameters needed — an identical long prefix hits on the second request: Cached tokens bill at $0.028 per million. Keep timestamps, random IDs and other variable content at the end of the prompt — mixing them into the prefix drops the hit rate to zero.

Need Structured Output? Use tools

Take the JSON string from choices[0].message.tool_calls[0].function.arguments — it parses reliably.

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
messages
object[]
required

Message array in standard OpenAI format. Text only — image content blocks are not supported

max_tokens
integer
default:500

Max output tokens, hard ceiling 393,216. Reasoning counts toward this when thinking is on

Required range: x <= 393216
thinking
object

Deep thinking switch. Passing {"type": "disabled"} saved 200+ reasoning tokens on simple tasks in our tests

reasoning_effort
enum<string>

Reasoning depth tier. Only minimal is deterministic (reasoning tokens always 0); low/medium/high/max do not form a monotonic ladder, and within-tier variance exceeds between-tier differences

Available options:
minimal,
low,
medium,
high,
max
stream
boolean
default:false

Stream the response over SSE. Pair with stream_options.include_usage to get usage at the end

temperature
number

Sampling temperature

top_p
number

Nucleus sampling threshold

stop
string[]

Stop sequences, verified to truncate correctly

seed
integer

Random seed

logprobs
boolean

Return token log probabilities, verified to be populated

tools
object[]

Function Call tool list in standard OpenAI format. Tool arguments are genuinely constrained — use this instead of response_format when you need structured output

Response

Completion succeeded

id
string

Request ID

model
string
choices
object[]

Completion results. Besides content, message carries reasoning_content when thinking is on

usage
object

Usage. completion_tokens_details.reasoning_tokens is reasoning spend; prompt_tokens_details.cached_tokens is the implicit cache hit