My GPT-4 Access is taken away

Hi as the title suggest my access was taken away or something is just wrong. So basically I was invited to GPT-4 and have invitation picture. I also tested it initially on online chatbot ui (a popular open source chatgpt ui). It worked however now I am trying again I get error.

openai.error.InvalidRequestError: The model: gpt-4 does not exist

Here is my code

openai.organization = "myorg id"
completion = openai.ChatCompletion.create(
  model="gpt-4",
  messages=[
      {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ]
)

print(completion.choices[0].message)

After I got error I again went to the online chat ui it also doesn’t show my GPT-4 model like before.

My GPT-4 Invitation

Edit: Update this issue is resolved it was my dumb mistake

I don’t have access to GPT-4, but I may suspect that you just misspell the name. Try the GPT-4 API

Doesn’t work have tried in their doc it’s “gpt-4” but I also tried with"GPT-4"

And where are api_key and model in your code?

Api key is also entered I haven’t shown if there was an issue with API it would have given API error. I tried using other models it worked but not with gpt-4

Sorry for pulling. Good luck in solving the problem. That’s all my powers =)

Is the gpt-4 model still listed in playground?

1 Like

Does your code include “Authorization: Bearer” and your API key? You need that to be able to access the API for any model.

When you go to ChatGPT does it show you options for both GPT-3.5 and GPT 4?

image

Bildschirmfoto vom 2023-05-22 00-39-32

strange.

You need to apply for access and need to get accepted.

Any chance it is as simple as you mistyped the API key in your code?

Actually API access to GPT-4 and ChatGPT are not related. You don’t get GPT-4 access for buying the plus plan. You need to apply to the waitlist and need to be accepted.
You can even be accepted to API GPT-4 without having plus (I had API access first).
I would check playground. If it’s there you should search for other things.
Did you include moderation endpoint?

1 Like

In playground gpt-4 is not listed. That’s the thing I was invited as shown in screenshot but now I don’t have access.

Did you do that and selected chat in playground?

I got the following code to work:

import openai
import os

# Get the API key from the environment variable
OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')
openai.api_key = OPENAI_API_KEY

completion = openai.ChatCompletion.create(
  model="gpt-4",
  messages=[
      {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ]
)

print(completion.choices[0].message)


The difference is my API key is in an environment variable and I removed your:

openai.organization = “myorg id”
1 Like

If GPT-4 is not in your playground, it means your access is recycled.

The situation would be rare - but I’ve seem some similar cases before. Please self-check if you have resale your api, use api in forbidden areas like China Mainland, use VPN that shifts your IP, or any other cases that break the OpenAI policies ( Usage policies (openai.com)).

In all those cases, your gpt-4 api access may get revoke immediately without pre-warning or formal notification.

1 Like

You need to create a new API key. Seems like the older keys sometimes haven’t been updated.

1 Like

It still doesn’t work have tried everything even with new key.

You’re invited to use the OpenAI GPT-4 API!

Your OpenAI organization (org-xxxxxxxxxxxxxxxxxxx) can now access GPT-4 models with 8K context via the existing OpenAI API. You can learn more about GPT-4 in our [API documentation]
but when I am trying on platform using chat option from drop down gpt-4 model is not showing… I do not have paid account on openAI … I am user of chat GPT plus … would you help?