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

[powershell] Failed to access OpenAI api with working API key #122

Open
luiz00martins opened this issue Dec 9, 2022 · 4 comments
Open

Comments

@luiz00martins
Copy link

When running the following command:

.\Codex-CLI\scripts\powershell_setup.ps1 -OpenAIApiKey (ConvertTo-SecureString "sk-f1********************bulz" -AsPlainText -Force)
-OpenAIOrganizationId "org-k**************p2hh" -OpenAIEngineId 'code-davinci-002'

I get the following error:

...\Codex-CLI\scripts\powershell_setup.ps1 : Failed to access OpenAI api [].
Please check your OpenAI API key (https://beta.openai.com/account/api-keys) and
Organization ID (https://beta.openai.com/account/org-settings).

I have confirmed my OpenAI key is correct and functional, as I was able to use it in a different project and it's working fine there. The only problem I can see is the ORG id.

Is there any restriction for which ORGs are able to use this tool? Currently my account is assigned under 'OpenAI Formal External'. Are there any restrictions on that?

@luiz00martins luiz00martins changed the title Failed to access OpenAI api with working API key [powershell] Failed to access OpenAI api with working API key Dec 9, 2022
@DaLVeRS2001
Copy link

Did u solve the problem?

@luiz00martins
Copy link
Author

@DaLVeRS2001 Nope, still waiting on a response.

@TheMasonX
Copy link

I have this problem too, unfortunately

@Jony1990-del
Copy link

This might be a late reply, but I upgraded PowerShell to 7 and it worked for me.

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

4 participants