publish_carousel_as_video
Convert a folder of images into a 1080×1920 slideshow MP4 and publish it to TikTok, Instagram, or YouTube. Use it to create TikTok video drafts or attach a custom soundtrack, working around API restrictions on photo posts.
Instructions
Convert a folder of images into a 1080×1920 slideshow MP4 and publish it. Use this when (a) you want the carousel as a TikTok DRAFT (TikTok's API rejects PHOTO carousels for drafts but accepts VIDEO drafts so the user can add trending music in-app), or (b) you want to attach a specific MP3 to the carousel (TikTok/IG don't allow audio attachment to photo posts via API, but a video with baked-in audio works). Requires ffmpeg installed locally. Returns a single video post, not a carousel post.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Optional. 'publish' (default) publishes immediately. 'draft' sends to TikTok inbox / YouTube as private — user finishes in mobile app. | |
| paths | Yes | Folder containing slide images, or a list of image file paths. Files are sorted alphabetically — name them 01_, 02_, etc. for ordering. | |
| caption | Yes | Post caption. | |
| hashtags | No | Hashtags without # prefix. | |
| platforms | Yes | Platforms to publish to. Must be connected. For mode='draft', Instagram is not allowed (no IG drafts API). | |
| audio_path | No | Optional. Local path to an MP3/WAV/M4A/AAC file to use as soundtrack. If omitted, the video has no audio (creator can add trending music in-app if mode='draft'). | |
| account_ids | No | Specific connection IDs (from list_connections) to target. REQUIRED when you have multiple accounts on a platform — without it the post fans out to EVERY connected account on the platform (e.g. a draft landing on the wrong handle). | |
| duration_per_slide | No | Optional. Seconds each slide is displayed. Defaults to 3. |