给 Agent 的产出一个链接
现在编码 Agent 会写很多 HTML:周报、图表、设计笔记、请求流程图。大多数最后只是某台电脑上的一个文件。想给别人看,就得找托管、配部署、再决定谁能看。
Artifacts(目前为 Beta)省掉这些步骤。把一个文件或小文件夹发布到 AnyRouter,就得到一个固定链接 https://anyrouter.dev/a/<id>。再次发布会在同一链接下生成新的编号版本。每个 Artifact 在你修改之前都是私有的。
快速上手
安装 anyr CLI 并登录。稳定版 CLI 已包含 artifact 命令。
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr login发布一个页面,CLI 会打印链接。
anyr artifact publish ./page.html --title "Sales board"页面是私有的,只有你能打开。想分享时,把它设为 unlisted:
anyr artifact visibility <id> unlisted用任意 AnyRouter API Key 也可以通过 HTTP 发布:
curl -sS https://anyrouter.dev/api/v1/artifacts \
-H "Authorization: Bearer $ANYROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Hello","files":{"index.html":{"content":"<h1>Hi</h1>"}}}'{
"id": "k3Vx9TqLm2Ab7Zcd",
"version": 1,
"url": "https://anyrouter.dev/a/k3Vx9TqLm2Ab7Zcd",
"visibility": "private"
}可以发布什么
一个文件,或带样式、脚本和图片的文件夹。入口文件的扩展名决定访问者看到的样子。
| 入口 | 访问者看到 |
|---|---|
.html | 页面本身 |
.md | 排版后的文字 |
.svg | 图片(其中的脚本不会运行) |
.mmd、.mermaid | 在浏览器中绘制的 Mermaid 图 |
.py、.ts、.sql、.go、.rs 等源码 | 带语法高亮的代码 |
文件夹里优先打开 index.html。.js、.css、.json、.csv 等文件永远不会作为入口,所以页面加上它的 app.js 仍然打开页面。
三种用法
让 Agent 发布它的报告。 能运行命令行的 Agent 一条命令就能发布,并从 JSON 中读取链接。让它生成页面,然后运行:
anyr artifact publish report.html --json连接 AnyRouter MCP 服务器的 Agent 也可以调用 publish_artifact 工具。它接受最多 1 MB 的文本文件,需要带 write:artifacts 权限的管理密钥。
分享一张图。 .mmd 文件会渲染成 Mermaid 图。把链接贴到 PR 或聊天里即可。
curl -sS https://anyrouter.dev/api/v1/artifacts \
-H "Authorization: Bearer $ANYROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Flow","files":{"flow.mmd":{"content":"graph TD\n A[Request] --> B{Key valid?}\n B -->|yes| C[Route]\n B -->|no| D[401]"}}}'给会变化的页面一个固定链接。 发布一个文件夹,之后把新版本发到同一个 id。每个版本都有编号和可选标签,拿到链接的人始终看到最新版本。
anyr artifact publish ./report
anyr artifact publish ./report --id k3Vx9TqLm2Ab7Zcd --label "fix chart"CLI 上传文件夹时会跳过点文件、node_modules 和 .git。
分享与隐私
每个 Artifact 有三种可见性之一:
| 可见性 | 谁能打开 | 是否列出 | 搜索引擎 |
|---|---|---|---|
private(默认) | 只有你 | 否 | 否 |
unlisted | 任何拿到链接的人 | 否 | 否 |
public | 任何拿到链接的人 | 出现在公开列表 | 是 |
- 默认隐藏你的名字。页面头部显示 "by an AnyRouter user",直到你开启
--show-author。邮箱永远不会显示。 - 私有 id 对除你以外的人返回 404,别人无法探测它是否存在。
- 账号注册 24 小时后才能把 Artifact 设为公开,每天最多 5 个。每个 Artifact 页面都有举报按钮。
- 你可以看到自己 Artifact 的每日浏览量和访客数。这些计数不保存 IP 地址或用户身份。
- 页面只能 fetch 自己这个版本的文件。请求其他 Artifact 或其他 URL 会被拦截。
- 删除 Artifact 后,链接对其他人立即失效。
可以在控制台的 Artifacts 页面,或用 anyr artifact visibility 修改可见性和是否显示名字。
限制
限制如下:
| 限制 | 数值 |
|---|---|
| 每个账号的 Artifact 数 | 100 |
| 每个账号的存储(当前版本) | 200 MB |
| 每小时发布次数 | 20 |
| 单个页面或源码文件 | 5 MB |
| 单个图片、字体或脚本 | 25 MB |
| 单个版本 | 200 个文件,100 MB |
CLI 单次发布最多上传 50 个文件、20 MB。更大的文件夹请用 API 的清单上传。
试一试
Artifacts API 文档介绍了文件夹上传、版本冲突、所有错误码和 MCP 工具。在 anyrouter.dev/artifact 查看别人发布的内容,在控制台的 Artifacts 页面管理你自己的 Artifact。
一条命令发布你的第一个页面。
打开 Artifacts相关文章
MCP servers for AI agents: what they are and how to connect one
An MCP server lets an AI agent call a workspace's tools — keys, credits, models, status — over one standard interface instead of custom glue code per service. Here's what MCP is and how to connect AnyRouter's managed MCP server to Claude Desktop, Claude Code, Cursor, or your own agent.
Run coding agents through one gateway
Point Claude Code, Codex, OpenCode, Cursor, or any OpenAI-compatible tool at AnyRouter and get one key for every model, unified billing, per-request audit logs, and app attribution. Two environment variables — or one npx command with the anyr CLI launcher.
CLI update: multiple accounts, terminal key management, and agents that delegate
The AnyRouter CLI now handles several accounts side by side, manages API keys without the dashboard, runs plan-then-implement pipelines across two models, and lets coding agents hand tasks to each other — one hop, one key.