Why OpenRouter?
- Free models available - No credit card required for free tier models
- Multiple models - Automatically fallback to different models if one fails
- Simple setup - Single API key for access to multiple providers
- Good quality - Free models perform well for code analysis tasks
Get an API key
Create an account
Visit openrouter.ai and sign up for a free account.
Get your API key
Navigate to Keys and create a new API key.
Setup
Option 1: Environment variable (recommended)
Set the environment variable in your shell:Option 2: .env file
Create a.env file in your project directory:
.env
Option 3: Configuration file
Create avibrant.config.js file:
vibrant.config.js
Usage
Run Vibrant with AI analysis:Free models
Vibrant automatically tries these free OpenRouter models in order:arcee-ai/trinity-large-preview:free (default)
arcee-ai/trinity-large-preview:free (default)
- Context: 128k tokens
- Quality: Excellent for code analysis
- Speed: Fast
- Best for: General code analysis
stepfun/step-3-5-flash:free
stepfun/step-3-5-flash:free
- Context: 32k tokens
- Quality: Good
- Speed: Very fast
- Best for: Quick analysis of smaller codebases
qwen/qwen3-235b-a22b-thinking-2507:free
qwen/qwen3-235b-a22b-thinking-2507:free
- Context: 32k tokens
- Quality: Excellent reasoning
- Speed: Medium
- Best for: Complex pattern detection
google/gemma-3-27b-it:free
google/gemma-3-27b-it:free
- Context: 8k tokens
- Quality: Good
- Speed: Fast
- Best for: Small files and quick checks
If one model fails or hits rate limits, Vibrant automatically tries the next available model. You’ll see which model is being used in the output.
Pricing
Free tier models:- Cost: $0.00 per request
- Rate limits: Varies by model (typically generous for free models)
- Usage limits: Fair use policy applies
Example output
When using OpenRouter, you’ll see which model is being tried:Troubleshooting
Error: API key not found
OPENROUTER_API_KEY environment variable:
Error: All models failed
Model fallback
If you see multiple “model failed” messages, Vibrant is automatically trying different models:Best practices
Next steps
AI providers overview
Compare all available providers
Google Gemini setup
Try Google’s free tier for faster analysis