Skip to content

8 API Keys

Roselyn edited this page Nov 17, 2024 · 9 revisions

This page will guide users on obtaining an API key from OpenAI's platform to enable our backend processes:

  1. Login to OpenAI's Platform:
    You can log in to the OpenAI platform using your credentials. If don't already have an account, you must create one so as to proceed.

  2. Navigate to API Key Settings:
    After logging in, navigate to the settings page where API keys are managed. URL: https://platform.openai.com/settings/organization/api-keys.

  3. Generate or Retrieve an API Key:
    On the API key settings page, you can either create a new API key or copy the existing one. This key is essential for authenticating API requests to OpenAI's services.

  4. Use for Metrics Extraction:
    Once obtained, the API key is used within the application or codebase to access OpenAI's language models.

  5. Keep the API Key Secure:
    Please keep the API key confidential to prevent unauthorized access to the OpenAI services linked to the account. Avoid sharing it publicly or hardcoding it into public repositories.

  6. Configure the API Key on a Local Machine:

    If you are running the project on your local computer, you can set up the OpenAI API key for seamless access:

  • Create a Configuration File:
    Create a .env file in the same directory as scr.

  • Add the API Key:
    Inside the .env file, include the following line:

    OPENAI_API_KEY=sk-...
    
  • Link the File to Your Application: Ensure the application uses a library python-dotenv to load environment variables from the .env file at runtime.

  1. If you cannot run the model using your own API key, feel free to contact us (e.g., WeChat) to get our API key to help you run the model successfully.

Clone this wiki locally