OpenAI Platform¶
This work is licensed under a Creative Commons Attribution 4.0 International License.
OpenAI Platform allows developers to access the API and to integrate powerful AI models developed by OpenAI into their custom applications or systems.
The OpenAI 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.
OpenAI API¶
Check out the openai/openai-cookbook repository for Jupyter Notebook lessons on using OpenAI API
OpenAI 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.
Accessing the OpenAI API¶
The OpenAI API allows programmatic access to models like GPT-3.5, GPT-4, DALL·E, and more, enabling integration into applications and research workflows.
Signing up for the OpenAI API:
-
Open the OpenAI Platform: Go to https://platform.openai.com/.
-
Sign up or Log in:
- Sign up: If you don’t have an OpenAI account, create one. You can reuse your ChatGPT account credentials.
- Log in: If you already have an account, log in.
Creating API Keys:
-
Navigate to the API Keys page: Click on your profile icon in the top-right corner and select "View API keys."
-
Create a new API key: Click on "Create new secret key."
-
Name your key (optional): Give it a descriptive name for tracking purposes.
-
Copy and securely store your API key:
Important: You will not be able to view the full API key again. Store it in a password manager or a secure environment variable.
Treat your API key like a password
Do not share it publicly or commit it to version control platforms (like GitHub).
Using the OpenAI API: - Documentation: Visit the OpenAI API Reference for guidance, code examples, and model parameters.
-
Pricing: Review the OpenAI Pricing page for cost details, which are based on the number of tokens processed.
-
Rate Limits: Familiarize yourself with API rate limits to prevent disruptions.
Large context windows allow for more extensive prompt engineering and large-document analysis but can increase costs significantly. Plan your usage accordingly.
Additional References and Useful Links¶
- OpenAI Research Index: https://openai.com/research
- GPT-4 Technical Report: https://arxiv.org/abs/2303.08774
- OpenAI Teaching Resources: Some institutions have guidance on using AI tools in education. Check your local teaching center or ask your institution’s IT or library services.
- Privacy and Security: Review OpenAI’s Privacy Policy and ensure compliance with your institution’s guidelines.
Next Steps:
- After setting up your account and API keys, proceed to the next section for hands-on prompt engineering exercises and best practices.