For developers

Build on ergot.

Add a media asset pipeline to your product in an afternoon. The SDK gives you a typed client, pipeline runs, rights preflight, and embeddable UI.

npm install @happyvertical/ergot-sdk
import { MamConsumerClient } from '@happyvertical/ergot-sdk' const ergot = new MamConsumerClient({ baseUrl: 'https://ergot.example.com', apiKey: process.env.ERGOT_API_KEY, }) const { items } = await ergot.listAssets()

Capabilities

What the SDK adds to your app.

One typed client over the whole pipeline — drop it in and these come with it.

Typed media library
list · upload · version · deliver
Asset bindings
link assets to your objects
Pipeline runs
generate · transcribe · edit
Rights preflight
check before you publish
Ingestion sources
drive & watched folders
Webhooks
asset.ready · run events
Tenant provisioning
isolated workspaces
Usage accounting
metered, per event

Request a pipeline run.

Submit a run against your source assets, then poll or wait for the outputs. Idempotency keys make retries safe, and every run is traceable end to end.

  • Built-in pipelines: image, video, and audio
  • Place runs on edge, host, or cloud GPU
  • Await terminal status or subscribe to webhooks
const { run } = await ergot.submitPipelineRun({ pipelineSlug: 'video.generate', sourceAssetIds: ['asset-portrait'], parameters: { scriptText: 'Welcome aboard' }, }) const done = await ergot.waitForPipelineRun(run.id) console.log(done.outputAssetIds)

Check rights before you publish.

Run a preflight against the intended use and get a clear decision back — with a machine-readable trace, so a licensing mistake fails fast instead of shipping.

  • Decisions: allow, warn, requires approval, block
  • Scope by territory, channel, and commercial use
  • Full audit trace attached to every call
const { decision } = await ergot.preflightRights({ action: 'pipeline-submit', assetIds: ['asset-1'], intendedUse: { commercial: true, territory: 'EU' }, }) if (decision.outcome !== 'allow') { // 'warn' | 'requiresApproval' | 'block' }

Components

Drop in the UI, too.

The Svelte component kit ships the pieces you'd otherwise rebuild — asset browsing, pipeline launching, rights display.

<AssetPicker />
browse & select assets
<AssetDetail />
versions · renditions · lineage
<PipelineLauncher />
submit runs with a form
<PipelineRunProgress />
live status & steps
<RightsSummary />
preflight result + trace
<IngestionSourceSettings />
drive & folder sync

Add ergot to your stack.

Request an invite to get an API key, or read the docs to see the full client.