D

DeepSeek-v3.1

DeepSeek
对话
text
模型 Code
deepseek-v3.1
服务状态
可调用

模型介绍

DeepSeek-V3.1为混合推理架构模型,同时支持思考模式与非思考模式,具备更高的推理效率和更强的Agent能力。

模型能力

输入模态
模型体验支持
思考模式支持
Function Calling支持
结构化输出不支持
输出模态
内置工具不支持
联网搜索未提供
缓存未提供

模型价格

输入4元/ 百万 token
输入(缓存命中)0.8元/ 百万 token
输出12元/ 百万 token

模型限流与上下文

最大输入长度
125K Tokens
上下文长度
128K Tokens
最大输出长度
16K Tokens

API 代码示例

import requests

url = "https://limapi.com/api/v1/chat/completions"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

payload = {
    "model": "deepseek-v3.1",
    "stream": True,
    "messages": [
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "你好,请介绍一下你自己"}
    ]
}

response = requests.post(url, headers=headers, json=payload, stream=True)
for line in response.iter_lines():
    if line:
        print(line.decode("utf-8"))

将示例中的 YOUR_API_KEY 替换为你的 API Key 即可调用。