Synthesia

Create AI-generated videos from text using Synthesia templates and avatars.

AI and MLAPI key2 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (2)
  4. createVideo
  5. createAVideoFromATemplate
  6. Details

Connect

Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("synthesia", action, input) resolves with the provider's answer and rejects when Synthesia isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "synthesia"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Synthesia when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellSynthesia = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Synthesia isn't connected.
  const output = await step.run("Synthesia", () =>
    step.ctx.integrations.invoke("synthesia", "createVideo", {
      "input_scriptText": "<input script text>",
      "input_avatar": "<input avatar>",
      "input_background": "green_screen"
    }),
  );
  step.ctx.log("Synthesia answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "synthesia",
    "piece_action": "createVideo",
    "input": {
      "input_scriptText": "<input script text>",
      "input_avatar": "<input avatar>",
      "input_background": "green_screen"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/synthesia/createVideo" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"input_scriptText":"<input script text>","input_avatar":"<input avatar>","input_background":"green_screen"}}'

Actions

createVideo

Create video. Create a video within your Synthesia account with one or more scenes

Also accepted as create_video.

InputTypeDescription
input_scriptTextrequiredlong textAn array of scenes to be included in the video
input_scriptAudioUrloptionaltextURL of the audio file to be used for the video script (optional)
input_avatarrequiredtextThe avatar to be used in the video https://docs.synthesia.io/reference/avatars)
input_backgroundrequiredone of "green_screen" | "off_white" | "warm_white" | "light_pink" | "soft_pink" | "light_blue" | "dark_blue" | "soft_cyan" | "strong_cyan" | "light_orange" | "soft_orange" | "white_studio"Background for the video. Can be a stock background, custom asset ID, or URL
testoptionalbooleanIf enabled, creates a test video with a watermark
titleoptionaltextCustom title for the video (displayed on the share page)
descriptionoptionallong textCustom description for the video (displayed on the share page)
visibilityoptionalone of "private" | "public"Video visibility setting
brandKitIdoptionaltextThe ID of the brand kit to use (use "workspace_default" for default)
callbackIdoptionaltextArbitrary metadata/identifier for the video
pushServiceUrloptionaltextWebhook URL for push notifications when video completes

createAVideoFromATemplate

Create a video from a template. Create a video based on a template created in Synthesia

InputTypeDescription
templateIdrequiredid (picked from your account)Select the template to use for video creation
templateDataoptionalobjectKey-value pairs for template variables. Keys must match variable names in the template (case-sensitive)
testoptionalbooleanIf enabled, creates a test video with a watermark
titleoptionaltextCustom title for the video
visibilityoptionalone of "private" | "public"The visibility setting for the video
descriptionoptionallong textCustom description for the video
brandKitIdoptionaltextThe ID of the brand kit to use (use "workspace_default" for default)

Details

Id
synthesia
Category
AI and ML
Tags
video, avatar, generation, ai, enterprise
Package
@activepieces/piece-synthesia@0.1.4
Runs
Through the integration runner