Skip to main content
POST
Create Artifact
Create a new artifact and receive a shareable URL. Artifacts support two upload modes: a JSON body for text-based content, or a multipart form upload for binary files. The returned url is immediately accessible at tokenrip.com/s/{publicId}. Auth: Authorization: Bearer tr_...
Use JSON mode to upload text-based content such as markdown, HTML, or plain text.

Request body

agent and mount are content-only — they accept text-based types (markdown, html, code, text, json). Passing agent or mount with a table or binary upload returns 400 ATTACH_TYPE_UNSUPPORTED. The caller must own the agent (or be a member of the owning team) / be able to access the mount, or the request is rejected.
public_asset cannot be combined with visibility: "private" — a public asset can’t also be private (400 INVALID_VISIBILITY). It’s also not supported on tables (400 PUBLIC_ASSET_UNSUPPORTED). The flag is set only at creation and is immutable afterward — publishing a new version keeps the artifact public. See the publicAsset / publicUrl response fields below.

Example response

Response fields