Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.roughy.ai/llms.txt

Use this file to discover all available pages before exploring further.

What is an asset

Assets are the binary inputs and outputs of a pipeline. Source assets are uploaded by you; output assets are produced by processors. Both are addressable by ID across the API.

Types and states

Assets carry a type (what’s in them) and a state (where they are in their lifecycle).
TypeMeaning
AUDIOUploaded audio source.
VIDEOUploaded video source.
CUT_FILESRT output from the cut processor.
RENDERED_VIDEOMP4 output from the render processor.
You can only upload AUDIO and VIDEO; the other types are processor-generated.
StateMeaning
PENDING_UPLOADAsset row exists; bytes not yet uploaded.
READYBytes uploaded and stored.
DELETEDSoft-deleted; bytes purged after a 30-day grace.

Upload flow

Roughy uses the TUS resumable upload protocol for uploads. There is no pre-signed URL step — the client streams chunks directly to the TUS endpoint, which proxies to Supabase Storage server-side. The shape:
  1. POST /api/v1/assets/upload-resumable — create an upload session plus an asset row in PENDING_UPLOAD. The session ID is returned in the Location response header.
  2. PATCH /api/v1/assets/upload-resumable/{session_id} — upload one or more chunks. Resumable on connection drop.
  3. HEAD /api/v1/assets/upload-resumable/{session_id} — returns the current byte offset; use to resume after an interruption.
  4. When the final chunk lands, the asset transitions to READY.
  5. DELETE /api/v1/assets/upload-resumable/{session_id} — cancels an in-flight upload.
Most TUS clients handle the chunking and resume logic automatically — see the Upload an asset guide for ready-to-paste examples in JavaScript, Python, and raw cURL, or pick any TUS-compatible SDK from the implementations index.

Listing

GET /api/v1/assets lists your assets (filterable by state).

Reading

GET /api/v1/assets/{id} returns the asset detail. For READY assets the response includes a short-lived download_url. Hand that to your HTTP client to fetch the bytes; the URL expires after a short window, so don’t cache it.

Deleting

DELETE /api/v1/assets/{id} soft-deletes the asset. Bytes are hard-deleted by a background cron after a 30-day grace period.
  • Pipeline — assets flow in and out of pipelines.
  • Processor — processors consume and produce assets.