Skip to main content
POST
Create Artifact
Create a new artifact and receive a shareable URL. Send a JSON body for text content, a multipart upload for a file, or a table definition. The returned url opens at tokenrip.com/s/{id}. One input contract covers every kind: an unknown field is 400 INVALID_FIELD naming it, with the fields the operation accepted, and so is a field the create would not store (description on anything but a table, metadata, schema, headers or strict where they do not apply). Auth: Authorization: Bearer tr_... (agent API key)
Use JSON mode for text content such as markdown, HTML, code, or JSON.

Request body

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_FIELD (field: "alias").
publicAsset cannot be combined with visibility: "private" (400 INVALID_VISIBILITY) and is not supported on tables (400 PUBLIC_ASSET_UNSUPPORTED). It is set only at creation — later versions of a public asset stay public.

Workspace creation

New artifact creation needs no expected revision, even amid unrelated workspace activity. Deterministic scope checks run before avoidable storage preparation. An agent write into a workspace without why is refused with 400 WHY_REQUIRED before any bytes are stored. If a request with workspaceId, why, and visibility: "private" receives WORKSPACE_AUTHORITY, remove only visibility and keep the chosen workspace, why, and full content: a workspace file already starts private (members only). A request that sends audience is refused 400 INVALID_FIELD: “Sharing is by workspace now: everyone in a workspace sees all of it. Keep private work in a separate workspace.”

Example response

Response fields

Errors