Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to HeyGen

Scalekit connector
Open markdown

The HeyGen connector lets your AI agent act in each user's HeyGen account. Each user connects their own HeyGen API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 107 tools.

Tools
107
What they doRead · write · destructive
49 · 44 · 1449 read44 write14 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the HeyGen connection

    In AgentKit > Connections, create a HeyGen connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'heygen'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize HeyGen:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'heygen_get_current_user',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their HeyGen credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • heygen_download_proofread_srtGet presigned download URLs for the edited and original SRT files of a completed proofread session.Read-only

    Download Proofread Srt

    Get presigned download URLs for the edited and original SRT files of a completed proofread session. Returns srt_url, original_srt_url. Use to review or edit subtitles outside HeyGen. Needs a proofread_id for a completed session.

    Inputs

    proofread_idstringrequired
    Unique proofread identifier
  • heygen_get_ai_clippingGet an AI clipping job's status, produced clips, and presigned download URLs.Read-only

    Get Ai Clipping

    Get an AI clipping job's status, produced clips, and presigned download URLs. Returns id, title, status, input_language, source_duration, output_settings, clips, progress, callback_id, created_at. Use to poll a clipping job. Needs a job_id from create_ai_clipping.

    Inputs

    job_idstringrequired
    Unique AI clip job identifier
  • heygen_get_api_key_infoGet non-secret metadata for the API key used by this connection: expiration and permission scopes.Read-only

    Get Api Key Info

    Get non-secret metadata for the API key used by this connection: expiration and permission scopes. Returns key_id, key_name, status, scope_mode, scopes, created_at, updated_at, expires_at, expires_in_seconds. Use when a call fails with a permission error to see which scopes the key holds.

    Inputs

    This tool takes no inputs.

  • heygen_get_assetGet an asset's metadata, file type, and a publicly accessible URL.Read-only

    Get Asset

    Get an asset's metadata, file type, and a publicly accessible URL. Returns id, name, type, owner, space_id, folder_id, uploaded_at, url. Use to check an asset or read its URL. Needs an asset_id from list_assets.

    Inputs

    asset_idstringrequired
    Unique asset identifier
  • heygen_get_avatar_groupGet an avatar group's name, gender, preview URLs, looks count, and training status.Read-only

    Get Avatar Group

    Get an avatar group's name, gender, preview URLs, looks count, and training status. Returns id, name, preview_image_url, preview_video_url, gender, created_at, looks_count, default_voice_id, consent_status, status. Use to check a group's training status. Use list_avatar_groups to browse. Needs a group_id from list_avatar_groups.

    Inputs

    group_idstringrequired
    Unique avatar group identifier
  • heygen_get_avatar_lookGet one avatar look's supported engines, preferred orientation, preview URLs, and training status.Read-only

    Get Avatar Look

    Get one avatar look's supported engines, preferred orientation, preview URLs, and training status. Returns id, name, avatar_type, group_id, preview_image_url, preview_video_url, gender, tags, default_voice_id, supported_api_engines. Use to inspect a look before using it in a video. Needs a look_id from list_avatar_looks.

    Inputs

    look_idstringrequired
    Unique avatar look identifier. This is the value to pass as avatar_id to POST /v3/videos.
  • heygen_get_background_removalGet a background removal job's status and presigned download URLs when complete.Read-only

    Get Background Removal

    Get a background removal job's status and presigned download URLs when complete. Returns id, status, layers, duration, created_at, completed_at, error. Use to poll a job. Needs a job_id from create_background_removal.

    Inputs

    job_idstringrequired
    Background removal job id
  • heygen_get_brand_glossaryGet one brand glossary with its full term list.Read-only

    Get Brand Glossary

    Get one brand glossary with its full term list. Returns brand_glossary_id, name, created_at, updated_at, terms, do_not_translate_terms, forced_translations. Use to inspect a glossary before updating it. Needs a brand_glossary_id from list_brand_glossaries.

    Inputs

    brand_glossary_idstringrequired
    Unique brand glossary identifier