TypeScript SDK
A typed client for the Partner API.
npm install @bevyl-ai/bevyl-sdkThe SDK needs Node.js 18 or newer and ES modules. It depends only on zod.
import { BevylClient } from '@bevyl-ai/bevyl-sdk';
const bevyl = new BevylClient({
apiKey: process.env.BEVYL_API_KEY!,
workspaceId: 'customer-123',
});| Option | Description |
|---|---|
api | Your bvl_ API key. |
workspace | The workspace every call acts on. Create one client per workspace. |
base | Defaults to https://www.. |
fetch | A custom fetch. |
Methods
Paths are relative to /api/partner/v1.
| Method | Endpoint |
|---|---|
create | POST /workspaces |
get, update | GET, POST /brand |
prepare | POST /videos/upload/prepare |
complete | POST /videos/upload/complete |
get | POST /videos/status |
get | POST /videos/analysis |
list | GET /videos |
create | POST /projects |
list | GET /projects |
regenerate | POST /projects/regenerate |
get | POST /projects/status |
list, list, list | GET /voices, /trends, /background-music |
preview | POST /background-music/preview |
start | POST /exports |
list | GET /exports |
get | POST /exports/status |
The API reference lists every field.
Schemas and types
The SDK ships the zod schemas the API validates with:
import { CreateProjectRequestSchema } from '@bevyl-ai/bevyl-sdk/schemas';Types come from @bevyl-ai/bevyl-sdk/types.
Webhooks and errors
parseWebhookEvent, verifySignature, signBody, and SIGNATURE_HEADER verify deliveries. See Webhooks.
The SDK throws BevylApiError on non-2xx responses, BevylApiProtocolError on a 2xx with an invalid body, and BevylWebhookVerificationError from parseWebhookEvent. See Errors.