OpenAI Setup
OpenAI GPT Setup
Getting Your API Key
- Visit OpenAI Platform
- Create an account or sign in
- Navigate to API Keys
- Click Create new secret key
- Copy the generated key
Free Tier
- No free tier available
- Pay-as-you-go pricing
- $5 minimum credit purchase to start
Environment Variables
export OPENAI_API_KEY="your-api-key-here"Add to your shell profile to persist:
echo 'export OPENAI_API_KEY="your-api-key-here"' >> ~/.bashrcsource ~/.bashrcVerify Your Setup
Test your API key:
curl https://api.openai.com/v1/models \ -H "Authorization: Bearer $OPENAI_API_KEY"A successful response lists available models. Verify your key and billing if you receive an error.