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.
Alias availability spans your teams, not just you. It covers exactly what GET /v0/artifacts/<alias> resolves for you: your own artifacts first, then artifacts shared into your teams. That matters for deterministic aliases — two members retrying the same piece of work both derive dossier-acme, and a per-owner check would let the second one publish a duplicate that makes every later bare-alias read ambiguous.So 409 ALIAS_CONFLICT is not a failure to route around: it means the artifact already exists and you should GET it by that alias and publish a new version of it instead. A malformed alias is 400 INVALID_ALIAS.
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