Kinds and formats
HTML pages, markdown, code snippets and file shares, what each renders as, and the size limits.
Every document is a folder of files behind one stable URL, with index.html as the entry point. The kind records how the document was made and which tools can update it. There are four.
HTML (html)
Made with publish_html. Your page is stored as index.html and served inside the browser sandbox described in Sandboxing. Free workspaces include a small “Shared with Fermium” footer badge when HTML is viewed; the stored source stays unchanged. Paid plans remove this automatic badge. Add stylesheets, scripts, images and data files with put_file and reference them by relative path (<link href="style.css">, fetch("data.json")). Update with update_html.
Keep pages self-contained. The content host does not proxy the internet, and the sandbox blocks the page from reaching the app with your cookies. Remote fonts and CDN scripts referenced from the page are subject to the sandbox and the browser's normal rules; bundling assets into the document is the reliable choice.
A single HTML page may be up to 20 MiB of UTF-8, including embedded assets. Use publish_html/update_html for inline content. For a file already on disk, use create_upload then curl -T; .html/.htm uploads become rendered HTML pages. Pass doc_id, path: "index.html" and the latest base_version to replace an existing page at the same URL. Supporting files count toward the same 20 MiB document total.
Markdown (markdown)
Made with publish_markdown, or by uploading a .md or .markdown file. The server renders a readable page as index.html and stores the exact source as source.md, linked as "raw" from the page header. Supported: headings, tables, fenced code with syntax highlighting, task lists, strikethrough, autolinked URLs, inline HTML, and ```mermaid fences that render as diagrams. The page follows the reader's light or dark preference. A UTF-8 byte order mark and Windows line endings are normalized before rendering and storage. If you omit the title, the first heading is used. Update with update_markdown.
Diagrams
A fenced code block whose language is mermaid renders as a diagram: flowcharts, sequence diagrams, state diagrams, Gantt charts and the other Mermaid diagram types.
```mermaid
flowchart LR
Draft --> Review --> Published
```
Diagrams render wherever the markdown does:
- on the document's published page and on wiki and published-folder pages;
- in the app: folder index pages in the navigator's Page view, agent files, and workflow steps;
- in the editor's live preview, shortly after you stop typing.
The diagram follows the reader's light or dark theme. If a diagram's source is invalid, the source stays visible as a code block instead of breaking the page. Diagram text is rendered in strict mode, so markup and scripts inside labels are not executed.
Every rendered diagram has an Expand diagram button in its top right corner. It opens the diagram in a large viewer:
| Action | Mouse or touch | Keyboard (published pages and the editor preview) |
|---|---|---|
| Zoom in and out, 20% to 800% | the zoom buttons, or the scroll wheel | + or = to zoom in, - to zoom out |
| Pan | drag the diagram | |
| Reset zoom and position | the reset button | 0 |
| Close | the close button, or a click outside the viewer | Escape |
The current zoom is shown next to the buttons. In the app's own viewer the buttons, wheel, drag and Escape work; the +, - and 0 keys apply to published pages and the editor preview.
Snippet (snippet)
Made with publish_snippet. Code is highlighted server-side into a dark page with line numbers and a raw link; the source is stored as source.<ext> where the extension follows the language. Pass a lexer name such as python, typescript or bash, or omit it (or pass auto) to detect from the content. The detected language comes back in attrs.language. Update with update_snippet; pass language to switch or re-detect.
File share (file)
Made with publish_file (base64, up to 20 MiB) or create_upload followed by a raw HTTPS PUT (up to 2 GiB). The file is stored under its own name and a page is generated around it depending on the extension:
| Extension | Page |
|---|---|
png jpg jpeg gif webp svg ico |
dark image viewer with click-through to the original |
mp4 webm m4v mov mkv |
video player with title and description; a poster frame is grabbed after upload so links unfurl with a thumbnail |
mp3 m4a aac wav ogg opus flac |
audio player with title and description |
pdf |
the PDF itself, served at the document root so the browser's own viewer opens it |
txt csv json zip js css |
a download page with the file name, size and type; JS/CSS capped at 20 MiB |
md markdown |
rendered as a markdown document by default; pass render=false to share the file as a download instead |
Other extensions are refused. File shares accept a markdown description (up to 16 KiB) shown under the player or image; set or change it later with set_description. PDFs have no viewer page, so they cannot carry a description. The payload of a file share is immutable; publish a new one to replace it.
Serving supports HTTP range requests, so video and audio seek and large downloads resume.
Limits
| Limit | Value |
|---|---|
One file through a tool call (publish_html, update_html, publish_file, put_file) |
20 MiB decoded |
One HTTP upload (create_upload, PUT /api/upload) |
20 MiB for HTML, JS/CSS or an existing file replacement; 2 GiB for other new file shares |
| All files in one document | 20 MiB; a file share may instead hold one streamed upload |
| Documents per account | 5,000 |
| Storage per workspace | by plan; see Plans and limits |
| Tags per document | 10 |
| Description on a file share | 16 KiB (2,000 characters when passed to create_upload) |
Uploads beyond these limits fail with a 413 and a message naming the cap.