publish
Store a finished page as a versioned artifact and get an ID to track processing status. Supports HTML, Markdown, PDF, DOCX, XLSX with built-in safety scans.
Instructions
Store a page you have already finished. Use this when you already have the finished page. No model call. Returns artifact_id, version, and job_id immediately. Then call status(job_id, wait=90). When the job is done, status and inspect list safety_changes for each safety edit that changed the page. HTML publish does not turn bare URLs into links. The document title is stored as given and escaped in the page. note is optional. Inspect shows a non-empty note beside "Published a finished page." It is not the text a later edit sends to the model. A secret, private link, or over-long note is rejected before a row exists.
Want a styled page? Pass Markdown and it is styled automatically. Omit format when you pass
markdown and no html. style is house, bold, editorial, playful, terminal, or swiss (default house)
and is applied when the page is opened. The stored file stays Markdown. You can still pass
format=markdown. On a new artifact, if you also pass html, html is the page unless you set format.
Raw HTML is shown
exactly as given, with no ArtifactSmith styling. If that HTML has little or no CSS, the result
includes warning. Pass format for pdf, docx, or xlsx.
html is the complete HTML document when format is html. markdown is the finished Markdown when
format is markdown, pdf, docx, or xlsx. You may pass the other field as well: it is checked for
secrets and private links and is not rendered. PDF, DOCX, and XLSX do not use the HTML style sheet.
New artifact: pass display_name or slug (same rules as create). New version of an existing artifact:
pass artifact_id and base_version (the latest done version). Omit format on an html or markdown
artifact and markdown with no html is markdown; html with no markdown is html; both fields keep
the artifact's format. A pdf, docx, or xlsx artifact keeps that format when format is omitted and
the new page is markdown. Pass format to choose html, markdown, pdf, docx, or xlsx. Pass display_name
to rename the card when this version finishes. Omit display_name and a changed page title (the HTML
title, or the first Markdown heading) becomes the card title. The artifact id and slug stay the same.
Older versions keep the format they were published with.
The page runs the same safety pipeline as model output: size caps, secret scan, private-link checks,
the sanitizer, the renderer for format (including PDF, DOCX, and XLSX), and the final sweep. A rejected
page ends as failed, and error names the check that failed. publish does not create a share link.
It counts toward the per-token build quota and requires the publish permission.
summary and assumptions are optional card fields. Each is rejected when the call arrives if it is
longer than the metadata cap (the same 'metadata exceeds N characters' error the job would report).
They are also scanned like model output. On markdown, style changes the opened page. On HTML, style
is recorded and the submitted page is not restyled.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | ||
| note | No | ||
| slug | No | ||
| style | No | ||
| format | No | ||
| summary | No | ||
| markdown | No | ||
| workspace | No | ||
| artifact_id | No | ||
| assumptions | No | ||
| base_version | No | ||
| display_name | No | ||
| idempotency_key | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||