GPT-4 API claims that the model does not Exist

Here is an example of the code that is being used followed by the error message. The code works just fine when using the “gpt-3.5-turbo” model.

CODE
{
“model”: “gpt-4”,
“messages”: [
{
“role”: “user”,
“content”: "You are an expert Answer the below question in a format. Finish your answer within 800 tokens: /n "
}
],
“temperature”: 1,
“max_tokens”: 800,
“top_p”: 1,
“frequency_penalty”: 0,
“presence_penalty”: 0
}

RESPONSE MESSAGE
Raw response for the API
Status code 404
{
“error”: {
“message”: “The model: gpt-4 does not exist”,
“type”: “invalid_request_error”,
“param”: null,
“code”: “model_not_found”
}
}

You need to request access to gpt 4 model.

As Doug mentioned. Do you see GPT 4 as available in your OpenAI Playground?

Well, this is dumb. I think you mean “role: system” here. But also, yeah you probably don’t have (or haven’t properly configured) GPT-4 access, as others have noted.