Failed verification of OpenAI API key on custom API endpoint

I’m working on a project where privacy is top priority, so I’m trying to use a private LLM service instead of OpenAI and Claude.

I tried to override the OpenAI base url, and added my OpenAI API key here.

But I keep get ‘(status code 0) TypeError: Failed to fetch’ error, when I verify the API key.

Strangely, when I run the curl script to call the API, I get the results back very nicely. It’s just cursor that cannot get the API return for some reason.

Can this be fixed?

Which service are you trying to connect?

It’s public endpoint made by ngrok, pointing to ollama.