When I try the "gpt-4" model chat completion in API request, I get an error: That model does not exist

When I try the “gpt-4” model chat completion in API request, I get an error: That model does not exist.

My API request is just like that:

curl https://api.openai.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
  "model": "gpt-4",
  "messages": [{"role": "user", "content": "Hello!"}]
}'
2 Likes

Although it’s in the documentation, it hasn’t been released yet.

It looks like there’s a waitlist.

1 Like

GPT-4 is currently in a limited beta and only accessible to those who have been granted access. Please join the waitlist to get access when capacity is available.

5 Likes

Ok, got it. I’ve been waiting at the list.

What if you’ve received the email that you received access but are still seeing this error?

3 Likes

Having this issue as well was granted access but can’t access the model through the api

3 Likes

Same here, API granted access, but not working (404)

4 Likes

Same here, I can use GTP4 as a prompt but not via the API.
Is there anything to do except waiting?
Thanks a lot for your help

3 Likes

Working now as of this morning. I also redid the API integration, so might have been an issue with my code

1 Like

I just got access and I don’t see the model in the ‘completions’ in the playground.

2 Likes

Is GPT-4 supposed to be visible in the playground if you have been approved? I thought it was the api only.

1 Like

I received the email this morning and am getting the 404 error. Which API library are you using? I’m getting the error with the NodeJS api.

Check “chat” mode not “completion” mode, https://i.imgur.com/csiX3l8.png

1 Like

Quick update, after running npm install openai --save again, the GPT-4 model seems to be working

Yup I see it, I had to call the chatCompletions in the code as well. Thanks!

1 Like

I have it in playground and also API

I got an invite but was getting the above error. It then worked after I generated a new API key.

@benlamm I had the same issue. You must update your version of the openai library. Run pip install openai and try it again, it worked for me.

Related to this, I would suggest a more descriptive error message, since it’s public info that the model exists. I think a better error message would reduce the confusion.

For me, the problem was that I didn’t set the default organization in this page OpenAI API

Once I set the organization to be the organization that got access to GPT4, I can call GPT-4 sucessfully

1 Like