数码小编的Blog

英伟达deepseek-R1推理模型API使用教程

如何调用英伟达部署的deepseek-R1推理模型API ?

第一步:获取请求demo

invoke_url='https://integrate.api.nvidia.com/v1/chat/completions'

authorization_header='Authorization: Bearer $API_KEY_REQUIRED_IF_EXECUTING_OUTSIDE_NGC'
accept_header='Accept: application/json'
content_type_header='Content-Type: application/json'

data=$'{
  "messages": [
    {
      "role": "user",
      "content": "Which number is larger, 9.11 or 9.8?"
    }
  ],
  "stream": true,
  "model": "deepseek-ai/deepseek-r1",
  "max_tokens": 4096,
  "presence_penalty": 0,
  "frequency_penalty": 0,
  "top_p": 0.7,
  "temperature": 0.6
}'

response=$(curl --silent -i -w "\n%{http_code}" --request POST \
  --url "$invoke_url" \
  --header "$authorization_header" \
  --header "$accept_header" \
  --header "$content_type_header" \
  --data "$data"
)

echo "$response"

第二步:创建api_keys

  • 点击Get API Key创建一个api_keys

第三步:发送测试对话

  • 启动一个AI对话客户端,这里以chatbox举例

  • 进入设置页面,在模型提供方下拉框处添加自定义模型,按下以下规则填写其余项并保存

  • 在对话窗口右下角切换模型为英伟达的deepseek-ai/deepseek-r1模型

  • 发送一条消息,如果能获得回复,即调用成功

  • <think></think>标签内的文本表示深度思考

⚪️

Powered by wisp

2/25/2025
Related Posts
digitalocean API

digitalocean API

Read Full Story
Quasar Alpha Optimus Alpha 免费模型API调用教程

Quasar Alpha Optimus Alpha 免费模型API调用教程

如何免费API调用Gemini 2.5 Pro Experimental

Read Full Story
Google账户登录DeepSeek网页版教程

Google账户登录DeepSeek网页版教程

正常情况访问deepseek网页版是看不到Google登录选项的,用油猴脚本可以解决这个问题

Read Full Story
© 数码小编 2025