What it’s good for
Widest model selection available — access Claude, GPT-4, Llama, Mistral, and hundreds more through one API key. Good for trying different models without managing separate accounts, or for accessing models not directly supported by Spaceduck’s other providers.Requirements
- An OpenRouter account and API key
- Sign up and get your key at openrouter.ai/keys
Configure in Spaceduck
Chat
Set your API key
In Settings > Chat, select OpenRouter as the provider, then enter your API key.Or via CLI:
Select a model
In Settings > Chat:
- Provider: OpenRouter
- Model: use the OpenRouter model ID, e.g.:
anthropic/claude-3.5-sonnetmeta-llama/llama-3.1-70b-instructmistralai/mistral-large-latest
Embeddings
OpenRouter does not provide an embeddings API. If you want semantic recall, pair OpenRouter with a separate embedding provider:- Local: llama.cpp embeddings or LM Studio
- Cloud: Bedrock (Titan) or Gemini (
text-embedding-004)
Test and troubleshoot
| Problem | Cause | Fix |
|---|---|---|
401 Unauthorized | Invalid API key | Check your key at openrouter.ai/keys |
402 Payment Required | Insufficient credits | Add credits at openrouter.ai/credits |
| Model not found | Wrong model ID format | Use the full org/model-name format from OpenRouter’s model list |
429 Too Many Requests | Rate limit hit | Wait and retry, or use a different model |
