Relying on human video editors to assemble bespoke welcome videos, dynamic billing explanations, or localized product walkthroughs in a web browser does not scale. When enterprise operations require generating tens of thousands of personalized videos populated from CRM databases, the web interface becomes an insurmountable bottleneck.
The DeepBrain AI Studios V3 REST API replaces manual timeline composition with a programmatic backend rendering pipeline. By interacting with the project creation endpoint (POST /api/odin/v3/editor/project), developers can dynamically construct complex multi-scene video timelines, bind digital avatars with synchronized speech scripts, insert personalized background graphics, and retrieve synthesized MP4 deliverables asynchronously.
At 365Finds, our engineering recommendation is decisive: treat the DeepBrain AI Studios REST API as an asynchronous job worker pipeline, never as a synchronous HTTP request. Video synthesis requires intense compute and queuing, typically taking between 1 and 10 minutes per video. Building your integration around asynchronous webhooks rather than blocking connections is mandatory for production reliability.
Architecture Overview: The Batch Video Pipeline
A resilient automated video production pipeline using DeepBrain AI connects your business systems to the AI Studios rendering engine through a decoupled event architecture:
[ CRM / Database Event ]
│
▼
[ App Backend / Task Worker ] ──> Fetch Dynamic Assets (CDN images, personalized text)
│
▼
[ POST /api/odin/v3/editor/project ] ──> DeepBrain AI Studios V3 Engine
│ (Returns projectId immediately)
▼
[ Asynchronous Wait State ]
├── Preferred: DeepBrain Webhook pushes completion event to your endpoint
└── Fallback: Worker polls GET /api/odin/v3/editor/progress/{projectId}
│
▼
[ Download & Distribution ] ──> Store MP4 in cloud storage / Notify user via email or SMS
AI Studios Batch API vs. AI Human SDK
Before diving into code, clarify your operational goal:
- AI Studios V3 REST API: Best for pre-rendered, high-fidelity MP4 video generation involving multiple timeline scenes, composited media clips, custom resolutions up to 4K, and offline delivery (email, onboarding portals, dynamic reports).
- DeepBrain AI Human SDK: Designed for real-time, interactive, two-way conversational streams (kiosks, customer service chat widgets) via WebRTC.
If your objective is generating packaged video assets for users to watch on demand, the REST API is the exact tool required.
Step 1: Authentication and Prerequisites
To invoke the AI Studios V3 API, your account must meet two initial criteria:
- Plan Tier: An active Pro plan or higher with API access enabled.
- API Credentials: Generate your API key by logging into AI Studios V3, clicking on your account profile in the top-right corner, and navigating to API Key.
Copy your user token immediately upon creation; AI Studios will not display it a second time.
Target Domains
DeepBrain AI maintains distinct domain infrastructures:
- Global service:
https://app.aistudios.com - China mainland service:
https://app.aistudios.cn
All API requests require the following HTTP headers:
Authorization: YOUR_AI_STUDIOS_API_KEY
Content-Type: application/json
Step 2: Constructing the Multi-Scene Payload (POST /api/odin/v3/editor/project)
The project creation endpoint accepts a comprehensive JSON manifest describing every scene, visual layer, avatar binding, and speech script.
Endpoint Definition
- URL:
POST https://app.aistudios.com/api/odin/v3/editor/project - Root Parameters:
name(string): Name of the video project.orientation(string): Either"landscape"(16:9) or"portrait"(9:16). Defaults to"landscape".resolution(string): Export resolution:"4k","1080","720", or"480". Defaults to"1080".isExport(boolean): Set totrueto immediately trigger video synthesis. If set tofalse, the project is saved as an editable draft in your AI Studios dashboard.webhookUrl(string, optional): The callback URL on your server where completion status and download URLs are sent.scenes(array of objects): Array defining the sequential timeline scenes.
The Scene Object Schema
Each entry in the scenes array requires:
sceneIdx(integer): Zero-based sequence index (0,1,2, ...).background(object): Details the background fill color or image URL.watermark(boolean): Toggle platform branding.clips(array of objects): Visual and audio layers, includingaiModel(the digital avatar),image,shape, oraudio.scripts(array of objects): Voice generation instructions.
The Critical Model Binding Rule
A frequent pitfall developers face is script desynchronization. In the V3 API, every speech script in scenes[].scripts[] must strictly match the avatar clip in scenes[].clips[]:
scenes[].scripts[].modelIdmust equalscenes[].clips[].model.ai_name(e.g.,"M000045058").scenes[].scripts[].clothIdmust equalscenes[].clips[].model.emotion(e.g.,"BG00002320").isTTS: Set tofalseandtts: nullto utilize the avatar's native voice model. Set totruewith a voice configuration object if substituting another TTS voice.
Step 3: Complete Multi-Scene Integration Example
Below is a production-ready Node.js script demonstrating how to generate a two-scene personalized video:
- Scene 1: Digital avatar addresses the client by name against a custom company background.
- Scene 2: Digital avatar explains custom monthly performance data alongside a dynamic graphic clip.
import fetch from "node-fetch";
const API_KEY = process.env.DEEPBRAIN_API_KEY;
const BASE_URL = "https://app.aistudios.com";
async function createPersonalizedVideo(userData) {
const payload = {
name: `Personalized_Onboarding_${userData.userId}`,
orientation: "landscape",
resolution: "1080",
isExport: true,
webhookUrl: "https://api.yourdomain.com/webhooks/deepbrain-complete",
scenes: [
{
sceneIdx: 0,
background: {
id: "background-0",
type: "background",
source_type: "image",
source_url: userData.welcomeBackgroundUrl,
source_color: "rgb(255,255,255)"
},
watermark: false,
scripts: [
{
org: `Welcome aboard, ${userData.firstName}! We are excited to partner with ${userData.companyName}. Let us quickly review your workspace configuration.`,
isTTS: false,
tts: null,
modelId: "M000045058",
clothId: "BG00002320"
}
],
clips: [
{
id: "avatar-scene-0",
type: "aiModel",
layer: 2,
top: 146.74,
left: 630.25,
height: 2229,
width: 679,
scaleX: 1,
scaleY: 1,
model: {
ai_name: "M000045058",
emotion: "BG00002320",
language: "en"
}
}
]
},
{
sceneIdx: 1,
background: {
id: "background-1",
type: "background",
source_type: "image",
source_url: "https://cdn.yourdomain.com/templates/dashboard_slide.png",
source_color: "rgb(240,242,245)"
},
watermark: false,
scripts: [
{
org: `Your dedicated compute tier is active with ${userData.allocatedCredits} credits available. You can launch your initial pipelines right from the admin dashboard.`,
isTTS: false,
tts: null,
modelId: "M000045058",
clothId: "BG00002320"
}
],
clips: [
{
id: "avatar-scene-1",
type: "aiModel",
layer: 2,
top: 146.74,
left: 100.0,
height: 2229,
width: 679,
scaleX: 0.9,
scaleY: 0.9,
model: {
ai_name: "M000045058",
emotion: "BG00002320",
language: "en"
}
},
{
id: "chart-overlay",
type: "image",
layer: 1,
top: 200.0,
left: 700.0,
width: 1100,
height: 650,
scaleX: 1,
scaleY: 1,
source_url: userData.userChartUrl
}
]
}
]
};
const response = await fetch(`${BASE_URL}/api/odin/v3/editor/project`, {
method: "POST",
headers: {
"Authorization": API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
const result = await response.json();
if (!result.success) {
throw new Error(`AI Studios project initiation failed: ${JSON.stringify(result)}`);
}
// Returns project identifier: result.data.projectId
console.log(`Video render queued successfully. Project ID: ${result.data.projectId}`);
return result.data.projectId;
}
Step 4: Tracking Synthesis Progress & Retrieving Video URLs
Once the project is submitted with isExport: true, the rendering engine generates the video asset asynchronously. You have two mechanisms to track status:
Method A: Webhooks (Strongly Recommended by 365Finds)
Configuring webhookUrl in the creation payload eliminates unnecessary API polling overhead. When rendering completes, DeepBrain AI sends an HTTP POST request to your specified endpoint with the following payload format:
{
"progress": 100,
"credit": 2,
"backendTaskId": "65b2f1a...",
"download_url": "https://cdn.aistudios.com/exports/Personalized_Onboarding_98234.mp4"
}
Your webhook handler can instantly save download_url, record the credit consumption to internal auditing tables, and dispatch notification emails to your end customers.
Method B: Polling via GET /api/odin/v3/editor/progress/${projectKey}
If webhooks cannot be received due to firewalls or staging environment constraints, poll the progress endpoint with an exponential or 5-second interval backoff:
async function waitForVideoRender(projectId, timeoutMinutes = 15) {
const startTime = Date.now();
const pollIntervalMs = 5000;
while (Date.now() - startTime < timeoutMinutes * 60 * 1000) {
const res = await fetch(`${BASE_URL}/api/odin/v3/editor/progress/${projectId}`, {
method: "GET",
headers: {
"Authorization": API_KEY,
"Content-Type": "application/json"
}
});
const body = await res.json();
if (!body.success) {
throw new Error(`Progress query error: ${JSON.stringify(body)}`);
}
const { progress, downloadUrl } = body.data;
console.log(`Rendering project ${projectId}: ${progress}% completed`);
if (progress >= 100 && downloadUrl) {
console.log(`Render complete! Download URL: ${downloadUrl}`);
return downloadUrl;
}
await new Promise((resolve) => setTimeout(resolve, pollIntervalMs));
}
throw new Error(`Rendering timed out after ${timeoutMinutes} minutes.`);
}
Production Trade-offs and Best Practices
| Architecture Component | Recommended Approach | Pitfalls to Avoid |
|---|---|---|
| Template Engineering | Build a baseline template inside the AI Studios web editor, inspect/export its JSON structure, and programmatically alter only dynamic text and image URLs. | Hand-coding nested clip coordinates, transforms, and bounding boxes from scratch without visual calibration. |
| Model & Voice Matching | Query GET /api/odin/v3/dropdown/models to store valid IDs; guarantee modelId and clothId in scripts match ai_name and emotion in clips. | Mixing up avatar IDs, causing the synthesis engine to fail silently or render a default character. |
| Asset Availability | Ensure all image, logo, and background URLs passed to source_url are publicly accessible over HTTPS with fast CDN delivery. | Passing authenticated S3 pre-signed URLs with expiring query parameters or localhost URLs. |
| Throughput & Concurrency | Use background message queues (such as BullMQ, Celery, or AWS SQS) with concurrency governors matching your plan tier rate limits. | Firing thousands of concurrent synchronous API calls directly from customer-facing web workers. |
The 365Finds Verdict
DeepBrain AI Studios V3 provides one of the most mature, high-fidelity avatar rendering engines on the commercial market. Its REST API offers exceptional programmatic control over multi-scene transitions, avatar positioning, and audio synthesis.
However, teams must be prepared for the verbosity of its clip layout JSON schema. We strongly recommend that development teams establish a template extraction workflow: design visual compositions once in the web GUI, extract the clean JSON payload, and use template injection scripts in production to substitute user-specific variables. Paired with webhook callbacks, this pattern establishes an automated, highly reliable video factory.