Got invitation for gpt-4 api but model doesnt exist

hi everyone, i got invitation to gpt-4 invite but i cant use it. when i try to send a request i get this error :
openai.error.InvalidRequestError: The model: gpt-4-0314 does not exist

I tried using gpt-4 as model too, it didnt work either.

How can i fix this issue

1 Like

You got an invitation as a developer to try beta version of the gpt-4?

Me too! No clue how to use it.

ChatGPT tells me it doesn’t know what is chatGPT version 3 or 4 :confused:.

1 Like

Had a similar problem - took me a while to figure out a way to get it working. Feel free to provide the code your’re using, otherwise you can try generating a new API key (one created after you got access) and implement the Javascript request below which should let you access GPT-4.

const { Configuration, OpenAIApi } = require("openai");


  const configuration = new Configuration({
    apiKey: "<INSERT-API-KEY-HERE>",
  });

  const openai = new OpenAIApi(configuration);

  const response = await openai.createChatCompletion({
    model: "gpt-4",
    messages: [
      { role: "system", content: "You are a helpful assistant." },
      { role: "user", content: "Who won the world series in 2020?" },
      { role: "assistant", content: "The Los Angeles Dodgers." },
      { role: "user", content: "Where was it played?" },
    ],
    max_tokens: 50,
    n: 1,
    stop: null,
    temperature: 1,
  });

  console.log(response.data.choices[0].message.content);

@ thank-roping0j - I found it can be hard asking it what model it’s using and you get unreliable responses. Easiest way to check which version you’re using is to check your API usage which tells you what model you tried.

Made a quick guide here with all the details as well of how to do an API request using Javascript & Next.js to Chat GPT-4 - might be of use!

Do you mean we need to gen a new api key before use gtp-4?
thanks.

I have a similar problem. I received my invite today:

But I keep getting this error, even though I haven’t even used it before: “openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.”

1 Like

You guys using chat completion instead of just completion?

I have tried both, but without success.
It almost seems like they gave me access and instantly retracted it.

1 Like

Yup! You can do it by clicking “Create new secret key” here - obv don’t post it anywhere in the forum though :slightly_smiling_face:

Seems like the older keys sometimes haven’t been updated to give you more access when your invite to join GPT-4 was accepted.

1 Like

I would just add a credit card - not sure if you can actually test GPT-4 without paying for the API requests. It’s very cheap though all things considered. I’ve been playing around a lot and just hit $0.2 in total so might be worth considering!

Ahhh that might be why, thanks for the heads up!

Yes, I did it.
I just created a new key, and it works with gpt-4 now.
Thanks a lot!

private fun buildContentString(text: String): String {
// https://platform.openai.com/docs/api-reference/chat/create
val chatMessage = ChatMessage(
//model = “gpt-3.5-turbo”,
model = “gpt-4”,
messages = listOf(MessageItem(role = “user”, content = text))
)
// Convert the instance to a JSON string using the Gson library
return Gson().toJson(chatMessage)
}

I am using kotlin.

Yooo that actually worked. Thank you very much!

because the documentation says it is cheaper. :slight_smile:

I recently purchased a $20 subscription and applied my free trial credit. However, when I try to use the GPT-4 model, it shows that it does not exist. Can you please help me understand and resolve this issue?

I feel like its something I’m doing but my code works for 3.5. Seems like quite a few people having the same issue

Im now getting the “Sign up for the waitlist” on the overview page even though I got the email yesterday

I have the same problem - got an invite, but GPT-4 is neither available in the playground, nor via API.
I get an HTTP 404 when I try to change the model from 3.5 turbo to 4
grafik

PS: I also tried getting a new API key, and yes, I am on a paid API plan

Try this guide - read the “important notes” in the bottom of the page. Otherwise I think someone from OpenAI needs to help you.

Everyone with GPT-4 access is seeing the “Sign up for the waitlist” message on the overview page - it’s not great UX :sweat_smile: Easiest way to check what API calls you’re making is visiting your usage page.