Openai open API request error: No route to host (Host unreachable)

openai open API request error, this is too bad, here is the error content: No route to host (Host unreachable)

我今天也连接不到API请求服务,报错内容如下 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 \
  -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 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?