Skip to content
UGC API

How to post a TikTok slideshow via API

TikTok slideshows, which TikTok calls photo posts, are cheap to make and easy to test at volume. This guide shows how to post them through an API, from image prep to the published URL, and the TikTok rules that trip people up.

Updated

What TikTok's API allows for slideshows

TikTok's Content Posting API supports photo posts through its content init endpoint with media_type: PHOTO. Per TikTok's reference, a photo post can have up to 35 images, a title up to 90 characters and a description up to 4,000 characters. You choose a cover image by index. The post can go live directly, or land in the creator's inbox to finish in the TikTok app.

TikTok only pulls images from URL prefixes or domains your developer app has verified. That is fine for your own CDN, but a pain when images come from users or a third-party renderer. UGC API serves your uploaded media from its own domain, so this step goes away.

Step 1: Prepare the slides

  • Size: 1080x1920 (9:16) fills the screen on TikTok. If the same slides go to an Instagram carousel, keep text in the center 1080x1350 area, since we crop carousels to 4:5.
  • Format: JPEG is the safest choice across TikTok and Meta.
  • Count: 4 to 8 slides is a common range for list and story formats. TikTok accepts up to 35, Instagram carousels up to 20.
  • Slide 1: this is the cover. Lead with the hook: a question, a number, or a bold claim.
  • Text: large, high contrast, away from the bottom 20% where TikTok shows the caption and buttons.

Step 2: Connect the TikTok account

Create a connect link for the creator. They log in with TikTok and approve posting. Use external_id to tie the account to your own user or creator record.

bash
curl https://ugcapi.dev/v1/accounts/connect \
  -H "Authorization: Bearer ugc_live_..." \
  -H "Content-Type: application/json" \
  -d '{"platform": "tiktok", "external_id": "creator-204", "redirect_url": "https://yourapp.com/done"}'

The response has a url. Send the creator there. After approval, the account shows up in GET /v1/accounts with an ID like acc_.... More in connect accounts.

Step 3: Upload the images

If your slides are already on a public URL, skip this. Otherwise upload each file with POST /v1/media, sending the raw bytes and the Content-Type. Each call returns a url to use in the post. We keep files until 3 days after the last post that uses them.

bash
curl https://ugcapi.dev/v1/media \
  -H "Authorization: Bearer ugc_live_..." \
  -H "Content-Type: image/jpeg" \
  --data-binary @slide-1.jpg

Step 4: Create the post

bash
curl https://ugcapi.dev/v1/posts \
  -H "Authorization: Bearer ugc_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "accounts": ["acc_tt_01"],
    "format": "slideshow",
    "media": ["https://ugcapi.dev/m/a1.jpg", "https://ugcapi.dev/m/a2.jpg", "https://ugcapi.dev/m/a3.jpg", "https://ugcapi.dev/m/a4.jpg"],
    "caption": "4 habits that fixed my sleep #sleeptok #wellness",
    "scheduled_at": "2026-11-02T18:00:00Z",
    "options": {
      "tiktok": { "auto_music": true, "title": "4 habits that fixed my sleep", "ai_generated": false }
    }
  }'

The media URLs above are illustrative. Use the URLs returned by your own uploads.

Music: auto music or draft

A silent slideshow underperforms. You have two options:

OptionHow it worksBest for
auto_music: trueTikTok adds a recommended track at publish. The creator can change it later.Volume posting where nobody touches each post
draft: trueThe slideshow goes to the creator's TikTok inbox. They pick a trending sound and post.Creator accounts where sound choice drives reach

TikTok's API doesn't let you pick a specific track. If a particular sound is part of the concept, use drafts.

Step 5: Get the result

When the post goes live you receive a post.published webhook with the TikTok URL. If TikTok rejects it, you get post.failed with a code and message. See webhooks. Common failure reasons are the creator's daily posting cap, a privacy setting that doesn't allow public posts, or a disconnected account.

Post the same slides to Instagram

Add Instagram account IDs to accounts. The same slides publish as a 4:5 carousel. Add instagram.story: true to also post them as Story frames. Each Story frame is one credit. See the slideshow API and carousel plus Story guide.

Posting slideshows at volume

If you have 60 slideshows and 6 accounts, use a campaign with a per-account cadence instead of 60 separate calls. Read UGC posting cadence for starting numbers per platform.

FAQ

How many images can a TikTok slideshow have via API?

TikTok's Content Posting API accepts up to 35 images in a photo post.

Can I choose the song for a TikTok slideshow through the API?

No. You can turn on auto music, which adds a recommended track, or post as a draft so the creator picks the sound in the app.

Why is my slideshow posted as private?

TikTok only allows privacy levels the creator's account permits. A private TikTok account can't publish a public post.

What does a TikTok slideshow cost on UGC API?

One post credit per TikTok account, regardless of slide count. $10 buys 1,000.

Related