Kagi Universal Summarizer
Summarize any URL or block of text using Kagi's Universal Summarizer API. Handles articles, papers, PDFs, video transcripts, forum threads, and more. Supports multiple summarization engines and can translate output to 28 languages.
This skill uses a Go binary for fast startup and zero runtime dependencies. The binary can be downloaded pre-built or compiled from source.
Setup
Requires a Kagi account with API access enabled. Uses the same KAGI_API_KEY as all other kagi-* skills.
- 1. Create an account at https://kagi.com/signup
- Navigate to Settings → Advanced → API portal: https://kagi.com/settings/api
- Generate an API Token
- Add funds at: https://kagi.com/settings/billing_api
- Add to your shell profile (
~/.profile or ~/.zprofile):
export KAGI_API_KEY="your-api-key-here"
- 6. Install the binary — see Installation below
Pricing
Token-based, billed per 1,000 tokens processed. Cached requests are free.
| Plan | Price per 1k tokens |
|---|
| Standard (Cecil / Agnes) | $0.030 |
| Kagi Ultimate subscribers |
$0.025 (automatically applied) |
| Muriel (enterprise-grade) | higher — check
API pricing page |
Usage
CODEBLOCK1
Options
| Flag | Description |
|---|
| INLINECODE3 | Summarize raw text instead of a URL |
| INLINECODE4 |
Summarization engine (see below, default:
cecil) |
|
--type <type> | Output type:
summary (prose) or
takeaway (bullets) |
|
--lang <code> | Translate output to a language code (e.g.
EN,
DE,
FR,
JA) |
|
--json | Emit JSON output |
|
--no-cache | Bypass cached responses |
|
--timeout <sec> | HTTP timeout in seconds (default: 120) |
Engines
| Engine | Description |
|---|
| INLINECODE17 | Friendly, descriptive, fast summary (default) |
| INLINECODE18 |
Formal, technical, analytical summary |
|
muriel | Best-in-class, enterprise-grade model — highest quality, slower |
Language Codes
Common codes: EN English · DE German · FR French · ES Spanish · IT Italian · PT Portuguese · JA Japanese · KO Korean · ZH Chinese (simplified) · ZH-HANT Chinese (traditional) · RU Russian · AR Arabic
Full list: BG CS DA DE EL EN ES ET FI FR HU ID IT JA KO LT LV NB NL PL PT RO RU SK SL SV TR UK ZH ZH-HANT
If no language is specified, the output language follows the document's own language.
Output
Default (text)
Prints the summary to stdout. Token usage and API balance are printed to stderr:
CODEBLOCK2
JSON (--json)
CODEBLOCK3
When to Use
- - Use kagi-summarizer when you have a URL or document and need a concise summary without reading it yourself
- Use
--type takeaway for structured bullet points — ideal for research papers, long articles, or meeting notes - Use
--engine muriel when quality matters most (longer documents, academic papers, technical reports) - Use
--lang when you need the summary in a language different from the source - Use kagi-fastgpt instead when you have a question that requires synthesizing information from multiple sources via live web search
- Use kagi-search instead when you need raw search results to scan or compare
Installation
Option A — Download pre-built binary (no Go required)
CODEBLOCK4
Pre-built binaries are available for Linux and macOS (amd64 + arm64) and Windows (amd64).
Option B — Build from source (requires Go 1.26+)
CODEBLOCK5
Alternatively, just run {baseDir}/kagi-summarizer.sh directly — the wrapper auto-builds on first run if Go is available.
The binary has no external dependencies — only the Go standard library.
Kagi 通用摘要工具
使用 Kagi 通用摘要 API 对任意 URL 或文本块进行摘要。支持文章、论文、PDF、视频转录、论坛帖子等。支持多种摘要引擎,并可输出翻译为 28 种语言。
本技能使用 Go 二进制文件实现快速启动,且无运行时依赖。二进制文件可下载预编译版本或从源码编译。
设置
需要拥有已启用 API 访问权限的 Kagi 账户。使用与所有其他 kagi-* 技能相同的 KAGIAPIKEY。
- 1. 在 https://kagi.com/signup 创建账户
- 导航至 设置 → 高级 → API 门户:https://kagi.com/settings/api
- 生成 API 令牌
- 在 https://kagi.com/settings/billing_api 充值
- 添加到您的 shell 配置文件(~/.profile 或 ~/.zprofile):
bash
export KAGI
APIKEY=your-api-key-here
- 6. 安装二进制文件 — 参见下方 安装
定价
基于令牌计费,按每处理 1000 个令牌收费。缓存请求免费。
| 方案 | 每千令牌价格 |
|---|
| 标准版(Cecil / Agnes) | $0.030 |
| Kagi Ultimate 订阅用户 |
$0.025(自动应用) |
| Muriel(企业级) | 更高 — 查看
API 定价页面 |
用法
bash
摘要一个 URL
{baseDir}/kagi-summarizer.sh https://example.com/article
摘要原始文本
{baseDir}/kagi-summarizer.sh --text 在此粘贴您的文章文本...
从标准输入管道传输文本
cat paper.txt | {baseDir}/kagi-summarizer
echo 长文本... | {baseDir}/kagi-summarizer.sh --type takeaway
选择引擎
{baseDir}/kagi-summarizer.sh https://arxiv.org/abs/1706.03762 --engine muriel
获取要点式摘要而非散文
{baseDir}/kagi-summarizer.sh https://example.com/article --type takeaway
将摘要翻译为其他语言
{baseDir}/kagi-summarizer.sh https://example.com/article --lang DE
{baseDir}/kagi-summarizer.sh https://example.com/article --lang JA
JSON 输出
{baseDir}/kagi-summarizer.sh https://example.com/article --json
组合选项
{baseDir}/kagi-summarizer.sh https://arxiv.org/abs/1706.03762 --engine muriel --type takeaway --lang EN --json
选项
| 标志 | 描述 |
|---|
| --text <文本> | 摘要原始文本而非 URL |
| --engine <名称> |
摘要引擎(见下方,默认:cecil) |
| --type <类型> | 输出类型:summary(散文)或 takeaway(要点) |
| --lang <代码> | 将输出翻译为指定语言代码(如 EN、DE、FR、JA) |
| --json | 输出 JSON 格式 |
| --no-cache | 绕过缓存响应 |
| --timeout <秒> | HTTP 超时时间(秒,默认:120) |
引擎
| 引擎 | 描述 |
|---|
| cecil | 友好、描述性、快速摘要 (默认) |
| agnes |
正式、技术性、分析性摘要 |
| muriel | 最佳、企业级模型 — 最高质量,速度较慢 |
语言代码
常用代码:EN 英语 · DE 德语 · FR 法语 · ES 西班牙语 · IT 意大利语 · PT 葡萄牙语 · JA 日语 · KO 韩语 · ZH 中文(简体) · ZH-HANT 中文(繁体) · RU 俄语 · AR 阿拉伯语
完整列表:BG CS DA DE EL EN ES ET FI FR HU ID IT JA KO LT LV NB NL PL PT RO RU SK SL SV TR UK ZH ZH-HANT
如果未指定语言,输出语言将跟随文档本身的语言。
输出
默认(文本)
将摘要打印到标准输出。令牌使用量和 API 余额打印到标准错误:
论文《注意力就是一切》介绍了 Transformer 架构,
这是一种全新的序列转换任务方法,完全依赖
注意力机制,摒弃了循环和卷积...
[API 余额:$9.9800 | 令牌:1243]
JSON(--json)
json
{
input: https://arxiv.org/abs/1706.03762,
output: 论文介绍了 Transformer...,
tokens: 1243,
engine: muriel,
type: takeaway,
meta: {
id: abc123,
node: us-east,
ms: 4821,
api_balance: 9.98
}
}
何时使用
- - 使用 kagi-summarizer:当您有 URL 或文档,需要简洁摘要而无需自行阅读时
- 使用 --type takeaway:获取结构化要点 — 适用于研究论文、长文章或会议记录
- 使用 --engine muriel:当质量最重要时(较长的文档、学术论文、技术报告)
- 使用 --lang:当您需要与源语言不同的摘要语言时
- 使用 kagi-fastgpt:当您的问题需要通过实时网络搜索综合多个来源的信息时
- 使用 kagi-search:当您需要原始搜索结果进行浏览或比较时
安装
选项 A — 下载预编译二进制文件(无需 Go)
bash
OS=$(uname -s | tr [:upper:] [:lower:])
ARCH=$(uname -m)
case $ARCH in
x86_64) ARCH=amd64 ;;
aarch64|arm64) ARCH=arm64 ;;
esac
TAG=$(curl -fsSL https://api.github.com/repos/joelazar/kagi-skills/releases/latest | grep tag_name | cut -d -f4)
BINARY=kagi-summarizer${TAG}${OS}_${ARCH}
mkdir -p {baseDir}/.bin
curl -fsSL https://github.com/joelazar/kagi-skills/releases/download/${TAG}/${BINARY} \
-o {baseDir}/.bin/kagi-summarizer
chmod +x {baseDir}/.bin/kagi-summarizer
验证校验和(推荐)
curl -fsSL https://github.com/joelazar/kagi-skills/releases/download/${TAG}/checksums.txt | \
grep ${BINARY} | sha256sum --check
预编译二进制文件适用于 Linux 和 macOS(amd64 + arm64)以及 Windows(amd64)。
选项 B — 从源码构建(需要 Go 1.26+)
bash
cd {baseDir} && go build -o .bin/kagi-summarizer .
或者,直接运行 {baseDir}/kagi-summarizer.sh — 如果 Go 可用,包装脚本会在首次运行时自动构建。
该二进制文件没有外部依赖 — 仅使用 Go 标准库。