Skip to content

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

@luiz00martins

Description

@luiz00martins

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions