Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect API key provided #201

Open
AlYehorov opened this issue Apr 29, 2024 · 3 comments
Open

Incorrect API key provided #201

AlYehorov opened this issue Apr 29, 2024 · 3 comments

Comments

@AlYehorov
Copy link

Hello guys, I have faced with issue that's my API key incorrect. I've tried to create a new one but still have the same problem. Previously everything was ok. I have money on my OpenAI acc so it's not related to an empty balance or something like that.

Any idea why I have it ?

APIErrorResponse(error: OpenAI.APIError(message: "Incorrect API key provided: "sk-proj**********************************************". You can find your API key at https://platform.openai.com/account/api-keys.", type: "invalid_request_error", param: nil, code: Optional("invalid_api_key")))

OpenAI 0.2.6 version (SPM package)

@ThatGuySam
Copy link

OpenAI recently rolled out per project API keys with the following format:

sk-proj-abcdefghijklmnopqrstuvwxyz1234567890abcdef

Although this article doesn't seem to mention this specific format change you can read about it here:
https://help.openai.com/en/articles/9186755-managing-your-work-in-the-api-platform-with-projects

You might be able to create a your own Project API key to verify here:
https://platform.openai.com/api-keys

This library likely does a format check to confirm that the key is the expected classic key format so that the user didn't accidentally type or paste the wrong text somehow.

sk-abcdefghijklmnopqrstuvwxyz1234567890abcdef

@AlYehorov
Copy link
Author

OpenAI recently rolled out per project API keys with the following format:

sk-proj-abcdefghijklmnopqrstuvwxyz1234567890abcdef

Although this article doesn't seem to mention this specific format change you can read about it here:

https://help.openai.com/en/articles/9186755-managing-your-work-in-the-api-platform-with-projects

You might be able to create a your own Project API key to verify here:

https://platform.openai.com/api-keys

This library likely does a format check to confirm that the key is the expected classic key format so that the user didn't accidentally type or paste the wrong text somehow.

sk-abcdefghijklmnopqrstuvwxyz1234567890abcdef

I know that, even with new key (project key) it does not work. That's why I'm asking here about that)

@vkix-7
Copy link

vkix-7 commented May 9, 2024

Hey bro can u provide me open ai api key for testing out a project u can deactivate after 1 hour plzz my credits are already expired help me out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants