Repository navigation
8 API Keys
This page will guide users on obtaining an API key from OpenAI's platform to enable our backend processes:
-
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. -
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. -
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. -
Use for Metrics Extraction:
Once obtained, the API key is used within the application or codebase to access OpenAI's language models. -
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. -
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.envfile in the same directory asscr. -
Add the API Key:
Inside the.envfile, include the following line:OPENAI_API_KEY=sk-... -
Link the File to Your Application: Ensure the application uses a library
python-dotenvto load environment variables from the.envfile at runtime.
- 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.