SDK Overview
Bold.js - TypeScript client for the Bold Video API
The Bold SDK (@boldvideo/bold-js) provides a TypeScript client for integrating Bold Video into your applications.
Installation
npm install @boldvideo/bold-jsQuick Start
import { createClient } from '@boldvideo/bold-js';
const bold = createClient('your-api-key');
// Fetch videos
const videos = await bold.videos.list();
// AI chat with streaming
for await (const event of bold.ai.chat({ prompt: 'What videos do you have?' })) {
if (event.type === 'text_delta') {
process.stdout.write(event.text);
}
}
// AI chat without streaming
const response = await bold.ai.chat({
prompt: 'Summarize the main topics',
stream: false
});Client Options
const bold = createClient('your-api-key', {
baseURL: 'https://custom-endpoint.example.com', // Optional
debug: true, // Optional
headers: { 'X-Custom': 'value' } // Optional
});| Option | Type | Description |
|---|---|---|
baseURL | string | Custom API endpoint |
debug | boolean | Enable debug logging |
headers | Record<string, string> | Additional HTTP headers |