kagi summarize
Summarize URLs or text content using either the paid public API or the subscriber web Summarizer.

Synopsis
Description
Thekagi summarize command provides access to two different summarization systems:
- Public API Mode - Uses Kagi’s paid Universal Summarizer API (requires
KAGI_API_TOKEN) - Subscriber Mode - Uses your Kagi subscription’s web-based Summarizer (requires
KAGI_SESSION_TOKEN)
Authentication Modes
Public API Mode (Default)
Requires:KAGI_API_TOKEN
Uses the documented Universal Summarizer API endpoint. This is a paid service that consumes API credit.
Features:
- Multiple summary engines (cecil, agnes, etc.)
- Caching support
- Structured JSON output
- Consistent API behavior
Subscriber Mode
Requires:KAGI_SESSION_TOKEN + --subscriber flag
Uses the subscriber web product’s summarization feature. This is included with your Kagi subscription.
Features:
- Multiple summary lengths (headline to long)
- Multiple summary types (summary, keypoints, eli5)
- Translation support
- Web product integration
Options
Content Input (One Required)
--url <URL>
URL of the page to summarize.
Example:
--text <TEXT>
Raw text to summarize.
Example:
--url or --text, not both.
Mode Selection
--subscriber
Use subscriber web Summarizer instead of public API.
Requires: KAGI_SESSION_TOKEN
Example:
Public API Options
--engine <ENGINE>
Summarization engine to use (public API only).
Values:
cecil- Balanced summarization (default)agnes- Alternative engine- Additional engines as documented
--cache <BOOL>
Enable/disable response caching (public API only).
Values: true, false
Default: true
Example:
Subscriber Mode Options
--length <LENGTH>
Summary length (subscriber mode only).
Values:
headline- Briefest (1-2 sentences)overview- Short summary (3-5 sentences)digest- Medium length (paragraph)medium- Detailed (multiple paragraphs)long- Most comprehensive
--summary-type <TYPE>
Style of summary (subscriber mode only).
Values:
summary- Standard summarykeypoints- Bullet point key pointseli5- Explain Like I’m 5 (simplified)
Universal Options
--target-language <LANG>
Target language for summary output.
Example:
Output Format
Public API Output
Subscriber Mode Output
Examples
Public API Examples
Subscriber Mode Examples
Processing Examples
Mode Comparison
| Feature | Public API | Subscriber Mode |
|---|---|---|
| Token Required | KAGI_API_TOKEN | KAGI_SESSION_TOKEN |
| Cost | API credit | Included with subscription |
| Engines | Multiple (cecil, agnes, etc.) | Web product default |
| Lengths | Standard | headline, overview, digest, medium, long |
| Types | Standard | summary, keypoints, eli5 |
| Caching | Optional | N/A |
| Flag | None (default) | --subscriber |
Common Patterns
Research Pipeline
Quick Reference
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success - summary generated |
| 1 | Error - see stderr for details |
- Missing required token
- Invalid URL
- Network error
- Rate limiting
Troubleshooting
”this command requires KAGI_API_TOKEN”
You’re using public API mode without an API token. Either:- Set API token:
kagi auth set --api-token '...' - Or use subscriber mode: add
--subscriberflag
”this command requires KAGI_SESSION_TOKEN”
You’re using--subscriber mode without a session token. Set it:
“—length requires —subscriber”
The--length option only works with subscriber mode:
“—engine is only supported for the paid public summarizer API”
The--engine option only works with public API mode:
Empty output
- Verify URL is accessible and not blocked
- Check that content is text-based (not just images/video)
- Try different summary type or length
See Also
- Authentication Guide - Token setup
- Workflows - Usage patterns
- Auth Matrix - Command auth requirements