I have create a API key ,but when I verifing it can’t work and feedback a error:Failed to fetch error.
info:(status code 0)
TypeError: Failed to fetch
curl https://api.openai.com/v1/chat/completions -H “Content-Type: application/json” -H “Authorization: Bearer sk-proj-XXXXX” -d “{ "messages": [ { "role": "system", "content": "You are a test assistant." }, { "role": "user", "content": "Testing. Just say hi and nothing else." } ], "model": "gpt-4o-mini" }”
How can I fix it