TikTok API Guide

How to Schedule TikTok Photo Carousels via API

Publish multi-image carousels (photo slideshows) to TikTok using the PostFast API. Schedule swipeable image posts with auto-add music.

Last updated: January 2025
Automate your TikTok carousel strategyGet API Key

TikTok Photo Carousels (also called Photo Mode or slideshows) allow you to post multiple images that users can swipe through. Using the PostFast API, you can schedule carousels by including multiple IMAGE items in your mediaItems array.

Photo carousels are great for tutorials, before/after comparisons, product showcases, and storytelling. You can enable tiktokAutoAddMusic to let TikTok automatically add background music when the post is published.

Key capabilities when scheduling TikTok carousels via API include multiple images (2-10 photos), swipeable slideshow format, privacy and comment controls, and automatic music addition (for scheduled posts only, not drafts).

API Parameters

ParameterTypeDescription
tiktokPrivacystringControls who can view the video
PUBLICMUTUAL_FRIENDSONLY_ME
tiktokAllowCommentsbooleanAllow comments on the video
tiktokAutoAddMusicbooleanAutomatically add background music to the video

Code Example

const response = await fetch('https://api.postfa.st/social-posts', {
  method: 'POST',
  headers: {
    'pf-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
        "posts": [
            {
                "content": "Swipe through these amazing moments! #carousel #moments #photography",
                "mediaItems": [
                    {
                        "key": "image/b7c8d9e0-f1a2-3456-7890-abcdef123456.jpg",
                        "type": "IMAGE",
                        "sortOrder": 0
                    },
                    {
                        "key": "image/c8d9e0f1-a2b3-4567-8901-bcdef1234567.jpg",
                        "type": "IMAGE",
                        "sortOrder": 1
                    },
                    {
                        "key": "image/d9e0f1a2-b3c4-5678-9012-cdef12345678.jpg",
                        "type": "IMAGE",
                        "sortOrder": 2
                    }
                ],
                "scheduledAt": "2025-01-31T10:00:00.000Z",
                "socialMediaId": "550e8400-e29b-41d4-a716-446655440001"
            }
        ],
        "controls": {
            "tiktokPrivacy": "PUBLIC",
            "tiktokAllowComments": true,
            "tiktokAutoAddMusic": true
        }
    })
});

const data = await response.json();

Did You Know?

Image Count
2-10 images
Minimum 2 images required for a carousel
Image Format
JPG, PNG, WebP
Standard image formats supported
Aspect Ratio
9:16 recommended
Vertical images work best. Square (1:1) also works well.
File Size
Max 10MB per image
Keep images optimized for faster uploads

Tips

Use sortOrder to control the exact sequence of images in your carousel

Vertical (9:16) or square (1:1) images perform best on TikTok

Include a compelling first image as it serves as the carousel thumbnail

Enable tiktokAutoAddMusic: true to let TikTok add background music automatically

Schedule carousels, videos, and drafts to TikTok via API

7-day free trial
Try PostFast Free

Common Pitfalls

Single image

Uploading only one image will not create a carousel. You need at least 2 images for the slideshow format.

Mixing images and video

Carousels are image-only. If you include VIDEO items, they will be processed separately or cause an error.

Auto-add music with drafts

tiktokAutoAddMusic only works for scheduled posts. If you use tiktokIsDraft: true, auto-add music will not be applied.

Duet/Stitch controls

tiktokAllowDuet and tiktokAllowStitch are video-only features. They do not apply to photo carousels.

Frequently Asked Questions

How many images can I include in a TikTok carousel?

TikTok carousels support 2-10 images. You need at least 2 images for TikTok to recognize it as a carousel/slideshow.

Can I add music to carousels via the API?

Yes! Set tiktokAutoAddMusic: true and TikTok will automatically add background music when the post is published. Note: This only works for scheduled posts, not drafts.

Do Duet and Stitch work with carousels?

No, Duet and Stitch are video-only features on TikTok. The tiktokAllowDuet and tiktokAllowStitch controls do not apply to photo carousels.

Build your TikTok presence with programmatic posting

Start Free Trial
7-day free trialCancel anytime