Class videos are educational-style videos where an AI avatar presents content with a script. They’re ideal for tutorials, onboarding, and course content.
const response = await fetch('https://api.hooked.so/v1/project/create', { method: 'POST', headers: { 'x-api-key': 'your_api_key_here', 'Content-Type': 'application/json' }, body: JSON.stringify({ type: 'class', name: 'Product Tutorial', script: `Hello! Welcome to this tutorial.Today, I will show you how to use our product effectively.Let me walk you through the key features step by step.`, avatarId: 'avatar_sarah_01', voiceId: 'tzX5paJ07p5hyWFcU3uG', aspectRatio: 'ratio_9_16', captions: true, webhook: 'https://your-domain.com/webhook' })});const data = await response.json();console.log('Project ID:', data.data.projectId);
curl -X GET "https://api.hooked.so/v1/avatar/list" \ -H "x-api-key: your_api_key_here"curl -X GET "https://api.hooked.so/v1/voice/list?language=English" \ -H "x-api-key: your_api_key_here"
2
Create the video
Copy
curl -X POST "https://api.hooked.so/v1/project/create" \ -H "x-api-key: your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "type": "class", "name": "My Tutorial", "script": "Hello! Welcome to this tutorial. Today I will show you how to use our product.", "avatarId": "avatar_sarah_01", "voiceId": "tzX5paJ07p5hyWFcU3uG", "aspectRatio": "ratio_9_16", "captions": true, "webhook": "https://your-domain.com/webhook" }'
3
Receive webhook
When the video finishes processing (typically 2-5 minutes), your webhook receives: