This guide explains how to set up OpenRouter for Course Assignment.
What is OpenRouter?
OpenRouter is a unified API that provides access to multiple AI models from different providers through a single interface. Instead of setting up separate accounts with OpenAI, Anthropic, Google, and others, you can use one API key to access models from all of these providers.
Benefits for this course:
- Single API key for multiple models
- Consistent API interface (OpenAI-compatible)
- Easy model comparison
- Cost tracking across providers
- Free tier available for some models
Account Setup
Step 1: Create an OpenRouter Account
- Go to https://openrouter.ai/
- Click "Sign Up" in the top right corner
- You can sign in with:
- Google account
- GitHub account
- Email (create a new account)
- Complete the registration process
Step 2: Add Credits (if needed)
OpenRouter offers some free credits for new accounts, but you may need to add credits for extended use:
- Go to https://openrouter.ai/credits
- Add credits using a credit/debit card
- Note: For this course, $5-10 should be more than sufficient for all assignments. (Let me know otherwise.)