wenbo2005.online

学习记录 / STM32

AI 密钥

STM322026-10-14

deepseek:sk-***

kimi:sk-***

opencode:oc_sk_78ffb81d5dce_Q-UuCFi7Lu6ddJsZRnqarcwARbWQf3_H

curl https://api.deepseek.com/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-***" \
  -d '{
        "model": "deepseek-chat",
        "messages": [
          {"role": "system", "content": "You are a helpful assistant."},
          {"role": "user", "content": "Hello!"}
        ],
        "stream": false
      }'

//cmd测试
curl https://api.deepseek.com/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-***" -d "{\"model\": \"deepseek-chat\", \"messages\": [{\"role\": \"user\", \"content\": \"你是谁?\"}], \"stream\": false}"

$key = "oc_sk_78ffb81d5dce_Q-UuCFi7Lu6ddJsZRnqarcwARbWQf3_H"

foreach ($m in "glm-5.3","kimi-k2.7-code","deepseek-v4.1-flash","minimax-m3","qwen3.8-max") {
  "{0} -> {1}" -f $m, (curl.exe -s -o NUL -w "%{http_code}" https://opencode.ai/zen/go/v1/chat/completions `
    -H "Authorization: Bearer $key" -H "Content-Type: application/json" `
    -d "{\"model\":\"$m\",\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}],\"max_tokens\":8}")
}