SDKs
Official JavaScript/TypeScript and Python clients. Version 0.7.0 adds typed audio transcription plus bounded wait/resume helpers while preserving original-audio hosting and the complete video, quota-preflight, authentication, pagination, retry, resumable-upload, and export contracts.
npm install @pixelvault-dev/sdk@^0.7.0 # Node 18+, Workers, Deno, Bun, browsers
pip install "pixelvault>=0.7.0" # Python 3.9+, sync and asyncio Both clients read PIXELVAULT_API_KEY from the environment when no key is passed.
Upload and enrich
import { readFile } from "node:fs/promises";
import { PixelVault } from "@pixelvault-dev/sdk";
const pv = new PixelVault(); // reads PIXELVAULT_API_KEY
const video = await pv.videos.upload({
file: await readFile("demo.mp4"),
filename: "demo.mp4",
idempotencyKey: "demo-enrichment-1",
visibility: "private",
signExpiresIn: 3600,
});
const started = await pv.videos.enrich(video.id); // persist started.id + started.enrichment.job_id
const result = await pv.videos.waitForEnrichment(started.id, { timeoutMs: 600_000 });
// result.timedOut does not cancel the job; resume with waitForEnrichment(started.id)
const audio = await pv.audio.upload({
file: await readFile("episode.m4a"),
filename: "episode.m4a",
visibility: "private",
signExpiresIn: 3600,
idempotencyKey: "episode-v1",
});
const audioStarted = await pv.audio.enrich(audio.id);
const audioResult = await pv.audio.waitForEnrichment(audioStarted.id, { timeoutMs: 600_000 });
// Persist audioStarted.id + audioStarted.enrichment.job_id; timeout never cancels it. What the clients cover
Both clients cover typed audio upload/import, transcription, bounded wait/resume, status/artifacts, get/list/update/delete/signing, organization, metadata, TTL, and export, plus the complete MP4 lifecycle. Audio enrichment accepts sources up to 25,000,000 bytes and 10 minutes and shares the existing media-enrichment allowance with video. Wait helpers stop locally with timedOut/timed_out; they never cancel a server job (see Async jobs).
Sources: sdk-js and sdk-python.
Next steps
- Idempotency: make uploads safe to retry.
- Video transcripts and audio transcription walkthroughs.
- API reference for every endpoint the SDKs wrap.