API docs
Generate personalized videos from AI Studio.
Use the BHuman API to render personalized videos from AI Studio campaigns, video instances, and Speakeasy imports. Send recipient rows, optional assets, and a callback URL; receive share URLs, MP4 downloads, thumbnails, GIF previews, status, and error details.
Do not use old mode language
Older BHuman articles and videos may use legacy setup terminology. For new work, use AI Studio templates, campaigns, variable mapping, Speakeasy imports, API generation, callbacks, and generated assets.
Live reference
Swagger is the endpoint-level source of truth.
This page explains the practical integration model. For exact request and response schemas, use the live Swagger UI or OpenAPI JSON.

Integration model
The API sits after template setup and before delivery.
01
Prepare the source
Create or upload a base video in AI Studio, or generate a presenter in Speakeasy and import it into AI Studio.
02
Mark variables
Define the text, links, images, or background assets that should change for each recipient row.
03
Trigger generation
Use a campaign, video instance, Zapier/Pabbly payload, Leadr payload, or the API endpoint wired to your workflow.
04
Collect assets
Use callbacks or polling to collect share URLs, MP4 downloads, thumbnails, GIFs, status, and failure details.
Quickstart
Campaign generation request
- 1. Create or choose a campaign. Copy the campaign ID from AI Studio or the campaign URL.
- 2. Generate API keys. Open Settings, then API keys. Use the key ID and secret for Basic Authentication.
- 3. Send ordered rows. The
variablesarray defines column order. Every row innamesmust follow that same order. - 4. Handle completion. Provide a
callback_urlfor async delivery, or poll the generated video endpoints.
Campaign generation
cURLcurl -X POST "https://studio.bhuman.ai/api/ai_studio/pipeline/campaign" \
-H "Authorization: Basic $BHUMAN_BASIC_AUTH" \
-H "Content-Type: application/json" \
-d '{
"campaign_id": "YOUR_CAMPAIGN_ID",
"variables": ["first_name", "company", "cta_url"],
"names": [
["Alex", "ExampleCo", "https://example.com/start"],
["Jordan", "Sample Labs", "https://example.com/book"]
],
"callback_url": "https://yourapp.com/bhuman/callback"
}'Authentication
Use Basic Authentication with an API key.
Generate an API key in BHuman from Settings, then API keys. Combine the key ID and secret with a colon, Base64 encode the result, and send it in the Authorization header.
Authorization header
Headerapi_key_id:api_key_secret -> base64 Authorization: Basic <encoded_value>
Request contract
Core generation fields
Recipient row rule
Treat variables as the header row and names as data rows. The API maps values by position, not by object key.
variables[0] = first_name
names[0][0] = Alex
variables[1] = company
names[0][1] = ExampleCo
Pabbly-style payload
JSON{
"campaign_id": "YOUR_CAMPAIGN_ID",
"variables": {
"first_name": "Alex",
"company": "ExampleCo",
"cta_url": "https://example.com/start"
},
"callback_url": "https://yourapp.com/bhuman/callback"
}Accepted response
Generation requests return accepted IDs.
A generation request accepts work for asynchronous rendering. Store the returned IDs, then reconcile them with callbacks or polling results.
Accepted response
JSON{
"code": 200,
"result": [
"c10ee155-6202-4cec-9a40-dde536e2ab4e"
]
}Completion
Completion payloads return render assets.
BHuman can send one POST callback per generated video. Store the generation ID, then use the media fields your workflow needs.
Completion example
JSON{
"id": "c10ee155-6202-4cec-9a40-dde536e2ab4e",
"status": "succeeded",
"share_url": "https://videos.bhuman.ai/video/...",
"url": "https://assets.bhuman.ai/generated-video.mp4",
"thumbnail": "https://assets.bhuman.ai/thumb.jpg",
"gif": "https://assets.bhuman.ai/preview.gif"
}Dynamic backgrounds
Pass row-specific websites, images, or videos.
Dynamic backgrounds let a generated video show a website, image, video, LinkedIn page, product page, landing page, or other URL behind or around the presenter. Each row in assets lines up with the matching row in names.
Dynamic background payload
JSON{
"variables": ["first_name", "company"],
"names": [
["Alex", "ExampleCo"],
["Jordan", "Sample Labs"]
],
"assets": [
["https://example.com/product", "https://example.com/alex-demo.mp4"],
["https://example.com/pricing", "https://example.com/jordan-demo.mp4"]
],
"backgrounds": [
{
"name": "product_page",
"start": 0,
"end": 3,
"kind": "site",
"config": {
"mode": "circle",
"position": "bottom-right",
"scale": 0.4
}
},
{
"name": "demo_video",
"start": 3,
"end": -1,
"kind": "link",
"config": {
"mode": "chroma",
"color": "00FF00"
}
}
]
}Speakeasy import
Import generated presenters into AI Studio.
Use Speakeasy to generate the presenter and voice. Import the project into AI Studio before adding recipient variables, campaign data, or API-triggered rendering.
Import Speakeasy project
cURLcurl -X POST "https://studio.bhuman.ai/api/ai_studio/speakeasy_projects/import" \
-H "Authorization: Basic $BHUMAN_BASIC_AUTH" \
-H "Content-Type: application/json" \
-d '{
"project_id": "SPEAKEASY_PROJECT_ID",
"workspace_id": "OPTIONAL_WORKSPACE_ID"
}'Endpoint reference
Core endpoint groups
For exact schemas, optional fields, and operations not summarized here, open Swagger UI.
Pipeline generation
Recommended endpoints for CRM, form, workflow, and automation-triggered renders.
/api/ai_studio/pipeline/campaign
/api/ai_studio/pipeline/zapier
/api/ai_studio/pipeline/pabbly
/api/ai_studio/pipeline/leadr
Templates and campaigns
Create, read, update, and list AI Studio video instances and campaigns.
/api/ai_studio/video_instances
/api/ai_studio/video_instance?id={video_instance_id}
/api/ai_studio/try_sample
/api/ai_studio/campaigns
/api/ai_studio/campaign?id={campaign_id}
Generated results
Poll generated video status and assets when callbacks are not enough.
/api/ai_studio/generated_video_by_video_instance_id?video_instance_id={video_instance_id}
/api/ai_studio/generated_video_by_campaign_id?campaign_id={campaign_id}
/api/ai_studio/generated_video_by_id?id={generation_id}
/api/ai_studio/get_generated_video
Speakeasy imports
Move generated presenter projects into AI Studio for personalization.
/api/ai_studio/speakeasy_projects
/api/ai_studio/speakeasy_projects/import
Webhooks and previews
Configure saved webhooks, preview videos, and receive render pipeline callbacks.
/api/ai_studio/webhook
/api/ai_studio/webhook
/api/ai_studio/videos_preview
/api/ai_studio/pipeline/webhook
Production checklist
Before you turn on an automated workflow
- Use HTTPS callback URLs that can accept repeated delivery attempts.
- Store generation IDs so callbacks and polling responses can be reconciled.
- Keep variables stable after a campaign is wired into a production workflow.
- Send row-specific assets in the same order as recipient rows.
- Treat generated media URLs as outputs from an async render job, not as immediate inline responses.
- Use the Swagger UI for the latest endpoint-level schema details before launching a custom integration.
Need implementation help?
Contact us with the workflow you are building and the team will help map it to the right campaign, template, callback, or landing page setup.
Contact us