Uploads & SDK
@cubster/assets is a typed, framework-agnostic client — zero React in the core. A client is created with createCubsterClient() and exposes four namespaces plus a set of pure URL builders.
| Namespace | Methods |
|---|---|
| apiKeys | create, list, revoke |
| services | list |
| workspaces | list, create |
| uploads | upload, createGrant, uploadWithGrant |
| assets | list, get, update, delete |
| transcribe | transcribe(input) |
| transcripts | list, get, delete, retry |
| URL builders | imageUrl, fileUrl, rawImageUrl, assetUrl, imageCascadePath, imageSrcSet, assetSrcSet, assetStorageKey |
Direct uploads (server, with a key), plus a grant flow for third-party browser uploads.
List (with type/search/tag filters), get, update, or delete assets already uploaded.
Session-only (a key can't mint other keys). The full secret is only ever returned once, on create.
create
takes an optional services array — the services the key should serve (default: all services) — see Services.
List or create workspaces you own — see the Workspaces concept page for the full management surface (rename, delete) exposed over REST.
Upload an audio file and get back a durable, speaker-labelled transcript (Deepgram Nova-3 today) —
audio up to 4 MB. A failed provider call still keeps the audio; the thrown CubsterError's transcriptFailure() carries the retry id. See the full Transcription page for the endpoint,
error table, and the Transcript JSON shape.
list
(list items omit text/segments/words,
carrying a preview instead), get (includes words), delete (also deletes the underlying audio asset), and retry (re-runs a pending/failed
transcript, reusing the stored audio — a completed one 409s).
No client needed — these mirror the API's serve-URL cascade exactly. Presets: thumb, avatar,
hero,
small,
medium,
large.
SVGs and generic files always serve as forced downloads from /f/:key.
Every non-2xx response throws a typed CubsterError carrying the HTTP status and the API's { error } message. A key-authed request outside its service scope 403s; its serviceDenied() narrows that to { service, enabled } without parsing body by hand.
- Max file size: 25 MB
- Max audio file size (for transcription): 4 MB
- Per-workspace storage cap: 1 GB
- Image types: png, jpeg, webp, gif, avif, svg+xml
- File types: pdf, text/plain, csv, markdown, json, zip
- Audio types: mp3, m4a, aac, wav, webm, ogg, flac