Why the Unreal engine 5 can't use openai's api ?

This is an Unreal error report ,would you tell me what can I do ?**

LogHttp: Warning: 0000022004E95600: invalid HTTP response code received. URL: https://api.openai.com/v1/completions, HTTP code: 0, content length: 0, actual payload size: 0
LogHttp: Warning: 0000022004E95600: request failed, libcurl error: 7 (Couldn’t connect to server)

I get this error sometimes with OpenAi as well as ElevenLabs. I think it is an issue with Unreal because if I execute the same code right after I get this error, it works just fine.

For example here is the eror w/ ElevenLabs:

invalid HTTP response code received. URL: https://api.elevenlabs.io/v1/text-to-speech/21m00Tcm4TlvDq8ikWAM, HTTP code: 0, content length: 0, actual payload size: 0

I executed the code again and everything worked. It just happens randomly for me.