Browse documentation

BHuman MCP

Personalize an AI Studio video.

Start from an owned template, plan one recipient and approve generation.

Beta integration guide · verification in progress

The deployed schema and source have been reviewed on October 2, 2026. Ordinary-customer generation, credit failures, credential rotation and both client workflows are awaiting end-to-end qualification. These examples are not yet certified for customer launch.

Before personalizing a video

Personalized Video uses the studio_* tool family to replace variables in an owned AI Studio template. A Speakeasy project ID is not a Studio template or campaign ID. Start with a ready template created in the app, configured with one first_name variable, and a current MCP key.

Confirm your account's AI Studio entitlement and video-credit balance in Plan & usage. Planning and draft creation do not start paid generation. The current plan estimates video credits; approve it before starting. Account restrictions still apply, and a key created before Studio identity binding may require rotation.

Quickstart: one personalized recipient

1. Call studio_list_templates and studio_get_template. Choose an owned ready template and read its configured variable names. For this example, use exactly first_name.

2. Call studio_create_campaign with template_id and campaign_name. Save the returned campaign ID. This creates a draft without generating. Call studio_plan_generation with that campaign_id, recipients: [{first_name: Alex}] and enable_lipsync: true. Show the returned plan_id, recipient count and estimated_video_credits.

3. After reviewing the estimate and approving this one-video charge, call studio_start_generation with exactly the same campaign_id, recipients, enable_lipsync and optional callback_url, plus the returned plan_id, confirm_generation: true and one unique idempotency_key. Save generation.generation_ids from the tool's structuredContent.

4. For each returned ID, call studio_get_generation with generation_id until generation.status is succeeded or failed. On success, open generation.url and check video and audio playback. Keep the original IDs if polling is interrupted. Acceptance is not completed output.

Plan one recipient · replace the campaign ID

JSON
{
  "campaign_id": "00000000-0000-0000-0000-000000000000",
  "recipients": [{"first_name": "Alex"}],
  "enable_lipsync": true
}

Preparation prompt

Prompt
Use my owned ready AI Studio template with first_name. Create a draft campaign for one recipient named Alex, call studio_plan_generation and show me the exact video-credit estimate. Do not start generation.

Personalized Video tools and fields

Templates: studio_list_templates and studio_get_template. Samples: studio_plan_sample → studio_start_sample. Campaigns: studio_list_campaigns, studio_get_campaign, studio_create_campaign, studio_set_campaign_csv. Batches: studio_plan_generation → studio_start_generation. Results: studio_get_generation and studio_list_generations.

Generation recipients are named-value objects, not the REST variables/names matrix. A batch contains 1–2,000 recipients. enable_lipsync defaults to true. callback_url, if supplied, must use HTTPS and must match between planning and start. Idempotency keys accept 8–128 letters, digits, dots, underscores, colons or hyphens.

For a single sample, plan with template_id, values (one named-value object) and enable_lipsync, then start with identical fields plus plan_id, confirm_generation: true and idempotency_key. A sample starts a real credit-consuming video.

studio_set_campaign_csv accepts complete UTF-8 csv_text including headers, up to 1,000,000 characters and 2,000 rows. It saves recipients on an unlocked campaign; it does not generate. The generation plan must still receive the intended recipients explicitly. Missing required variables must be corrected before approval.

Upload, transcript preparation, variable editing and template background-sound tools need coordinated backend availability. Use live tools/list and an owned read-only check before relying on them. The first quickstart uses an already ready template. Speakeasy Standard/HD choices are not Studio request fields.

Polling, callbacks and safe retries

Studio start operations store their idempotency keys durably. Reuse the same key and unchanged inputs for the same approved start; a new key represents new work. If the response is lost, inspect existing campaign results or repeat that same start with the original key. Never rerun campaign creation and generation as a blind retry.

Editing the template, recipients, campaign or callback can invalidate the plan. Replan and review again rather than mixing old approval with new inputs. Check existing generation IDs before approving another charge after an error.

Generation is asynchronous. Handle tool isError, failed status and public error messages; keep sanitized references for support. Optional callbacks report progress/results independently of polling; receiver guidance is shared with REST. No callback signature or delivery SLA is promised here.