Error Reference
This guide catalogs all error messages from the kagi CLI, organized by category with explanations and solutions.Error Format
Errors follow this pattern:Error: missing credentials - this command requires KAGI_SESSION_TOKENError: Auth error: Kagi Search API request rejected: HTTP 403 Forbidden
Authentication Errors
”missing credentials”
Message:“this command requires KAGI_SESSION_TOKEN”
Message:“this command requires KAGI_API_TOKEN”
Message:“auth check failed”
Message:- Token expired
- Token revoked
- Token regenerated in Kagi settings
- Account doesn’t have required access
- Log into kagi.com
- Navigate to Settings → Account (session) or API
- Generate new token
- Update configuration:
- Verify:
kagi auth check
”Insufficient credit”
Message:- Check API credit in Kagi settings
- Add credit if needed
- Or use subscriber features (no credit required)
Configuration Errors
”Config file not found”
Message:kagi auth set to create it, or use environment variables.
”Permission denied”
Message:Command Errors
”—length requires —subscriber”
Message:--length option only works with subscriber summarizer mode.
Solution:
“—engine is only supported for the paid public summarizer API”
Message:--engine option doesn’t work with subscriber mode.
Solution:
“—cache is only supported for the paid public summarizer API”
Message:--cache option doesn’t work with subscriber mode.
Solution:
“—url or —text required”
Meaning: Summarize command needs content to summarize. Solution:Network Errors
”Network error: request to Kagi timed out”
Meaning: Request took too long to complete. Causes:- Slow internet connection
- Kagi service slow
- Rate limiting
- Check internet connection
- Try again later
- Add retry logic:
“Failed to connect”
Meaning: Cannot establish connection to Kagi. Causes:- No internet
- DNS failure
- Firewall/proxy blocking
“DNS resolution failed”
Meaning: Cannot resolve kagi.com hostname. Solution:“SSL/TLS error”
Meaning: Certificate validation failed. Causes:- System time wrong
- Outdated CA certificates
- Corporate proxy
Parse Errors
”failed to serialize search response”
Meaning: Response couldn’t be parsed as JSON. Causes:- API returned unexpected format
- Version mismatch
- Corrupted response
- Update kagi CLI:
- Check raw output:
“failed to parse”
Meaning: General parsing error. Solution:Rate Limit Errors
”Rate limit exceeded”
Meaning: Too many requests in short time. Solution:- Wait a few minutes
- Add delays between requests:
- Reduce request frequency
”Too many requests”
Same as rate limit. Wait and retry with slower pace.Installation Errors
”command not found”
Meaning: kagi not in PATH. Solution:“No such file or directory”
Meaning: Binary missing or wrong path. Solution: Reinstall using install script or package manager.Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Any error (check stderr) |
Debugging Strategy
Step 1: Check Basic Functionality
Step 2: Check Authentication
Step 3: Isolate the Issue
Step 4: Check Environment
Getting Help
If you encounter an error not listed here:- Check Troubleshooting
- Search GitHub Issues
- Create new issue with:
- Error message (exact text)
- Command you ran
- kagi version (
kagi --version) - OS and version