curl --request POST \
--url https://api.apiyi.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4-flash-ga-260731",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence"
}
]
}
'import requests
url = "https://api.apiyi.com/v1/chat/completions"
payload = {
"model": "deepseek-v4-flash-ga-260731",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'deepseek-v4-flash-ga-260731',
messages: [{role: 'user', content: 'Introduce yourself in one sentence'}]
})
};
fetch('https://api.apiyi.com/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.apiyi.com/v1/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'deepseek-v4-flash-ga-260731',
'messages' => [
[
'role' => 'user',
'content' => 'Introduce yourself in one sentence'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apiyi.com/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"deepseek-v4-flash-ga-260731\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.apiyi.com/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"deepseek-v4-flash-ga-260731\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"deepseek-v4-flash-ga-260731\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model": "<string>",
"choices": [
{}
],
"usage": {}
}DeepSeek V4 Flash Chat API 레퍼런스
DeepSeek V4 Flash GA (deepseek-v4-flash-ga-260731) Chat Completions API 레퍼런스 및 플레이그라운드: OpenAI 호환, 1M 컨텍스트, thinking 토글 및 암시적 캐싱.
curl --request POST \
--url https://api.apiyi.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4-flash-ga-260731",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence"
}
]
}
'import requests
url = "https://api.apiyi.com/v1/chat/completions"
payload = {
"model": "deepseek-v4-flash-ga-260731",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'deepseek-v4-flash-ga-260731',
messages: [{role: 'user', content: 'Introduce yourself in one sentence'}]
})
};
fetch('https://api.apiyi.com/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.apiyi.com/v1/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'deepseek-v4-flash-ga-260731',
'messages' => [
[
'role' => 'user',
'content' => 'Introduce yourself in one sentence'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apiyi.com/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"deepseek-v4-flash-ga-260731\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.apiyi.com/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"deepseek-v4-flash-ga-260731\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"deepseek-v4-flash-ga-260731\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model": "<string>",
"choices": [
{}
],
"usage": {}
}Bearer sk-your-api-key를
Authorization에 넣으십시오. 기본 예시에서는 이미 심층 추론을 비활성화합니다
(thinking.disabled), 따라서 전송 시 빠른 응답을 받습니다."thinking": {"type": "disabled"}를 유지하십시오.
기능, 과금 및 캐싱에 대해서는
DeepSeek V4 Flash 개요를 참고하십시오.- 추론이 켜져 있을 때는
max_tokens에 여유를 두십시오(추론은 출력 쿼터에 포함됩니다) — 3000+를 권장합니다 response_format는 영향을 주지 않습니다:json_schema를 전달하면 스키마를 완전히 무시한 채 200을 반환합니다. 구조화된 출력에는tools를 사용하십시오n는 조용히 무시됩니다:n=2를 전달하면choices에 정확히 하나의 요소가 들어 있는 상태로 200을 반환합니다- 텍스트 전용 모델 — 이미지 콘텐츠 블록을 전달하면
Model do not support image input를 반환합니다
매개변수 빠른 참조
| 매개변수 | 유형 | 필수 | 기본값 | 비고 |
|---|---|---|---|---|
model | string | ✓ | — | deepseek-v4-flash-ga-260731로 고정됨 |
messages | array | ✓ | — | 표준 OpenAI 메시지 배열, 텍스트만 |
max_tokens | int | — | 출력 쿼터, 하드 상한 393,216; 추론이 켜져 있을 때는 3000+ | |
thinking.type | string | enabled | disabled는 추론을 확실하게 끕니다; auto도 지원됩니다 | |
reasoning_effort | string | — | minimal만 결정적입니다(추론 token 0개); low/medium/high/max는 단조적이지 않으므로, 개요를 참고하십시오 | |
stream | bool | false | SSE 스트리밍; 사용량을 위해 stream_options.include_usage와 함께 사용하십시오 | |
temperature / top_p | number | — | 샘플링 매개변수이며, 둘 다 유효합니다 | |
stop | array | — | 정지 시퀀스, 잘리는 것이 검증되었습니다 | |
seed / logprobs | — | — | 둘 다 유효합니다 | |
tools | array | — | 함수 호출 — 도구 인수는 실제로 제한됩니다 |
컨텍스트 및 출력 상한
| 항목 | 하드 상한 | 발생한 오류 |
|---|---|---|
| 입력 | 1,048,570 token | Input length ... exceeds the maximum length 1048570 |
출력 max_tokens | 393,216 | integer above maximum value, expected a value <= 393216 |
암시적 캐시
추가 매개변수는 필요 없습니다 — 동일한 긴 접두사는 두 번째 요청에서 적중합니다:| Round | prompt_tokens | cached_tokens | 적중률 |
|---|---|---|---|
| 1 | 15,634 | 0 | — |
| 2 | 15,634 | 15,616 | 99.9% |
| 3 | 15,634 | 15,616 | 99.9% |
구조화된 출력이 필요하십니까? 도구를 사용하십시오
{
"model": "deepseek-v4-flash-ga-260731",
"messages": [{"role": "user", "content": "Beijing is 25 degrees today"}],
"tools": [{
"type": "function",
"function": {
"name": "submit_result",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string"},
"temp_c": {"type": "number"}
},
"required": ["city", "temp_c"]
}
}
}]
}
choices[0].message.tool_calls[0].function.arguments에서 JSON 문자열을 사용하십시오 — 안정적으로 파싱됩니다.인증
API Key obtained from the APIYI console
본문
Model ID, fixed to deepseek-v4-flash-ga-260731
deepseek-v4-flash-ga-260731 Message array in standard OpenAI format. Text only — image content blocks are not supported
Show child attributes
Show child attributes
Max output tokens, hard ceiling 393,216. Reasoning counts toward this when thinking is on
x <= 393216Deep thinking switch. Passing {"type": "disabled"} saved 200+ reasoning tokens on simple tasks in our tests
Show child attributes
Show child attributes
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
minimal, low, medium, high, max Stream the response over SSE. Pair with stream_options.include_usage to get usage at the end
Sampling temperature
Nucleus sampling threshold
Stop sequences, verified to truncate correctly
Random seed
Return token log probabilities, verified to be populated
Function Call tool list in standard OpenAI format. Tool arguments are genuinely constrained — use this instead of response_format when you need structured output
응답
Completion succeeded
이 페이지가 도움이 되었나요?