Introduction
DeepSeek V4 Flash is DeepSeek's high-throughput long-context model, served here on one OpenAI-compatible endpoint at /v1/chat/completions. A request takes up to 1,048,576 input tokens across at most 256 messages and returns up to 65,536, with reasoning effort that defaults to high.
Message content is text only. Up to 128 tools with tool_choice, JSON output through response_format and SSE streaming all ride on the same call, and billing splits input, cached input and output tokens.
Key features & highlights
A cheap pass and a careful pass on one body
reasoning_effort defaults to high, and low is the setting to point at volume passes. Moving between them costs one string in the same body, so a first sweep over a thousand records and a second look at the forty that looked wrong are the same integration.
Read a repository, return a finding
The window holds 1,048,576 tokens while one reply reaches 65,536. That ratio is the shape of the work: put the whole service in and ask for a review, a ranked list of findings or a targeted patch, not a rewrite of everything you sent.
JSON when you ask for it
Set response_format to json_object and name every field in the system message, and the same shape comes back on every run. Your application still parses and validates what it receives before acting on it.
Request parameters
| Parameter | Required | Description |
|---|---|---|
messages | Yes | Ordered turns, oldest first, at most 256. Text content only; |
reasoning_effort | No | none, low or high, high by default. none skips the reasoning pass entirely, which is the only way to keep reasoning tokens off your bill — they are charged as output. |
stop | No | Up to 4 sequences, as a string or an array. The reply ends as soon as the model writes one of them, and the matched text itself is left out. at least 1 characters · at least 1 items · at most 4 items |
max_tokens | No | Caps the reply at 65,536. The default is 32,768, which truncates a long deliverable silently. |
tools | No | Up to 128 function definitions in one request. at most 128 items |
tool_choice | No | auto, none, required, or an object naming one function. |
response_format | No | Ask for a JSON object when the reply feeds a parser rather than a person. |
Pricing
Input $0.44 / Output $1.32 per 1 million tokens
Use cases
Whole-repository review
Send the service, its tests and the relevant specification together and require every finding to name a file, a line and the behaviour it affects. With the whole codebase in context, a finding can point at a caller two packages away instead of guessing.
Contract sets into JSON
Send a stack of agreements with response_format set to json_object and load the parsed clauses straight into a table. Name the fields in the system message and keep the effort at low for the bulk pass.
Draft cheaply, then re-run the hard cases
Run the whole queue at low, flag the records whose output failed your checks and resend only those at high with the same message array. The effort field is then the only thing that changed between the two answers.
Prompt guide & pro tips
Make one OpenAI-shaped call
POST https://api.spicyapi.ai/v1/chat/completions with {"model": "deepseek/v4-flash", "messages": [{"role": "system", "content": "You review Go services. Report only defects you can point to by file and line."}, {"role": "user", "content": "<the whole service>"}], "reasoning_effort": "high", "max_tokens": 8000}. Add "stream": true to read tokens as they arrive.
Size max_tokens for the deliverable
The default of 32,768 truncates a long deliverable without an error, and the ceiling is 65,536. Reasoning tokens are billed as output too, so leave headroom above the visible answer you expect.
What the schema rejects
image_url and file parts are rejected before the request is priced, reasoning_content is accepted on assistant messages only, and the 1,048,576-token window counts every message, including the system prompt and earlier tool results. On cache hits this endpoint is not cheaper than DeepSeek's own price, so compare before building on a long prompt you replay again and again.
API quick start
curl --fail-with-body -sN https://api.spicyapi.ai/v1/chat/completions \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "deepseek/v4-flash/chat",
"messages": [
{
"role": "user",
"content": "Summarise the following release notes into three bullet points."
}
],
"stream": true
}' \
| jq --unbuffered -Rrj 'select(startswith("data: ")) | .[6:] | select(. != "[DONE]") | fromjson | if .error then "\n[error] \(.error.message)\n" else (.choices[0].delta.content? // empty) end'
See the API reference for authentication, the complete schema, polling, and error handling.









