TikTok API
Post videos and photo carousels to TikTok through the PublishQ API.
What you can post
| Type | Supported | Max media | Notes |
|---|---|---|---|
| Video | ✅ | 1 | MP4, WebM, MOV. Max 4 GB, duration varies per account |
| Photo carousel | ✅ | 35 | WebP, JPEG (PNG is not supported by TikTok; PublishQ converts it to WebP while preserving transparency). Max 20 MB per image |
Limitations
- Media is required. TikTok does not support text-only posts.
- You cannot mix images and video in the same post. A post is either a single video or up to 35 photos.
- Video duration varies per account. Query the creator info endpoint before posting to get the current limit.
- Daily API posting limit. TikTok caps how many posts a creator account can receive through the API in a 24-hour window, separate from the native app limit. TikTok describes the upper limit as varying by creator and typically around 15 posts per day, and it is shared across every app publishing to that account. When you hit it, the post will fail with
spam_risk_too_many_posts.
Quick start
Post a video
A single video post that appears on the creator's TikTok profile. Supports MP4, WebM, and MOV up to 4 GB. Duration limit depends on the account (3, 5, or 10 minutes).
Query creator info
TikTok requires that the privacyLevel you set matches one of the options available for the target account. Call this endpoint to get the current settings.
GET /api/v1/accounts/{accountId}/tiktok-creator-infoThe response depends on the account type:
Public account:
{
"privacyLevelOptions": ["PUBLIC_TO_EVERYONE", "MUTUAL_FOLLOW_FRIENDS", "SELF_ONLY"],
"commentDisabled": false,
"duetDisabled": false,
"stitchDisabled": false,
"maxVideoPostDurationSec": 600
}Private account:
{
"privacyLevelOptions": ["FOLLOWER_OF_CREATOR", "MUTUAL_FOLLOW_FRIENDS", "SELF_ONLY"],
"commentDisabled": false,
"duetDisabled": true,
"stitchDisabled": true,
"maxVideoPostDurationSec": 180
}If duetDisabled or stitchDisabled is true, TikTok will ignore the corresponding disableDuet/disableStitch settings.
Get your media ready
curl -X POST https://publishq.com/api/v1/media \
-H "Authorization: Bearer pq_live_..." \
-F "[email protected]"curl https://publishq.com/api/v1/media \
-H "Authorization: Bearer pq_live_..."Pick the id of the video you want to use from the response.
Create the post
The caption goes in content (max 2200 characters). Hashtags (#) and mentions (@) in the caption are automatically parsed by TikTok.
{
"content": "New tutorial dropping 🎬 #coding #fyp",
"mediaIds": ["video-media-id"],
"thumbnailTimestamp": 3500,
"accounts": [
{
"accountId": "tiktok-account-id",
"platformSpecificSettings": {
"privacyLevel": "PUBLIC_TO_EVERYONE",
"disableComment": false,
"disableDuet": false,
"disableStitch": false,
"brandContentToggle": false,
"brandOrganicToggle": false
}
}
],
"publishNow": true
}Post a photo carousel
A swipeable photo post with 1–35 images. TikTok accepts only WebP and JPEG, but you can upload PNGs too. PublishQ converts them to WebP before publishing and preserves transparent areas. Max 20 MB per image.
Query creator info
Same as above — call the creator info endpoint to get the available privacy options.
GET /api/v1/accounts/{accountId}/tiktok-creator-infoGet your media ready
curl -X POST https://publishq.com/api/v1/media \
-H "Authorization: Bearer pq_live_..." \
-F "[email protected]"Repeat for each image. Collect the id from each response.
curl https://publishq.com/api/v1/media \
-H "Authorization: Bearer pq_live_..."Pick the ids of the images you want to use from the response.
Create the post
Attach 1–35 images. TikTok displays them as a swipeable carousel. The content field maps to the photo title (max 90 characters). Use description in platformSpecificSettings for longer text (max 4000 characters).
{
"content": "Travel dump 🌍",
"mediaIds": ["img-1", "img-2", "img-3", "img-4", "img-5"],
"accounts": [
{
"accountId": "tiktok-account-id",
"platformSpecificSettings": {
"privacyLevel": "PUBLIC_TO_EVERYONE",
"disableComment": false,
"disableDuet": false,
"disableStitch": false,
"brandContentToggle": false,
"brandOrganicToggle": false,
"autoAddMusic": true,
"photoCoverIndex": 2,
"description": "Best spots from our trip through Southeast Asia 🇹🇭🇻🇳🇰🇭 #travel #photomode #backpacking"
}
}
],
"publishNow": true
}Photo carousel title limit
TikTok photo posts have a 90-character title limit (the content field), while video posts allow up to 2200 characters. If you're posting to TikTok alongside platforms with longer limits, use postOverrides to provide a shorter title just for TikTok.
{
"content": "Full description of our latest product launch with all the details...",
"mediaIds": ["img-1", "img-2", "img-3"],
"accounts": [
{ "accountId": "instagram-account-id" },
{
"accountId": "tiktok-account-id",
"postOverrides": {
"content": "New product just dropped 🔥"
},
"platformSpecificSettings": {
"privacyLevel": "PUBLIC_TO_EVERYONE",
"disableComment": false,
"disableDuet": false,
"disableStitch": false,
"brandContentToggle": false,
"brandOrganicToggle": false,
"description": "Full description with all the #details and @mentions here"
}
}
],
"publishNow": true
}Media specs
Video
| Spec | Value |
|---|---|
| Max file size | 4 GB |
| Min duration | 3 seconds |
| Max duration | Varies per account (3, 5, or 10 minutes) |
| Supported formats | MP4 (recommended), WebM, MOV |
| Supported codecs | H.264 (recommended), H.265, VP8, VP9 |
| Framerate | 23–60 FPS |
| Resolution | Min 360px, max 4096px (both dimensions) |
Images
| Spec | Value |
|---|---|
| Max file size | 20 MB per image |
| Max images per post | 35 |
| Supported formats | WebP, JPEG (PNG is not supported by TikTok; PublishQ converts it to WebP while preserving transparency) |
| Max resolution | 1080p |
PublishQ prepares photos for you
Upload any supported image and PublishQ fits it to these limits before publishing. It converts PNG to WebP while preserving transparency, resizes high-resolution images, and compresses images larger than 20 MB, so you don't need to convert or shrink them yourself.
Platform-specific settings
| Field | Type | Description |
|---|---|---|
privacyLevel | enum | Who can view this post. The value must match one of the options returned by the TikTok creator_info/query endpoint for the target account. |
disableComment | boolean | If true, other TikTok users cannot comment on this post. Ignored if the creator has set comments to "No one" in their privacy settings. |
disableDuet | boolean | If true, other TikTok users cannot create Duets with this post. Only applies to video posts. Ignored for photo posts and private accounts. |
disableStitch | boolean | If true, other TikTok users cannot create Stitches with this post. Only applies to video posts. Ignored for photo posts and private accounts. |
brandContentToggle | boolean | Set to true if this is a paid partnership promoting a third-party business. Required by TikTok for branded content disclosure. |
brandOrganicToggle | boolean | Set to true if this post promotes the creator's own business. |
autoAddMusic | boolean (optional) | Photo posts only. If true, TikTok automatically adds recommended background music to the photo carousel. Users can change the music later in the TikTok app. |
videoMadeWithAi | boolean (optional) | Video posts only. Set to true if the video is AI-generated content. The video will be labeled with a "Creator labeled as AI-generated" tag. |
description | string (optional) | Photo posts only. Additional description text (max 4000 characters). Hashtags and mentions in the description are parsed by TikTok. |
photoCoverIndex | number (optional) | Photo posts only. Zero-based index of the image to use as the carousel cover. Defaults to 0 (first image). |
Not yet supported
- Video captions/subtitles (TikTok supports up to 20 VTT files via the API)