Skip to main content

kagi summarize

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

Synopsis

Description

The kagi summarize command provides access to two different summarization systems:
  1. Public API Mode - Uses Kagi’s legacy paid Universal Summarizer API (requires KAGI_API_TOKEN)
  2. Subscriber Mode - Uses your Kagi subscription’s web-based Summarizer (requires KAGI_SESSION_TOKEN)
The two modes have different capabilities, pricing models, and output options. Choose the mode that best fits your use case.

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
Cost: Consumes API credit per request

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
Cost: Included with subscription (no additional charges)

Options

Content Input (One Required)

--url <URL>

URL of the page to summarize. Example:

--text <TEXT>

Raw text to summarize. Example:
Note: Choose either --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
Example:

--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
Example:

--summary-type <TYPE>

Style of summary (subscriber mode only). Values:
  • summary - Standard summary
  • keypoints - Bullet point key points
  • eli5 - Explain Like I’m 5 (simplified)
Example:

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 --subscriber flag

”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