Skip to content

Commit e7398f6

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-371: docs: add deepseek v3.1 reasoner and chat
1 parent 3d40ad0 commit e7398f6

7 files changed

Lines changed: 325 additions & 14 deletions

File tree

‎docs/SUMMARY.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
* [DeepSeek V3](api-references/text-models-llm/DeepSeek/deepseek-chat.md)
4242
* [DeepSeek R1](api-references/text-models-llm/DeepSeek/deepseek-r1.md)
4343
* [DeepSeek Prover V2](api-references/text-models-llm/deepseek/deepseek-prover-v2.md)
44+
* [DeepSeek Chat V3.1](api-references/text-models-llm/deepseek/deepseek-chat-v3.1.md)
45+
* [DeepSeek Reasoner V3.1](api-references/text-models-llm/deepseek/deepseek-reasoner-v3.1.md)
4446
* [Google](api-references/text-models-llm/Google/README.md)
4547
* [gemini-2.0-flash-exp](api-references/text-models-llm/Google/gemini-2.0-flash-exp.md)
4648
* [gemini-2.0-flash](api-references/text-models-llm/google/gemini-2.0-flash.md)

‎docs/api-references/image-models/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ We obtained the following image by running that code example:
6464

6565
## All Available Image Models
6666

67-
<table><thead><tr><th width="274.20001220703125">Model ID + API Reference link</th><th width="123.39996337890625">Developer</th><th width="103.79998779296875">Context</th><th>Model Card</th></tr></thead><tbody><tr><td><a href="alibaba-cloud/qwen-image.md">alibaba/qwen-image</a></td><td>Alibaba Cloud</td><td></td><td><a href="https://aimlapi.com/models/qwen-image">Qwen Image</a></td></tr><tr><td><a href="bytedance/seedream-3.0.md">bytedance/seedream-3.0</a></td><td>ByteDance</td><td></td><td><a href="https://aimlapi.com/models/seedream-3-0">Seedream 3.0</a></td></tr><tr><td><a href="bytedance/seededit-3.0-image-to-image.md">bytedance/seededit-3.0-i2i</a></td><td>ByteDance</td><td></td><td><a href="https://aimlapi.com/models/seedream-3-0">Seedream 3.0</a></td></tr><tr><td><a href="flux/flux-pro.md">flux-pro</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-pro-api">FLUX.1 [pro]</a></td></tr><tr><td><a href="flux/flux-pro.md">flux-pro/v1.1</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-1-pro-api">FLUX 1.1 [pro]</a></td></tr><tr><td><a href="flux/flux-pro-v1.1-ultra.md">flux-pro/v1.1-ultra</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-1-pro-ultra-api">FLUX 1.1 [pro ultra]</a></td></tr><tr><td><a href="flux/flux-realism.md">flux-realism</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-realism-lora-api">FLUX Realism LoRA</a></td></tr><tr><td><a href="flux/flux-dev.md">flux/dev</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-dev-api">FLUX.1 [dev]</a></td></tr><tr><td><a href="flux/flux-dev-image-to-image.md">flux/dev/image-to-image</a></td><td>Flux</td><td></td><td>-</td></tr><tr><td><a href="flux/flux-schnell.md">flux/schnell</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-schnell-api">FLUX.1 [schnell]</a></td></tr><tr><td><a href="flux/flux-kontext-max-text-to-image.md">flux/kontext-max/text-to-image</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-kontext-max">FLUX.1 Kontext [max]</a></td></tr><tr><td><a href="flux/flux-kontext-max-image-to-image.md">flux/kontext-max/image-to-image</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-kontext-max">FLUX.1 Kontext [max]</a></td></tr><tr><td><a href="flux/flux-kontext-pro-text-to-image.md">flux/kontext-pro/text-to-image</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-kontext-pro">Flux.1 Kontext [pro]</a></td></tr><tr><td><a href="flux/flux-kontext-pro-image-to-image.md">flux/kontext-pro/image-to-image</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-kontext-pro">Flux.1 Kontext [pro]</a></td></tr><tr><td><a href="google/imagen-3.0.md">imagen-3.0-generate-002</a></td><td>Google</td><td></td><td><a href="https://aimlapi.com/models/imagen-3-api">Imagen 3</a></td></tr><tr><td><a href="google/imagen-4-preview.md">google/imagen4/preview</a></td><td>Google</td><td></td><td><a href="https://aimlapi.com/models/imagen-4-preview">Imagen 4 Preview</a></td></tr><tr><td><a href="google/imagen-4-ultra.md">imagen-4.0-ultra-generate-preview-06-06</a></td><td>Google</td><td></td><td><a href="https://aimlapi.com/models/imagen-4-ultra">Imagen 4 Ultra</a></td></tr><tr><td><a href="google/gemini-2.5-flash-image.md">google/gemini-2.5-flash-image</a></td><td>Google</td><td></td><td><em>Coming Soon</em></td></tr><tr><td><a href="google/gemini-2.5-flash-image.md">google/gemini-2.5-flash-image-edit</a></td><td>Google</td><td></td><td><em>Coming Soon</em></td></tr><tr><td><a href="OpenAI/dall-e-2.md">dall-e-2</a></td><td>OpenAI</td><td></td><td><a href="https://aimlapi.com/models/openai-dall-e-2-api">OpenAI DALL·E 2</a></td></tr><tr><td><a href="OpenAI/dall-e-3.md">dall-e-3</a></td><td>OpenAI</td><td></td><td><a href="https://aimlapi.com/models/openai-dall-e-3">OpenAI DALL·E 3</a></td></tr><tr><td><a href="openai/gpt-image-1.md">openai/gpt-image-1</a></td><td>OpenAI</td><td></td><td><a href="https://aimlapi.com/models/gpt-image-1">gpt-image-1</a></td></tr><tr><td><a href="RecraftAI/recraft-v3.md">recraft-v3</a></td><td>Recraft AI</td><td></td><td><a href="https://aimlapi.com/models/recraft-v3">Recraft v3</a></td></tr><tr><td><a href="Stability-AI/stable-diffusion-v3-medium.md">stable-diffusion-v3-medium</a></td><td>Stability AI</td><td></td><td><a href="https://aimlapi.com/models/stable-diffusion-3-api">Stable Diffusion 3</a></td></tr><tr><td><a href="Stability-AI/stable-diffusion-v35-large.md">stable-diffusion-v35-large</a></td><td>Stability AI</td><td></td><td><a href="https://aimlapi.com/models/stable-diffusion-3-5-large-api">Stable Diffusion 3.5 Large</a></td></tr></tbody></table>
67+
<table><thead><tr><th width="274.20001220703125">Model ID + API Reference link</th><th width="123.39996337890625">Developer</th><th width="103.79998779296875">Context</th><th>Model Card</th></tr></thead><tbody><tr><td><a href="alibaba-cloud/qwen-image.md">alibaba/qwen-image</a></td><td>Alibaba Cloud</td><td></td><td><a href="https://aimlapi.com/models/qwen-image">Qwen Image</a></td></tr><tr><td><a href="bytedance/seedream-3.0.md">bytedance/seedream-3.0</a></td><td>ByteDance</td><td></td><td><a href="https://aimlapi.com/models/seedream-3-0">Seedream 3.0</a></td></tr><tr><td><a href="bytedance/seededit-3.0-image-to-image.md">bytedance/seededit-3.0-i2i</a></td><td>ByteDance</td><td></td><td><a href="https://aimlapi.com/models/seedream-3-0">Seedream 3.0</a></td></tr><tr><td><a href="flux/flux-pro.md">flux-pro</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-pro-api">FLUX.1 [pro]</a></td></tr><tr><td><a href="flux/flux-pro.md">flux-pro/v1.1</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-1-pro-api">FLUX 1.1 [pro]</a></td></tr><tr><td><a href="flux/flux-pro-v1.1-ultra.md">flux-pro/v1.1-ultra</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-1-pro-ultra-api">FLUX 1.1 [pro ultra]</a></td></tr><tr><td><a href="flux/flux-realism.md">flux-realism</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-realism-lora-api">FLUX Realism LoRA</a></td></tr><tr><td><a href="flux/flux-dev.md">flux/dev</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-dev-api">FLUX.1 [dev]</a></td></tr><tr><td><a href="flux/flux-dev-image-to-image.md">flux/dev/image-to-image</a></td><td>Flux</td><td></td><td>-</td></tr><tr><td><a href="flux/flux-schnell.md">flux/schnell</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-schnell-api">FLUX.1 [schnell]</a></td></tr><tr><td><a href="flux/flux-kontext-max-text-to-image.md">flux/kontext-max/text-to-image</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-kontext-max">FLUX.1 Kontext [max]</a></td></tr><tr><td><a href="flux/flux-kontext-max-image-to-image.md">flux/kontext-max/image-to-image</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-kontext-max">FLUX.1 Kontext [max]</a></td></tr><tr><td><a href="flux/flux-kontext-pro-text-to-image.md">flux/kontext-pro/text-to-image</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-kontext-pro">Flux.1 Kontext [pro]</a></td></tr><tr><td><a href="flux/flux-kontext-pro-image-to-image.md">flux/kontext-pro/image-to-image</a></td><td>Flux</td><td></td><td><a href="https://aimlapi.com/models/flux-1-kontext-pro">Flux.1 Kontext [pro]</a></td></tr><tr><td><a href="google/imagen-3.0.md">imagen-3.0-generate-002</a></td><td>Google</td><td></td><td><a href="https://aimlapi.com/models/imagen-3-api">Imagen 3</a></td></tr><tr><td><a href="google/imagen-4-preview.md">google/imagen4/preview</a></td><td>Google</td><td></td><td><a href="https://aimlapi.com/models/imagen-4-preview">Imagen 4 Preview</a></td></tr><tr><td><a href="google/imagen-4-ultra.md">imagen-4.0-ultra-generate-preview-06-06</a></td><td>Google</td><td></td><td><a href="https://aimlapi.com/models/imagen-4-ultra">Imagen 4 Ultra</a></td></tr><tr><td><a href="google/gemini-2.5-flash-image.md">google/gemini-2.5-flash-image</a></td><td>Google</td><td></td><td><a href="https://aimlapi.com/models/gemini-2-5-flash-image">Gemini 2.5 Flash Image</a></td></tr><tr><td><a href="google/gemini-2.5-flash-image.md">google/gemini-2.5-flash-image-edit</a></td><td>Google</td><td></td><td><a href="https://aimlapi.com/models/gemini-2-5-flash-image-edit">Gemini 2.5 Flash Image Edit</a></td></tr><tr><td><a href="OpenAI/dall-e-2.md">dall-e-2</a></td><td>OpenAI</td><td></td><td><a href="https://aimlapi.com/models/openai-dall-e-2-api">OpenAI DALL·E 2</a></td></tr><tr><td><a href="OpenAI/dall-e-3.md">dall-e-3</a></td><td>OpenAI</td><td></td><td><a href="https://aimlapi.com/models/openai-dall-e-3">OpenAI DALL·E 3</a></td></tr><tr><td><a href="openai/gpt-image-1.md">openai/gpt-image-1</a></td><td>OpenAI</td><td></td><td><a href="https://aimlapi.com/models/gpt-image-1">gpt-image-1</a></td></tr><tr><td><a href="RecraftAI/recraft-v3.md">recraft-v3</a></td><td>Recraft AI</td><td></td><td><a href="https://aimlapi.com/models/recraft-v3">Recraft v3</a></td></tr><tr><td><a href="Stability-AI/stable-diffusion-v3-medium.md">stable-diffusion-v3-medium</a></td><td>Stability AI</td><td></td><td><a href="https://aimlapi.com/models/stable-diffusion-3-api">Stable Diffusion 3</a></td></tr><tr><td><a href="Stability-AI/stable-diffusion-v35-large.md">stable-diffusion-v35-large</a></td><td>Stability AI</td><td></td><td><a href="https://aimlapi.com/models/stable-diffusion-3-5-large-api">Stable Diffusion 3.5 Large</a></td></tr></tbody></table>

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

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

