Skip to content

OpenAIKey

Loic A. Royer edited this page Jun 5, 2024 · 7 revisions

Instructions on how to obtain an OpenAI API Key to use with Omega

This guide provides detailed instructions on how to obtain an OpenAI API key, which is necessary for making use of OpenAI's powerful models in Omega. Once you have an API key, also check this page on how to get access to the best model (GPT-4).

Step 1: Create an OpenAI Account

Before you can obtain an API key, you must first have an OpenAI account. If you don't have one yet, follow these steps:

  1. Go to the OpenAI signup page.
  2. Create Account.
  3. Click on the API box (see below)
image

Note: If you have an Enterprise account, ask your IT folks for help on how to gain access to your account.

Step 2: Access the OpenAI API Dashboard

Once your OpenAI account is set up, you'll need to access the API dashboard to create an API key:

  1. Log in to your OpenAI account.
  2. Navigate to the API section of the OpenAI platform.
  3. You'll be directed to the API dashboard, where you can manage your API keys.
image

Step 3: Generate a New API Key

In the API dashboard, you can generate a new API key:

  1. Click on the "New API Key" button.
  2. A dialog box will appear prompting you to name your API key. This can be anything that helps you identify the key's use, such as "Omega Integration".
  3. After naming your key, click "Create". Your new API key will be generated and displayed on the screen.

Important: Make sure to copy and securely store your API key immediately. It will not be shown again, and you'll need it to configure Omega.

image

Step 5: Load Credits in your Account:

This step is very important! In order to have access to the best models (currently GPT-4) you will need to complete at least one successful API payment before you’ll be granted access to the best and newer models. You can pre-pay; put $5 in to be granted GPT-4 access in a few minutes after the payment is processed:

  1. Go to platform.openai.com
  2. then in the left sidebar, click Settings, then Billing,
  3. There will be a button labeled ‘Add to credit balance’ that will let you fund your API account.
image

Note: The API costs are quite low and can be limited. Occasional users will find it difficult to go beyond a few dollars.

image

Below is the cost of tokens (pieces of words, ~75% of a word):

image

We are talking about 1$ per 100'000 tokens, so roughly 75'000 words. That's a lot of words...

Step 4: Configure Omega with Your OpenAI API Key

With your API key generated, the final step is to configure Omega to use this key. Check this page for detailed instructions.

Best Practices for Managing Your API Key

  • Host Computer Hygiene: Ensure that the machine you’re installing napari-chagot/Onega on is secure, free of malware and viruses, and otherwise not compromised. Make sure to install antivirus software on windows.
  • Security: Treat your API key like a password. Do not share it with others or expose it in public repositories or forums.
  • Cost Control: Set spending limits on your OpenAI account (see here).
  • Regenerate Keys: If you believe your API key has been compromised, cancel and regenerate it from the OpenAI API dashboard immediately.
  • Key Storage: Omega has a built-in 'API Key Vault' that encrypts keys using a password, this is the preferred approach. You can also store the key in an environment variable, but that is not encrypted and could compromise the key.

Need Help?

If you encounter any issues obtaining or using your OpenAI API key with Omega, consult the OpenAI documentation or reach out to OpenAI support for assistance.