第一种报错:An error occurred during credentials validation: HTTPSConnectionPool(host='api.deepseek.com', port=443): Max retries exceeded with url: /chat/completions (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1010)')))
这个错误是因为你的电脑无法验证 api.deepseek.com
的 SSL 证书,导致 HTTPS 连接失败。
解决方法:打开设置,网络和Internet,代理,检查是否打开了“使用代理服务器”,关闭。
第二种错误:Credentials validation failed with status code 402
其实如果这是你第一次调用API,那么很有可能你的账户余额不足,充值即可。