openai open API request error, this is too bad, here is the error content: java.net.NoRouteToHostException: No route to host (Host unreachable)
我今天也连接不到API请求服务,报错内容如下:java.net.SocketTimeoutException: connect timed out
应该是服务器宕机了
It’s been a long time. Don’t they solve it?
Hi @james.lcq98
Please share the code that you’re using to call the API in proper markdown.
Are you able to call the completions endpoint using the cURL sample in the docs
curl https://api.openai.com/v1/completions \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -d '{ "model": "text-davinci-003", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0 }'
1 Like
No, call failed: curl: (7) Failed to connect to api.openai.com port 443: Connection timed out
Then that’s definitely got to do with network. Are you in a region where OpenAI is banned e.g China? or are you using a vpn?