Access https://api.openai.com/v1/completions from browser fetch

I’m passing all headers as documented and the JSON packet as documented.

But when I fetch it from inside the browser, it returns an “insufficient_quota” error.

I am not exceeding the quota. This is just a few experimental requests as I build out the client.
It appears that the service cannot be called from a browser context

The request headers below:

JSON content of my request:

Hi @nige.animal and welcome to the Forum -

The insufficient quota error normally indicates that you have insufficient funds on your developer account and/or that you are still in the Free Tier. Is that a possibility?

Free. So the API is unavailable?

You need to add a minimum of $5 to your developer account in order to start using the API.

The label ‘free’ is a bit misleading. Up until early this year, OpenAI would provide anyone opening a new account some trial credits. However, this programme was discontinued and now you need to pay in some funds to use the API.

You can do so here: https://platform.openai.com/settings/organization/billing/overview

I added some money. Exactly the same result.

This is like all software. Just Does Not Work.

It might take a few hours until the upgrade to Tier 1 comes into effect. There was a recent issue that caused some delays but OpenAI has been actively addressing it.

Under the following link you can check your current Tier: https://platform.openai.com/settings/organization/limits

If you are already at Tier 1 and the error still comes up, then you can try to mint a new API key and replace the existing one. That sometimes helps, too.

Let us know if the error continues to persist.

Hi and welcome to the community, @nige.animal!

It’s possible that you are encountering an account issue that can only be resolved by support at help.openai.com.

I suggest sending them a message explaining your situation so they can assist you. Unfortunately, we are unable to provide support for account issues within this community.

2 Likes