‎docs/api-references/text-models-llm/DeepSeek/deepseek-r1.md‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ DeepSeek R1 is a cutting-edge reasoning model developed by DeepSeek AI, designed
2828

2929
### &#x20;:digit\_two: Copy the code example
3030

31-
Below, you'll find [a code example](deepseek-r1.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
31+
At the bottom of this page, you'll find [a code example](deepseek-r1.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
3232

3333
### :digit\_three: Modify the code example
3434

@@ -49,6 +49,12 @@ If you need a more detailed walkthrough for setting up your development environm
4949

5050
</details>
5151

52+
## API Schema
53+
54+
{% openapi-operation spec="deepseek-r1" path="/v1/chat/completions" method="post" %}
55+
[OpenAPI deepseek-r1](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/DeepSeek/deepseek-r1.json)
56+
{% endopenapi-operation %}
57+
5258
## Code Example
5359

5460
{% tabs %}
@@ -61,9 +67,7 @@ import json # for getting a structured output with indentation
6167
response = requests.post(
6268
"https://api.aimlapi.com/v1/chat/completions",
6369
headers={
64-
"Content-Type":"application/json",
65-
66-
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
70+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
6771
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
6872
"Content-Type":"application/json"
6973
},
@@ -141,9 +145,3 @@ main();
141145
{% endcode %}
142146

143147
</details>
144-
145-
## API Schema
146-
147-
{% openapi-operation spec="deepseek-r1" path="/v1/chat/completions" method="post" %}
148-
[OpenAPI deepseek-r1](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/DeepSeek/deepseek-r1.json)
149-
{% endopenapi-operation %}

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

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# DeepSeek Chat V3.1
2+
3+
{% hint style="info" %}
4+
This documentation is valid for the following list of our models:
5+
6+
* `deepseek/deepseek-chat-v3.1`
7+
{% endhint %}
8+
9+
## Model Overview
10+
11+
August 2025 update of the [DeepSeek V3](../DeepSeek/deepseek-chat.md) non-reasoning model.
12+
13+
## How to Make a Call
14+
15+
<details>
16+
17+
<summary>Step-by-Step Instructions</summary>
18+
19+
### :digit\_one: Setup You Can’t Skip
20+
21+
:black\_small\_square: [**Create an Account**](https://aimlapi.com/app/sign-up): Visit the AI/ML API website and create an account (if you don’t have one yet).\
22+
:black\_small\_square: [**Generate an API Key**](https://aimlapi.com/app/keys): After logging in, navigate to your account dashboard and generate your API key. Ensure that key is enabled on UI.
23+
24+
### &#x20;:digit\_two: Copy the code example
25+
26+
At the bottom of this page, you'll find [a code example](deepseek-chat-v3.1.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
27+
28+
### :digit\_three: Modify the code example
29+
30+
:black\_small\_square: Replace `<YOUR_AIMLAPI_KEY>` with your actual AI/ML API key from your account.\
31+
:black\_small\_square: Insert your question or request into the `content` field—this is what the model will respond to.
32+
33+
### :digit\_four: <sup><sub><mark style="background-color:yellow;">(Optional)<mark style="background-color:yellow;"><sub></sup> Adjust other optional parameters if needed
34+
35+
Only `model` and `messages` are required parameters for this model (and we’ve already filled them in for you in the example), but you can include optional parameters if needed to adjust the model’s behavior. Below, you can find the corresponding [API schema](deepseek-chat-v3.1.md#api-schema), which lists all available parameters along with notes on how to use them.
36+
37+
### :digit\_five: Run your modified code
38+
39+
Run your modified code in your development environment. Response time depends on various factors, but for simple prompts it rarely exceeds a few seconds.
40+
41+
{% hint style="success" %}
42+
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](../../../quickstart/setting-up.md).
43+
{% endhint %}
44+
45+
</details>
46+
47+
## API Schema
48+
49+
{% openapi-operation spec="deepseek-chat-v3-1" path="/v1/chat/completions" method="post" %}
50+
[OpenAPI deepseek-chat-v3-1](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/DeepSeek/deepseek-chat-v3.1.json)
51+
{% endopenapi-operation %}
52+
53+
## Code Example
54+
55+
{% tabs %}
56+
{% tab title="Python" %}
57+
{% code overflow="wrap" %}
58+
```python
59+
import requests
60+
import json # for getting a structured output with indentation
61+
62+
response = requests.post(
63+
"https://api.aimlapi.com/v1/chat/completions",
64+
headers={
65+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
66+
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
67+
"Content-Type":"application/json"
68+
},
69+
json={
70+
"model":"deepseek/deepseek-chat-v3.1",
71+
"messages":[{
72+
"role":"user",
73+
"content":"Hello"} # Insert your question instead of Hello
74+
]
75+
}
76+
)
77+
78+
data = response.json()
79+
# getting a structured output with indentation
80+
print(json.dumps(data, indent=2, ensure_ascii=False))
81+
```
82+
{% endcode %}
83+
{% endtab %}
84+
85+
{% tab title="JavaScript" %}
86+
{% code overflow="wrap" %}
87+
```javascript
88+
async function main() {
89+
const response = await fetch('https://api.aimlapi.com/v1/chat/completions', {
90+
method: 'POST',
91+
headers: {
92+
// Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>
93+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
94+
'Content-Type': 'application/json',
95+
},
96+
body: JSON.stringify({
97+
model: 'deepseek/deepseek-chat-v3.1',
98+
messages:[{
99+
role:'user',
100+
content: 'Hello'} // Insert your question instead of Hello
101+
],
102+
}),
103+
});
104+
105+
const data = await response.json();
106+
console.log(JSON.stringify(data, null, 2));
107+
}
108+
109+
main();
110+
```
111+
{% endcode %}
112+
{% endtab %}
113+
{% endtabs %}
114+
115+
<details>
116+
117+
<summary>Response</summary>
118+
119+
{% code overflow="wrap" %}
120+
```json5
121+
{
122+
"id": "c13865eb-50bf-440c-922f-19b1bbef517d",
123+
"system_fingerprint": "fp_feb633d1f5_prod0820_fp8_kvcache",
124+
"object": "chat.completion",
125+
"choices": [
126+
{
127+
"index": 0,
128+
"finish_reason": "stop",
129+
"logprobs": null,
130+
"message": {
131+
"role": "assistant",
132+
"content": "Hello! How can I assist you today? 😊",
133+
"reasoning_content": ""
134+
}
135+
}
136+
],
137+
"created": 1756386652,
138+
"model": "deepseek-chat",
139+
"usage": {
140+
"prompt_tokens": 1,
141+
"completion_tokens": 39,
142+
"total_tokens": 40,
143+
"prompt_tokens_details": {
144+
"cached_tokens": 0
145+
},
146+
"prompt_cache_hit_tokens": 0,
147+
"prompt_cache_miss_tokens": 5
148+
}
149+
}
150+
```
151+
{% endcode %}
152+
153+
</details>

0 commit comments

Comments
 (0)