SDK
Getting Started
How to get started with the SDK.
To use the API, you'll need an API key. You can generate one from your dashboard.
Installation
You don't need to install an SDK. You can use any HTTP client to make requests to the API. Here are some examples using fetch
.
Usage
Here's a basic example of how to make a request to the Text Overlay API.
const apiKey = 'YOUR_API_KEY';
const videoUrl = 'https://example.com/video.mp4';
const textOverlays = [
{
text: 'Hello World',
position: { x: 50, y: 100 },
},
];
const textStyle = {
fontFamily: 'Arial',
fontSize: 48,
color: '#FFFFFF',
};
const response = await fetch('/api/render/text', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${apiKey}`,
},
body: JSON.stringify({
videoUrl,
textOverlays,
textStyle,
}),
});
const data = await response.json();
console.log(data.renderId);