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), an optional tiktokTitle (max 90 characters) shown as the carousel title, privacy and comment controls, and automatic music addition (for scheduled posts only, not drafts).

API Parameters

ParameterTypeDescription
tiktokTitlestringPhoto carousels only. Visible carousel title (max 90 characters). When set, the entire content field becomes the post description and tiktokTitle becomes the title. When omitted, the first line of content is used as the title (auto-truncated at word boundary if >90 chars) and the remainder becomes the description. Does not apply to TikTok videos.
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": "Today's lesson breaks down how I built a 5-step morning routine that actually sticks. Swipe for the full breakdown, screenshots, and the exact tools I use every day. #productivity #morningroutine",
                "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": {
            "tiktokTitle": "5 morning habits that actually stick",
            "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
Title Length
90 characters max
tiktokTitle is optional. When omitted, the first line of content is used as the title (auto-truncated at word boundary if >90 chars)
Description Length
4,000 characters max
Photo carousels use TikTok's description field (4,000 cap). If you mix in a video item, the cap narrows to 2,200 because TikTok's video API only exposes a title field.
Image Format
JPEG, PNG
Max 10 MB per image
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

Set tiktokTitle explicitly (max 90 chars) to control the visible carousel headline. Otherwise the first line of your content becomes the title and the rest becomes the description.

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 does tiktokTitle work for carousels?

tiktokTitle is an optional string (max 90 characters) shown as the visible title above the carousel. If you set it, the entire content field becomes the post description. If you omit it, PostFast uses the first line of content as the title (auto-truncated at a word boundary if longer than 90 chars) and the remainder becomes the description. tiktokTitle does not apply to TikTok videos.

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.

Build your TikTok presence with programmatic posting

Start Free Trial
7-day free trialCancel anytime