从提示到网址
让 ChatGPT 写一个自包含的 index.html。把文件存进目录,用 anyr CLI 发布目录,复制命令输出的网址。页面默认私密,直到你修改 visibility。
- The link has the shape
https://anyrouter.dev/a/<id>. It stays the same across versions. - Every artifact starts
private. Useunlistedfor a link you send to one person, andpubliconly when you want the gallery and search engines to see it. - An account can hold 100 artifacts and 200 MB in current versions, with 20 publishes per hour.
- A folder publish accepts up to 50 files and 20 MB in the CLI. A single inline REST publish accepts 10 MB. The MCP
publish_artifacttool takes 1 MB of text. - An account can make artifacts public 24 hours after sign-up, up to 5 a day. These limits and the file types are in the Artifacts API reference, read on 22 November 2026.
要求一份能真正渲染的文件
artifact 页面运行在沙箱 frame 中。它能读取同一版本里的其他文件,但不能请求外部网址。依赖 CDN 脚本或远程字体的页面会显示异常。
Write a single self-contained index.html for a small project dashboard.
Put all CSS in a style tag and all JavaScript in a script tag.
Use inline SVG for icons. Do not load fonts, images or scripts from other URLs.
Use system fonts. Return only the file contents.如果回答包含多个文件,把它们存到同一目录。index.html 入口会优先打开。若目录里有两个候选入口,请用 entry_path 指定。
从终端发布
安装 CLI,登录,然后发布目录。CLI 会输出网址和版本号。
curl -fsSL https://anyr.dev/cli.sh | bash
anyr auth login
anyr artifact publish ./my-site --title "Weekend build" --visibility unlisted --json{
"id": "k3Vx9TqLm2Ab7Zcd",
"version": 1,
"url": "https://anyrouter.dev/a/k3Vx9TqLm2Ab7Zcd",
"visibility": "unlisted"
}之后要替换页面,把新目录发布到同一个 id。已经拿到链接的人会看到最新版本。
anyr artifact publish ./my-site --id k3Vx9TqLm2Ab7Zcd --label "fix hero"CLI 发布目录时会跳过点文件和 node_modules。单个文件按 UTF-8 文本上传,所以二进制图片请放进目录。
在 ChatGPT 中通过 MCP 发布
如果 ChatGPT 已安装 AnyRouter 插件并授予 Standard 权限,它无需终端就能调用 publish_artifact。该工具接收路径到文本内容的映射,适合一个 HTML 文件或一份小型 HTML 与 CSS 组合。
先阅读 ChatGPT 连接器指南,然后用自然语言提出发布请求。
@AnyRouter Use publish_artifact with title "Weekend build" and visibility unlisted.
Files: index.html set to the complete HTML you just wrote.
Return the URL from the reply.该工具限制 1 MB 文本且不能携带图片。带二进制资源的站点请使用 REST 目录流程。流程会发送带大小和 SHA-256 的 manifest,上传缺失文件,再提交。
分享、检查与清理
用一次 PATCH 请求就能修改 visibility。Dashboard 的 Artifacts 页面提供相同控件。
| Visibility | Who can open it | Gallery | Search engines |
|---|---|---|---|
private | Only you | No | No |
unlisted | Anyone with the URL | No | No |
public | Anyone with the URL | Yes | Yes |
- Your name stays off the page unless you set
show_author. Email is never shown. - The owner view reports daily views and visitors without storing an IP address.
- A private id answers 404 to everyone else, so the id is not a discovery path.
- Deleting an artifact stops its URL immediately. Do it only when you mean to.
A failed publish is usually one of four cases. entry_ambiguous means set entry_path. 413 means the inline body is too large, so use a folder. 403 account_too_new means use unlisted for now. A blank page usually means the HTML called an external URL that the sandbox blocks.
下一步
发布一个页面,把链接发给一个人,再向同一个 id 发布第二个版本。整个流程就是这样。Artifacts 发布公告介绍其他类型,包括 Markdown、Mermaid 图、表格和 React 组件。
Manage your pages in the dashboard.
Open Artifacts常见问题
相关文章
- AnyRouter + ChatGPT:用 MCP 插件连接GuidesNovember 22, 2026 · ChatGPT 无法更换自己的模型服务商。把 AnyRouter 添加为自定义 MCP 插件,就能在对话里查看模型、查询额度并发布页面。
- AnyRouter Artifacts 上线:发布一个页面,拿到一个链接ProductOctober 26, 2026 · Artifacts 把 HTML 页面、Markdown 笔记、Mermaid 图或一个小文件夹变成 anyrouter.dev/a/<id> 的链接。可以用 anyr CLI、API 或 Agent 发布。每个 Artifact 默认私有,由你决定何时分享。
- CLI 更新:多账号、终端管 key、agent 互相委派ProductAugust 16, 2026 · AnyRouter CLI 现在可以并排管理多个账号,不进 dashboard 也能管 API key,用两个模型跑「先计划再实现」流水线,并让 coding agent 互相交活,一跳、一把 key。