deepseek-v4-flash: Chat completions
curl --request POST \
--url https://api.zerogpu.ai/v1/chat/completions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"model": "deepseek-v4-flash",
"messages": [
{
"role": "system",
"content": "You are a pragmatic staff engineer. Be concise."
},
{
"role": "user",
"content": "Plan the migration of a nightly cron-based ETL job to an event-driven pipeline. 4 steps max."
}
]
}
'import requests
url = "https://api.zerogpu.ai/v1/chat/completions"
payload = {
"model": "deepseek-v4-flash",
"messages": [
{
"role": "system",
"content": "You are a pragmatic staff engineer. Be concise."
},
{
"role": "user",
"content": "Plan the migration of a nightly cron-based ETL job to an event-driven pipeline. 4 steps max."
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'deepseek-v4-flash',
messages: [
{role: 'system', content: 'You are a pragmatic staff engineer. Be concise.'},
{
role: 'user',
content: 'Plan the migration of a nightly cron-based ETL job to an event-driven pipeline. 4 steps max.'
}
]
})
};
fetch('https://api.zerogpu.ai/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));falsepackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zerogpu.ai/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"deepseek-v4-flash\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a pragmatic staff engineer. Be concise.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Plan the migration of a nightly cron-based ETL job to an event-driven pipeline. 4 steps max.\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.zerogpu.ai/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"deepseek-v4-flash\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a pragmatic staff engineer. Be concise.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Plan the migration of a nightly cron-based ETL job to an event-driven pipeline. 4 steps max.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "id-1785523944762",
"object": "chat.completion",
"created": 1785523944,
"model": "deepseek-v4-flash",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "**1. Inventory the job** – Document inputs, outputs, schedule, and every downstream consumer of the cron ETL so nothing breaks silently.\n\n**2. Define the events** – Pick the real trigger (file landing, DB change, message) and publish it to a queue or event bus with a versioned schema.\n\n**3. Run in parallel** – Build the event-driven consumer alongside cron, write to a shadow table, and diff outputs until they match.\n\n**4. Cut over with a rollback path** – Point consumers at the new output, keep cron paused (not deleted) for one cycle, then decommission.",
"reasoning": "Cron ETL to event-driven: inventory the current job first, define the trigger events, run the new pipeline in parallel against a shadow output, then cut over with a rollback path. Four steps, each actionable.",
"tool_calls": []
}
}
],
"usage": {
"prompt_tokens": 52,
"completion_tokens": 158,
"total_tokens": 210
}
}By model
deepseek-v4-flash
Model details for deepseek-v4-flash. Reasoning, coding, and agentic workflows with a 1M-token context window.
POST
/
chat
/
completions
deepseek-v4-flash: Chat completions
curl --request POST \
--url https://api.zerogpu.ai/v1/chat/completions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"model": "deepseek-v4-flash",
"messages": [
{
"role": "system",
"content": "You are a pragmatic staff engineer. Be concise."
},
{
"role": "user",
"content": "Plan the migration of a nightly cron-based ETL job to an event-driven pipeline. 4 steps max."
}
]
}
'import requests
url = "https://api.zerogpu.ai/v1/chat/completions"
payload = {
"model": "deepseek-v4-flash",
"messages": [
{
"role": "system",
"content": "You are a pragmatic staff engineer. Be concise."
},
{
"role": "user",
"content": "Plan the migration of a nightly cron-based ETL job to an event-driven pipeline. 4 steps max."
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'deepseek-v4-flash',
messages: [
{role: 'system', content: 'You are a pragmatic staff engineer. Be concise.'},
{
role: 'user',
content: 'Plan the migration of a nightly cron-based ETL job to an event-driven pipeline. 4 steps max.'
}
]
})
};
fetch('https://api.zerogpu.ai/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));falsepackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zerogpu.ai/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"deepseek-v4-flash\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a pragmatic staff engineer. Be concise.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Plan the migration of a nightly cron-based ETL job to an event-driven pipeline. 4 steps max.\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.zerogpu.ai/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"deepseek-v4-flash\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a pragmatic staff engineer. Be concise.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Plan the migration of a nightly cron-based ETL job to an event-driven pipeline. 4 steps max.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "id-1785523944762",
"object": "chat.completion",
"created": 1785523944,
"model": "deepseek-v4-flash",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "**1. Inventory the job** – Document inputs, outputs, schedule, and every downstream consumer of the cron ETL so nothing breaks silently.\n\n**2. Define the events** – Pick the real trigger (file landing, DB change, message) and publish it to a queue or event bus with a versioned schema.\n\n**3. Run in parallel** – Build the event-driven consumer alongside cron, write to a shadow table, and diff outputs until they match.\n\n**4. Cut over with a rollback path** – Point consumers at the new output, keep cron paused (not deleted) for one cycle, then decommission.",
"reasoning": "Cron ETL to event-driven: inventory the current job first, define the trigger events, run the new pipeline in parallel against a shadow output, then cut over with a rollback path. Four steps, each actionable.",
"tool_calls": []
}
}
],
"usage": {
"prompt_tokens": 52,
"completion_tokens": 158,
"total_tokens": 210
}
}This model supports the Chat Completions API only. Send requests to
/v1/chat/completions — the Responses endpoint (/v1/responses) is not
available for this model.DeepSeek’s DeepSeek-V4-Flash is an open-weight Mixture-of-Experts model built for efficient reasoning, coding, and agentic workflows, with 284B total parameters activating only 13B per token, served on ZeroGPU for general text generation. It sustains a 1,048,576-token (1M) context well suited for analyzing large codebases, long documents, extensive conversations, and complex research tasks, and supports fast non-thinking responses as well as higher-effort reasoning modes for planning, problem-solving, and multi-step automation. MIT-licensed with no usage restrictions.References: Model docs • Terms • Privacy
Authorizations
Headers
Optional project identifier. Scopes the request to a specific project when provided.
Body
application/json
Model identifier (fixed for this playground). Use request examples to change use cases.
Allowed value:
"deepseek-v4-flash"Example:
"deepseek-v4-flash"
Maximum number of tokens to generate in the response.
Required range:
x >= 1Example:
800
Response
Success
The response is of type object.

