Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@
},
"content/en/news/news1226.md": {
"url": "https://api-docs.deepseek.com/news/news1226",
"error": "served fallback shell for https://api-docs.deepseek.com/news/news1226 (canonical: https://api-docs.deepseek.com/)"
"title": "🚀 Introducing DeepSeek-V3"
},
"content/en/news/news250325.md": {
"url": "https://api-docs.deepseek.com/news/news250325",
"error": "served fallback shell for https://api-docs.deepseek.com/news/news250325 (canonical: https://api-docs.deepseek.com/)"
"title": "DeepSeek-V3-0324 Release"
},
"content/en/news/news0725.md": {
"url": "https://api-docs.deepseek.com/news/news0725",
Expand Down
6 changes: 4 additions & 2 deletions content/en/api/create-chat-completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Chat Completions API"
description: "Creates a model response for the given chat conversation."
source: https://api-docs.deepseek.com/api/create-chat-completion
fetched: 2026-08-23
fetched: 2026-08-26
---

# Chat Completions API
Expand Down Expand Up @@ -260,7 +260,9 @@ Options for streaming response. Only set this when you set `stream: true`.

**include\_usage** boolean

If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.
If set to `true`, all chunks in the stream will include a `usage` field, whose value is `null` on every chunk except the last one. If omitted or set to `false`, the `usage` field is absent from all chunks except the last one.

Either way, the last chunk before the `data: [DONE]` message carries the token usage statistics for the entire request in its `usage` field. Note that no separate usage-only chunk is emitted: the statistics ride on the last content chunk, whose `choices` array always contains exactly one element that carries no new content and a non-null `finish_reason`.

**temperature** numbernullable

Expand Down
6 changes: 4 additions & 2 deletions content/en/api/create-completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "FIM Completion API (Beta)"
description: "FIM (Fill In the Middle) Completion API.<br/>User must set `base_url='https://api.deepseek.com/beta'` to use this feature."
source: https://api-docs.deepseek.com/api/create-completion
fetched: 2026-08-02
fetched: 2026-08-26
---

# FIM Completion API (Beta)
Expand Down Expand Up @@ -79,7 +79,9 @@ Options for streaming response. Only set this when you set `stream: true`.

**include\_usage** boolean

If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.
If set to `true`, all chunks in the stream will include a `usage` field, whose value is `null` on every chunk except the last one. If omitted or set to `false`, the `usage` field is absent from all chunks except the last one.

Either way, the last chunk before the `data: [DONE]` message carries the token usage statistics for the entire request in its `usage` field. Note that no separate usage-only chunk is emitted: the statistics ride on the last content chunk, whose `choices` array always contains exactly one element that carries no new content and a non-null `finish_reason`.

**suffix** stringnullable

Expand Down
6 changes: 4 additions & 2 deletions content/zh-cn/api/create-chat-completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Chat Completions API"
description: "根据输入的上下文,来让模型补全对话内容。"
source: https://api-docs.deepseek.com/zh-cn/api/create-chat-completion
fetched: 2026-08-23
fetched: 2026-08-26
---

# Chat Completions API
Expand Down Expand Up @@ -258,7 +258,9 @@ string

**include\_usage** boolean

如果设置为 true,在流式消息最后的 `data: [DONE]` 之前将会传输一个额外的块。此块上的 usage 字段显示整个请求的 token 使用统计信息,而 choices 字段将始终是一个空数组。所有其他块也将包含一个 usage 字段,但其值为 null。
如果设置为 `true`,流式返回的所有块都会包含 `usage` 字段,其中除最后一个块外,该字段的值均为 `null`。如果不设置或设置为 `false`,则除最后一个块外,其余块都不含 `usage` 字段。

无论是否设置,`data: [DONE]` 之前的最后一个块都会在其 `usage` 字段中给出整个请求的 token 使用统计信息。请注意,这里不会单独下发一个只含 usage 的块:统计信息附加在最后一个内容块上,该块的 `choices` 数组始终只包含一个元素,其中不含新增内容且 `finish_reason` 非 null。

**temperature** numbernullable

Expand Down
6 changes: 4 additions & 2 deletions content/zh-cn/api/create-completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "FIM 补全 API(Beta)"
description: "FIM (Fill In the Middle) 补全 API。<br/>用户需要设置 `base_url='https://api.deepseek.com/beta'` 来使用此功能。"
source: https://api-docs.deepseek.com/zh-cn/api/create-completion
fetched: 2026-08-23
fetched: 2026-08-26
---

# FIM 补全 API(Beta)
Expand Down Expand Up @@ -79,7 +79,9 @@ string

**include\_usage** boolean

如果设置为 true,在流式消息最后的 `data: [DONE]` 之前将会传输一个额外的块。此块上的 usage 字段显示整个请求的 token 使用统计信息,而 choices 字段将始终是一个空数组。所有其他块也将包含一个 usage 字段,但其值为 null。
如果设置为 `true`,流式返回的所有块都会包含 `usage` 字段,其中除最后一个块外,该字段的值均为 `null`。如果不设置或设置为 `false`,则除最后一个块外,其余块都不含 `usage` 字段。

无论是否设置,`data: [DONE]` 之前的最后一个块都会在其 `usage` 字段中给出整个请求的 token 使用统计信息。请注意,这里不会单独下发一个只含 usage 的块:统计信息附加在最后一个内容块上,该块的 `choices` 数组始终只包含一个元素,其中不含新增内容且 `finish_reason` 非 null。

**suffix** stringnullable

Expand Down
12 changes: 8 additions & 4 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
title: "Chat Completions API"
description: "Creates a model response for the given chat conversation."
source: https://api-docs.deepseek.com/api/create-chat-completion
fetched: 2026-08-23
fetched: 2026-08-26
---

# Chat Completions API
Expand Down Expand Up @@ -265,7 +265,9 @@ Options for streaming response. Only set this when you set `stream: true`.

**include\_usage** boolean

If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.
If set to `true`, all chunks in the stream will include a `usage` field, whose value is `null` on every chunk except the last one. If omitted or set to `false`, the `usage` field is absent from all chunks except the last one.

Either way, the last chunk before the `data: [DONE]` message carries the token usage statistics for the entire request in its `usage` field. Note that no separate usage-only chunk is emitted: the statistics ride on the last content chunk, whose `choices` array always contains exactly one element that carries no new content and a non-null `finish_reason`.

**temperature** numbernullable

Expand Down Expand Up @@ -990,7 +992,7 @@ Loading...
title: "FIM Completion API (Beta)"
description: "FIM (Fill In the Middle) Completion API.<br/>User must set `base_url='https://api.deepseek.com/beta'` to use this feature."
source: https://api-docs.deepseek.com/api/create-completion
fetched: 2026-08-02
fetched: 2026-08-26
---

# FIM Completion API (Beta)
Expand Down Expand Up @@ -1067,7 +1069,9 @@ Options for streaming response. Only set this when you set `stream: true`.

**include\_usage** boolean

If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.
If set to `true`, all chunks in the stream will include a `usage` field, whose value is `null` on every chunk except the last one. If omitted or set to `false`, the `usage` field is absent from all chunks except the last one.

Either way, the last chunk before the `data: [DONE]` message carries the token usage statistics for the entire request in its `usage` field. Note that no separate usage-only chunk is emitted: the statistics ride on the last content chunk, whose `choices` array always contains exactly one element that carries no new content and a non-null `finish_reason`.

**suffix** stringnullable

Expand Down