Overview
Learn how to automate and manage large media operations using Ittybit's Automation API
.
Automating media operations can help you save time and resources by streamlining repetitive tasks and ensuring consistency across your media files. By automating tasks such as converting, resizing, and watermarking, you can improve scalability as well as the user experience.
Step-by-step guide
- Determine the event condition you want to trigger the automation.
trigger: { kind: "event", event: "media.created", conditions: [ { prop: "kind", value: "video" } ], }
- Define the tasks you want to automate.
const trigger: { kind: "event", event: "media.created", conditions: [ { prop: "kind", value: "video" } ], } const automation = { tasks: [ { kind: "description", }, { kind: "speech", speakers: true, }, { format: "mp4", max: "720px", layers: [ { src: "https://your.domain/logo.png", width: 100, bottom: 25, right: 25, } ], next: [ { label: "poster", format: "jpeg", } ] }, ] } const response = await fetch('https://api.ittybit.com/automations', { method: 'POST', headers: {'Authorization': 'Bearer ITTYBIT_KEY'}, body: JSON.stringify(automation) });
About the API
Endpoint
POST https://api.ittybit.com/automations
Body parameters
const automation = { trigger: { kind: "event", event: "media.created", /// Required parameter: specify the event that triggers the automation conditions: [ { prop: "kind", value: "video" } /// Required parameter: specify the conditions for the event ], }, tasks: [ /// Required parameter: the tasks to be automated. ] };
Required
-
trigger string
Defines the event that triggers the automation. The
trigger
object must include akind
and may include additional options that are specific to thekind
of task. It will also includeconditions
, an array of objects that specify the conditions for the event. -
tasks object
Defines the tasks to be automated. Formatted as an array of objects, each object represents a task to be automated. To see how to available tasks, see the Tasks, Sources, Tracks, and Intelligence guides.
Considerations
This guide is being updated. Please check back soon for more information.