BevylDevelopers

TypeScript SDK

A typed client for the Partner API.

npm install @bevyl-ai/bevyl-sdk

The 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',
});
OptionDescription
apiKeyYour bvl_ API key.
workspaceIdThe workspace every call acts on. Create one client per workspace.
baseUrlDefaults to https://www.bevyl.ai.
fetchA custom fetch.

Methods

Paths are relative to /api/partner/v1.

MethodEndpoint
createWorkspacePOST /workspaces
getBrand, updateBrandGET, POST /brand
prepareVideoUploadPOST /videos/upload/prepare
completeVideoUploadPOST /videos/upload/complete
getVideoStatusPOST /videos/status
getVideoAnalysisPOST /videos/analysis
listVideosGET /videos
createProjectPOST /projects
listProjectsGET /projects
regenerateProjectPOST /projects/regenerate
getProjectStatusPOST /projects/status
listVoices, listTrends, listBackgroundMusicGET /voices, /trends, /background-music
previewBackgroundMusicPOST /background-music/preview
startExportPOST /exports
listExportsGET /exports
getExportStatusPOST /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.

On this page