Skip to content

Commit 5414836

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-1003: docs: add deepseek-v4-pro and -flash
1 parent 0bc294c commit 5414836

8 files changed

Lines changed: 314 additions & 2 deletions

File tree

‎docs/SUMMARY.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
* [DeepSeek V3.2 Exp Non-thinking](api-references/text-models-llm/deepseek/deepseek-reasoner-v3.2-exp-non-thinking.md)
7878
* [DeepSeek V3.2 Exp Thinking](api-references/text-models-llm/deepseek/deepseek-reasoner-v3.2-exp-thinking.md)
7979
* [DeepSeek V3.2 Speciale](api-references/text-models-llm/deepseek/deepseek-v3.2-speciale.md)
80+
* [DeepSeek V4 Pro](api-references/text-models-llm/deepseek/deepseek-v4-pro.md)
81+
* [DeepSeek V4 Flash](api-references/text-models-llm/deepseek/deepseek-v4-flash.md)
8082
* [Google](api-references/text-models-llm/Google/README.md)
8183
* [gemini-2.0-flash](api-references/text-models-llm/google/gemini-2.0-flash.md)
8284
* [gemini-2.5-flash-lite-preview](api-references/text-models-llm/google/gemini-2.5-flash-lite-preview.md)

‎docs/api-references/model-database.md‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎docs/api-references/text-models-llm/README.md‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# DeepSeek V4 Flash
2+
3+
{% columns %}
4+
{% column width="66.66666666666666%" %}
5+
{% hint style="info" %}
6+
This documentation is valid for the following list of our models:
7+
8+
* `deepseek/deepseek-v4-flash`
9+
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
<a href="https://aimlapi.com/app/deepseek/deepseek-v4-flash" class="button primary">Try in Playground</a>
14+
{% endcolumn %}
15+
{% endcolumns %}
16+
17+
## Model Overview
18+
19+
A fast and cost-efficient language model built for chat and completions. A lighter and faster version of [DeepSeek V4 Pro](deepseek-v4-pro.md), it supports up to 1M context length and offers both thinking and non-thinking modes for scalable, low-latency workloads.
20+
21+
{% hint style="success" %}
22+
[Create AI/ML API Key](https://aimlapi.com/app/keys)
23+
{% endhint %}
24+
25+
<details>
26+
27+
<summary>How to make the first API call</summary>
28+
29+
**1️⃣ Required setup (don’t skip this)**\
30+
▪ **Create an account:** Sign up on the AI/ML API website (if you don’t have one yet).\
31+
▪ **Generate an API key:** In your account dashboard, create an API key and make sure it’s **enabled** in the UI.
32+
33+
**2️ Copy the code example**\
34+
At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project.
35+
36+
**3️ Update the snippet for your use case**\
37+
▪ **Insert your API key:** replace `<YOUR_AIMLAPI_KEY>` with your real AI/ML API key.\
38+
▪ **Select a model:** set the `model` field to the model you want to call.\
39+
▪ **Provide input:** fill in the request input field(s) shown in the example (for example, `messages` for chat/LLM models, or other inputs for image/video/audio models).
40+
41+
**4️ (Optional) Tune the request**\
42+
Depending on the model type, you can add optional parameters to control the output (e.g., generation settings, quality, length, etc.). See the API schema below for the full list.
43+
44+
**5️ Run your code**\
45+
Run the updated code in your development environment. Response time depends on the model and request size, but simple requests typically return quickly.
46+
47+
{% hint style="success" %}
48+
If you need a more detailed walkthrough for setting up your development environment and making a request step by step — feel free to use our [Quickstart guide](/broken/pages/ngeSCZKxiGVWqYZTHDjY).
49+
{% endhint %}
50+
51+
</details>
52+
53+
## API Schema
54+
55+
{% openapi-operation spec="deepseek-v4-flash" path="/v1/chat/completions" method="post" %}
56+
[OpenAPI deepseek-v4-flash](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/DeepSeek/deepseek-v4-flash.json)
57+
{% endopenapi-operation %}
58+
59+
## Code Example
60+
61+
{% tabs %}
62+
{% tab title="Python" %}
63+
{% code overflow="wrap" %}
64+
```python
65+
import requests
66+
import json # for getting a structured output with indentation
67+
68+
response = requests.post(
69+
"https://api.aimlapi.com/v1/chat/completions",
70+
headers={
71+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
72+
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
73+
"Content-Type":"application/json"
74+
},
75+
json={
76+
"model":"deepseek/deepseek-v4-flash",
77+
"messages":[
78+
{
79+
"role":"user",
80+
"content":"Hi! What do you think about mankind?" # insert your prompt
81+
}
82+
]
83+
}
84+
)
85+
86+
data = response.json()
87+
print(json.dumps(data, indent=2, ensure_ascii=False))
88+
```
89+
{% endcode %}
90+
{% endtab %}
91+
92+
{% tab title="JavaScript" %}
93+
{% code overflow="wrap" %}
94+
```javascript
95+
async function main() {
96+
const response = await fetch('https://api.aimlapi.com/v1/chat/completions', {
97+
method: 'POST',
98+
headers: {
99+
// insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>
100+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
101+
'Content-Type': 'application/json',
102+
},
103+
body: JSON.stringify({
104+
model: 'deepseek/deepseek-v4-flash',
105+
messages:[
106+
{
107+
role:'user',
108+
content: 'Hi! What do you think about mankind?' // insert your prompt here
109+
}
110+
],
111+
}),
112+
});
113+
114+
const data = await response.json();
115+
console.log(JSON.stringify(data, null, 2));
116+
}
117+
118+
main();
119+
```
120+
{% endcode %}
121+
{% endtab %}
122+
{% endtabs %}
123+
124+
<details>
125+
126+
<summary>Response</summary>
127+
128+
{% code overflow="wrap" %}
129+
```json5
130+
```
131+
{% endcode %}
132+
133+
</details>
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# DeepSeek V4 Pro
2+
3+
{% columns %}
4+
{% column width="66.66666666666666%" %}
5+
{% hint style="info" %}
6+
This documentation is valid for the following list of our models:
7+
8+
* `deepseek/deepseek-v4-pro`
9+
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
<a href="https://aimlapi.com/app/deepseek/deepseek-v4-pro" class="button primary">Try in Playground</a>
14+
{% endcolumn %}
15+
{% endcolumns %}
16+
17+
## Model Overview
18+
19+
A high-performance reasoning model as of late April 2026, designed for complex tasks, coding, and logic-heavy workflows. It supports up to 1M context length and includes an advanced thinking mode for deeper analysis.
20+
21+
{% hint style="success" %}
22+
[Create AI/ML API Key](https://aimlapi.com/app/keys)
23+
{% endhint %}
24+
25+
<details>
26+
27+
<summary>How to make the first API call</summary>
28+
29+
**1️⃣ Required setup (don’t skip this)**\
30+
▪ **Create an account:** Sign up on the AI/ML API website (if you don’t have one yet).\
31+
▪ **Generate an API key:** In your account dashboard, create an API key and make sure it’s **enabled** in the UI.
32+
33+
**2️ Copy the code example**\
34+
At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project.
35+
36+
**3️ Update the snippet for your use case**\
37+
▪ **Insert your API key:** replace `<YOUR_AIMLAPI_KEY>` with your real AI/ML API key.\
38+
▪ **Select a model:** set the `model` field to the model you want to call.\
39+
▪ **Provide input:** fill in the request input field(s) shown in the example (for example, `messages` for chat/LLM models, or other inputs for image/video/audio models).
40+
41+
**4️ (Optional) Tune the request**\
42+
Depending on the model type, you can add optional parameters to control the output (e.g., generation settings, quality, length, etc.). See the API schema below for the full list.
43+
44+
**5️ Run your code**\
45+
Run the updated code in your development environment. Response time depends on the model and request size, but simple requests typically return quickly.
46+
47+
{% hint style="success" %}
48+
If you need a more detailed walkthrough for setting up your development environment and making a request step by step — feel free to use our [Quickstart guide](/broken/pages/ngeSCZKxiGVWqYZTHDjY).
49+
{% endhint %}
50+
51+
</details>
52+
53+
## API Schema
54+
55+
{% openapi-operation spec="deepseek-v4-pro" path="/v1/chat/completions" method="post" %}
56+
[OpenAPI deepseek-v4-pro](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/DeepSeek/deepseek-v4-pro.json)
57+
{% endopenapi-operation %}
58+
59+
## Code Example
60+
61+
{% tabs %}
62+
{% tab title="Python" %}
63+
{% code overflow="wrap" %}
64+
```python
65+
import requests
66+
import json # for getting a structured output with indentation
67+
68+
response = requests.post(
69+
"https://api.aimlapi.com/v1/chat/completions",
70+
headers={
71+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
72+
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
73+
"Content-Type":"application/json"
74+
},
75+
json={
76+
"model":"deepseek/deepseek-v4-pro",
77+
"messages":[
78+
{
79+
"role":"user",
80+
"content":"Hi! What do you think about mankind?" # insert your prompt
81+
}
82+
]
83+
}
84+
)
85+
86+
data = response.json()
87+
print(json.dumps(data, indent=2, ensure_ascii=False))
88+
```
89+
{% endcode %}
90+
{% endtab %}
91+
92+
{% tab title="JavaScript" %}
93+
{% code overflow="wrap" %}
94+
```javascript
95+
async function main() {
96+
const response = await fetch('https://api.aimlapi.com/v1/chat/completions', {
97+
method: 'POST',
98+
headers: {
99+
// insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>
100+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
101+
'Content-Type': 'application/json',
102+
},
103+
body: JSON.stringify({
104+
model: 'deepseek/deepseek-v4-pro',
105+
messages:[
106+
{
107+
role:'user',
108+
content: 'Hi! What do you think about mankind?' // insert your prompt here
109+
}
110+
],
111+
}),
112+
});
113+
114+
const data = await response.json();
115+
console.log(JSON.stringify(data, null, 2));
116+
}
117+
118+
main();
119+
```
120+
{% endcode %}
121+
{% endtab %}
122+
{% endtabs %}
123+
124+
<details>
125+
126+
<summary>Response</summary>
127+
128+
{% code overflow="wrap" %}
129+
```json5
130+
{
131+
"id": "b8df8a22-3902-4241-889e-dc1f446e9794",
132+
"object": "chat.completion",
133+
"created": 1777066093,
134+
"model": "deepseek-v4-pro",
135+
"choices": [
136+
{
137+
"index": 0,
138+
"message": {
139+
"role": "assistant",
140+
"content": "That's quite a profound question—and one that philosophers, historians, and storytellers have grappled with for millennia. Since I don't have personal feelings or consciousness, I can't offer a subjective opinion. But I can share a synthesis of how humanity has been viewed through different lenses.\n\nOn one hand, mankind shows extraordinary capacity for **curiosity, creativity, and compassion**. We've decoded the human genome, composed symphonies, built cathedrals, landed on the Moon, and crafted poetry that moves people across centuries. Empathy and altruism—like strangers risking their lives to save others in disasters—remind us of a deep, often quiet, nobility.\n\nOn the other hand, we're a species marked by **contradiction**. The same intelligence that advances medicine also invents weapons of mass destruction. Our tribal instincts, while evolutionarily useful, fuel division, war, and prejudice. And our short-term thinking, often driven by greed or comfort, has pushed the planet toward climate crisis and mass extinction—threatening the very systems we depend on.\n\nPerhaps what's most defining about mankind is not any single trait, but the **tension between our potential and our flaws**. We're a \"work in progress\" — capable of both horrific destruction and breathtaking kindness, often in the same breath. Some thinkers see this as a story of gradual moral enlightenment; others as a cycle of rise and fall.\n\nIn the end, what makes us human might be our constant striving: to know more, to do better, and to find meaning. The future remains unwritten, and that's where choice comes in.",
141+
"reasoning_content": "We are asked: \"Hi! What do you think about mankind?\" This is a broad philosophical question. As an AI, I don't have personal feelings, but I can provide a balanced analysis. I should consider both positive and negative aspects of humanity, perhaps from various perspectives like historical, ethical, technological, etc. The tone should be neutral and thoughtful. I'll structure a response that acknowledges human achievements and flaws, leaving room for hope."
142+
},
143+
"logprobs": null,
144+
"finish_reason": "stop"
145+
}
146+
],
147+
"usage": {
148+
"prompt_tokens": 13,
149+
"completion_tokens": 416,
150+
"total_tokens": 429,
151+
"prompt_tokens_details": {
152+
"cached_tokens": 0
153+
},
154+
"completion_tokens_details": {
155+
"reasoning_tokens": 89
156+
},
157+
"prompt_cache_hit_tokens": 0,
158+
"prompt_cache_miss_tokens": 13
159+
},
160+
"system_fingerprint": "fp_9954b31ca7_prod0820_fp8_kvcache_20260402",
161+
"meta": {
162+
"usage": {
163+
"credits_used": 3824,
164+
"usd_spent": 0.001912
165+
}
166+
}
167+
}
168+
```
169+
{% endcode %}
170+
171+
</details>

‎docs/capabilities/code-generation.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Let's go over this again: any [text chat model](../api-references/model-database
3535
* [anthropic/claude-opus-4-6](../api-references/text-models-llm/anthropic/claude-4.6-opus.md)
3636
* [anthropic/claude-sonnet-4.6](../api-references/text-models-llm/anthropic/claude-4.6-sonnet.md)
3737
* [anthropic/claude-opus-4-7](../api-references/text-models-llm/anthropic/claude-4.7-opus.md)
38+
* [deepseek/deepseek-v4-pro](../api-references/text-models-llm/deepseek/deepseek-v4-pro.md)
39+
* [deepseek/deepseek-v4-flash](../api-references/text-models-llm/deepseek/deepseek-v4-flash.md)
3840
* [minimax/m2](../api-references/text-models-llm/minimax/m2.md)
3941
* [minimax/m2-1](../api-references/text-models-llm/minimax/m2-1.md)
4042
* [minimax/m2-1-highspeed](../api-references/text-models-llm/minimax/m2.1-highspeed.md)

‎docs/capabilities/function-calling.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ print(json.dumps(response.choices[0].message.model_dump()['tool_calls'], indent=
189189
* [deepseek/deepseek-r1](../api-references/text-models-llm/DeepSeek/deepseek-r1.md)
190190
* [deepseek/deepseek-thinking-v3.2-exp](../api-references/text-models-llm/deepseek/deepseek-reasoner-v3.2-exp-thinking.md)
191191
* [deepseek/deepseek-non-thinking-v3.2-exp](../api-references/text-models-llm/deepseek/deepseek-reasoner-v3.2-exp-non-thinking.md)
192+
* [deepseek/deepseek-v4-pro](../api-references/text-models-llm/deepseek/deepseek-v4-pro.md)
193+
* [deepseek/deepseek-v4-flash](../api-references/text-models-llm/deepseek/deepseek-v4-flash.md)
192194
* [MiniMax-Text-01](../api-references/text-models-llm/MiniMax/text-01.md)
193195
* [minimax/m1](../api-references/text-models-llm/minimax/m1.md)
194196
* [minimax/m2-her](../api-references/text-models-llm/minimax/m2-her.md)

‎docs/capabilities/thinking-reasoning.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ Supported models:
9898
***
9999

100100
* [deepseek/deepseek-v3.2-speciale](../api-references/text-models-llm/deepseek/deepseek-v3.2-speciale.md)
101+
* [deepseek/deepseek-v4-pro](../api-references/text-models-llm/deepseek/deepseek-v4-pro.md)
102+
* [deepseek/deepseek-v4-flash](../api-references/text-models-llm/deepseek/deepseek-v4-flash.md)
101103

102104
***
103105

0 commit comments

Comments
 (0)