@lavendly/sdk
v0.1.0
Published
Official Node SDK for Lavendly - generate videos with one API call.
Readme
@lavendly/sdk
Official Node SDK for Lavendly.
npm i @lavendly/sdkimport { Lavendly } from '@lavendly/sdk';
const vs = new Lavendly({ apiKey: process.env.LAVENDLY_API_KEY });
const wf = await vs.workflows.create({
name: 'Fox in a bookshop',
shots: [{ prompt: 'a sleepy fox in a bookshop', duration: 5 }],
});
const { url } = await vs.renders.run(wf.id);
console.log(url);Highlights
- Idempotent by default. Every mutating method accepts
idempotencyKey. - One-call renders.
renders.run()creates the job and polls to completion. SupportsonProgress. - Strict errors. All API errors raise
LavendlyErrorwith.code,.status,.details. - Tool-use dispatcher.
vs.call(name, args)maps operation names to method calls - drop-in for the Anthropic SDK tool-use pattern. - TypeScript types bundled.
Full docs
https://docs.lavendly.ai/sdks/node
License
MIT
