Từ prompt tới URL
Nhờ ChatGPT viết một file index.html tự chứa. Lưu file vào một thư mục, publish thư mục bằng CLI anyr, rồi chép URL mà lệnh in ra. Trang mặc định ở chế độ riêng tư cho đến khi bạn đổi 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.
Yêu cầu một file có thể render
Trang artifact chạy trong một frame bị cô lập. Trang có thể tải các file khác trong cùng phiên bản, nhưng không gọi URL khác. Trang phụ thuộc script CDN hoặc font từ xa sẽ bị hỏng giao diện.
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.Nếu câu trả lời gồm nhiều file, hãy lưu từng file vào cùng một thư mục. Entry index.html được mở trước. Nếu thư mục có hai entry hợp lệ, hãy đặt entry_path tới file bạn muốn.
Publish từ terminal
Cài CLI, đăng nhập, rồi publish thư mục. CLI in ra URL và số phiên bản.
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"
}Để thay trang sau này, gửi thư mục mới tới cùng một id. Người đã có link sẽ thấy phiên bản mới nhất.
anyr artifact publish ./my-site --id k3Vx9TqLm2Ab7Zcd --label "fix hero"CLI bỏ qua dotfile và node_modules khi publish thư mục. Một file đơn được tải lên dạng văn bản UTF-8, nên hãy đưa ảnh nhị phân vào thư mục.
Publish từ ChatGPT qua MCP
Nếu ChatGPT đã cài plugin AnyRouter với gói quyền Standard, nó có thể gọi publish_artifact mà không cần terminal. Công cụ nhận bản đồ đường dẫn tới nội dung văn bản, phù hợp cho một file HTML hoặc một cặp HTML và CSS nhỏ.
Bắt đầu với hướng dẫn connector ChatGPT. Sau đó yêu cầu publish bằng ngôn ngữ tự nhiên.
@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.Công cụ giới hạn 1 MB văn bản và không nhận ảnh. Với site có tài sản nhị phân, hãy dùng luồng thư mục REST. Luồng này gửi manifest kèm kích thước và SHA-256, tải các file còn thiếu, rồi commit.
Chia sẻ, kiểm tra và dọn dẹp
Đổi visibility bằng một yêu cầu PATCH. Dashboard có cùng các điều khiển trong mục 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.
Việc cần làm tiếp
Publish một trang, gửi link cho một người, rồi publish phiên bản hai tới cùng một id. Đó là toàn bộ vòng lặp. Bài giới thiệu Artifacts mô tả các loại khác, gồm Markdown, sơ đồ Mermaid, bảng tính và component React.
Manage your pages in the dashboard.
Open ArtifactsCâu hỏi thường gặp
Bài liên quan
- AnyRouter + ChatGPT: kết nối bằng plugin MCPGuidesNovember 22, 2026 · ChatGPT không đổi được nhà cung cấp model. Thêm AnyRouter làm plugin MCP tùy chỉnh để xem model, kiểm tra credit và publish trang trong chat.
- Giới thiệu AnyRouter Artifacts: đăng một trang, nhận một đường linkProductOctober 26, 2026 · Artifacts biến một trang HTML, một ghi chú Markdown, một sơ đồ Mermaid hay một thư mục nhỏ thành đường link anyrouter.dev/a/<id>. Đăng từ anyr CLI, API hoặc agent. Mọi artifact đều riêng tư lúc đầu, và bạn chọn khi nào chia sẻ.
- Cập nhật CLI: nhiều tài khoản, quản lý key trên terminal, và agent ủy thácProductAugust 16, 2026 · CLI AnyRouter giờ giữ vài tài khoản cạnh nhau, quản lý API key không cần dashboard, chạy pipeline lập kế hoạch rồi implement trên hai mô hình, và để coding agent giao việc cho nhau, một hop, một key.
Chọn gói và bắt đầu ngay
Go: $2/tháng, $4 credit.
Pro: $10/tháng, $20 credit.
Pro+: $45/tháng, $100 credit.
Max: $100/tháng, $300 credit.
Tạo tài khoản, thanh toán ở màn hình sau, rồi gọi model.