GPT-4 API access granted but 404 error

I got access to GPT-4 API, created a new API key since then, but no matter what, when I pass ‘gpt-4’ as the model instead of ‘text-davinci-003’ for instance, I always get a 404 error code.

Here is the error message :

[Nest] 109089 - 05/02/2023, 11:59:57 PM ERROR [ExceptionsHandler] Request failed with status code 404
Error: Request failed with status code 404
at createError (/home/acoma/Git/Aidalex/backend-aidalex/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/acoma/Git/Aidalex/backend-aidalex/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/home/acoma/Git/Aidalex/backend-aidalex/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:524:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21)

Anybody ?

Welcome to the forum!

What API endpoint are you querying? Chat (GPT-4) has a different endpoint…

Take a look here too…

And if you post your code, we might be able to help more.

Good luck!

1 Like

As mentioned above, make sure you are using a createChatCompletion function if using the installed packages.

If not using the installed packages, make sure you are using the correct endpoint.

Also, make sure you are using messages instead of prompts.

Refer to the documentation above to learn more! ^


Thanks a lot, I was using createCompletion method from the openai package with prompts and not messages so I guess that’s what caused the problem !

1 Like

I have a similar problem - I received an email 3 days ago saying I have GPT-4 API access, but I can’t access it. The model doesn’t show up in the playground and the API errors with “InvalidRequestError: The model: gpt-4 does not exist”.

I’ve doubled checked and the receiving email address matches my account email. Anyone else have this problem?