OpenAI API Applications and Integrations¶
OpenAI API is a platform that allows developers to access and integrate the powerful AI models developed by OpenAI into their applications or systems.
The API enables users to write code and create custom solutions using OpenAI's language models for various tasks, such as text generation, summarization, and translation.
Create an OpenAI account
OpenAI and ChatGPT
Follow these instructions to sign up for OpenAI and ChatGPT:
-
Visit the OpenAI Platform website: https://platform.openai.com/
-
Click on the "Sign Up" button in the top-right corner of the page.
-
Fill in your [institutional] email address, set a password, and give your name in the respective fields.
-
Check the box to agree to OpenAI's terms and conditions, then click "Sign Up."
-
You'll receive an email to confirm your account. Click on the confirmation link in the email.
-
Once your account is confirmed, sign in and visit the ChatGPT page: https://platform.openai.com/products/chatgpt
-
Follow the on-screen instructions to access ChatGPT.
For more information, visit the OpenAI documentation: https://platform.openai.com/docs
Create an OpenAI API key
OpenAI API uses an authenticated key for third-party applications and plugins. You will use your API key to power other AI platforms, like those on HuggingFace
Follow these concise instructions to find your OpenAI API key:
- Visit the OpenAI website
- Once logged in, click on your profile picture or initials in the top-right corner.
- From the dropdown menu, select "API Keys."
- You'll be taken to the API keys page. Here, you can view your existing API key or generate a new one.
- To create a new API key, click on the "Create new API key" button, and provide a description if needed.
- Copy the API key and store it in a secure location.
Remember to keep your API key confidential, as it provides access to your OpenAI account and its resources.
For more information on API keys, visit the OpenAI documentation: https://platform.openai.com/docs/guides/authentication
OpenAI API¶
Get on the OpenAI GPT-4 API waitlist
API access to GPT-4
is in high demand, OpenAI has created a waitlist for being granted access.
To get on the waitlist, go to: https://openai.com/waitlist/gpt-4-api
Make sure you use an academic email address and clearly specify what your use cases are.
Important GPT-4
and beta models use large numbers of tokens per run. Current limits for GPT-4-8K
has a context length of 8,192 tokens, and GPT-4-32K
goes up to 32,768 tokens which works out to about 50 pages of text. Google Bard only accepts 2,048 tokens.
Check out the openai/openai-cookbook repository for Jupyter Notebook lessons on using OpenAI API
Playground¶
Playground allows you to work with a range of OpenAI models for Chat, Text Completion, Image generation, Embedding, Speech-to-Text, and Fine Tuning your own models.
The interface for Playground uses the Python OpenAI API underneath the User Interface, and there is an option to copy/paste the code directly into a Python console.