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 legacy 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 legacy /api/v0 Universal Summarizer API endpoint with Bot auth. 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.
--filter
Read URLs or text items from stdin, one item per line, and summarize each item. Lines starting with http:// or https:// are sent as URLs; all other lines are sent as text.
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:
--local-cache
Store and reuse the response in the local cache under ~/.cache/kagi-cli or KAGI_CACHE_DIR.
--cache-ttl <SECONDS>
Override the local cache TTL. Summarize defaults to 3600 seconds when --local-cache is enabled.
Output Format
Public API Output
Subscriber Mode Output
Examples
Public API Examples
Subscriber Mode Examples
Processing Examples
Mode Comparison
Common Patterns
Research Pipeline
Quick Reference
Exit Codes
Common errors:
- 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