Url `'https://api.openai.com/v1/completions' does not exist

Getting this error when utilizing a library for completions, this URL is correct according to the docs so what is going on?

image

Welcome to the forum!

I think you might be trying to use ChatCompletions API calls with Completions enpoints, can you post your API calling code please.

1 Like

The URL does exist and responds.

It seems the error message includes two single-quotes - have you manually specified the URL in a way that is different than the module needs or uses by default?

Were one using the wrong endpoint for the model, you’d instead get a return message like: “OpenAI API request was invalid: This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?” when you have proper error handling, such as a case “except openai.error.InvalidRequestError as e:” for the openai python library.

1 Like