Wednesday, April 30, 2025

How to get your open AI API Key

 

✅ Step-by-Step Guide to Get Your API Key

  1. Go to the OpenAI Platform
    🔗 https://platform.openai.com

  2. Sign in / Sign up

    • Log in with your existing account, or

    • Create a new account using your email, Google, or Microsoft account.

  3. Go to API Keys

  4. Generate a New API Key

    • Click the "+ Create new secret key" button.

    • Give it a name (optional, for your reference).

    • Copy and store the key safely — you will only see it once.

       

      5. Authenticate: Navigate to your project root in the terminal Export your OpenAI API key:

    Bash
    export OPENAI_API_KEY="YOUR_OPENAI_API_KEY"
    
    (You can get your API key from the OpenAI platform.)
    • Run: Navigate to your project root in the terminal and type codex followed by your request in natural language. For example:
      Bash
      codex "Explain this repo to me."
      
    •  

No comments:

Post a Comment