2 artifacts
Tap to collapse details
export OPENAI_API_KEY='sk-...'
~/.zshrc
.bashrc
.env
python-dotenv
Note: Initial requests may be free for testing; add credits later via billing for production.
❌ Pasting API key into code or public repo
→Always use environment variables or secret managers; add .env to .gitignore
❌ Losing the API key after generation
→Copy and store immediately; generate new if lost
Tap to expand details
Spin up a personalized “learn OpenAI API” plan you can save, check off, and return to anytime — unlimited on the free trial.
DataCamp
Coursera
OpenAI
by Packt Publishing
Official quickstarts, guides, and API reference
Jupyter notebooks for common tasks and projects
Official SDK for Python API calls
Test prompts without code in browser