Projects Mode (sk-proj-) API Keys – No API Access? Need Urgent Hel

:bangbang:

I was switched to Projects Mode (sk-proj- keys) and can no longer make API calls

Every request to chat/completions returns a 404 error.
OpenAI Support confirmed sk-proj- keys do not work for API calls.
They refused to switch me back to sk- keys

Has anyone successfully used sk-proj- keys for API calls?

:small_blue_diamond: Are there workarounds for making API requests with Projects Mode?

:small_blue_diamond: Can OpenAI re-enable sk- keys, or are we permanently stuck in Projects Mode

:small_blue_diamond: Can OpenAI re-enable sk- keys, or are we permanently stuck in Projects Mode

If you’ve found a solution, please share. This is blocking my system from integrating with OpenAI

Hi Zeljko,

sk-proj- API keys are intended to work just like the previous sk- keys, but with more granular permissions tied to each project.

Could you share a snippet of your code? If you’re seeing a 404, it looks like you’re hitting the wrong endpoint. That’ll help us troubleshoot the issue.

Thanks!

2 Likes

I Appreciate you a lot. Before I report may I know :
Have you or anyone else successfully made an API call using sk-proj- keys

Basically Bubble IPA connector reports such 404 errors over again!

Next 3 poste are demonstrating it details : pls check it out, pls help

Here is 2. step;

Last one:

Domain https://api.openai.com/

{
    "message": "Welcome to the OpenAI API! Documentation is available at https://platform.openai.com/docs/api-reference"
}

Chat endpoint: https://api.openai.com/v1/chat/completions

Were the API key bad, it returns:

{
  "error": {
    "message": "Missing bearer or basic authentication in header",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}

Wrong endpoint: https://api.openai.com/chat/completion

<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

Returns the error seen in screenshots. Thus, a wrong endpoint URL is being employed.

This is an issue with the application configuration.

Welcome to the community @elanflowglow

The endpoint URL you’re currently using to make the chat completion API call is incorrect.

Please use the correct one:

https://api.openai.com/v1/chat/completions

I’d also recommend taking some time to read the chat completion API reference to make sure you set the API correctly on Bubble.

I had this same problem and was able to resolve it. In my case the API Key value was being truncated to 100 characters…whereas the actual value is 164 characters in length. Changing my variable to accommodate up to 255 characters resolved the problem.

ChatGPT still thinks that" ​OpenAI API keys are typically 40 characters in length. They begin with the prefix sk-, followed by a combination of mixed-case alphanumeric characters", but this is not true of project-based API keys…which are longer.

This is why authentication could work with user-based sk-xxxx keys, but not work with sk-proj-xxxx keys.