Skip to content

TikTok Post API

The TikTok Post API publishes TikTok videos, photos, and photo carousels programmatically. Use it to connect a TikTok account through TikTok OAuth, publish a video or a TikTok photo carousel, set TikTok-only options through platformSpecificData, check creator posting limits before upload, and send the same vertical clip to TikTok, YouTube Shorts, and Instagram Reels together in one post request.

Overview

Publish TikTok videos, photos, and photo carousels programmatically through the TikTok Post API. The API handles TikTok's multi-step upload process, content policies, and OAuth, so your application sends one post request with content, platform targets, and media items instead of implementing each TikTok upload step itself. Choose the request shape by media type: a single video item publishes a video, one image publishes a photo post, and two or more image items create a TikTok photo carousel. Use the draft option in platformSpecificData when content should go to the creator's TikTok inbox instead of publishing immediately.

Connect a TikTok Account

Start by connecting a TikTok account. The connect request returns a TikTok OAuth URL, and the user authorizes video upload permissions through that flow before the account can be used as a platform target. Keep the returned accountId, such as tt_321 in the examples, because every TikTok platform entry in a post request identifies the connected account with that value. If the connect step has not completed, a later post request has no authorized TikTok account to publish to, so treat account connection as the first failure check in your flow.

Publish a Video

To publish a video, send a POST request to /v1/posts with content, a platforms array containing a TikTok entry with platform set to tiktok and the connected accountId, a mediaItems array containing one item with type video and a publicly reachable url, and publishNow set to true. The published response reports success true, status published, a postId, and a platforms array whose TikTok entry reports success true and a platformPostUrl for the live video. Check those response fields rather than assuming success from the HTTP request alone, and surface the platformPostUrl to the user as the link to the published video.

Platform-Specific Data

Pass TikTok options in platformSpecificData on the TikTok platform entry. Use privacyLevel to control who can see the post, choosing PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, or SELF_ONLY, with PUBLIC_TO_EVERYONE as the default. Use disableComment to disable comments, disableDuet and disableStitch for video-only duet and stitch controls, brandContentToggle and brandOrganicToggle for branded content and organic brand promotion marks, and isAigc for AI-generated content disclosure on photo and video posts. Use videoCoverTimestampMs on videos to select the cover frame by timestamp in milliseconds, and use draft set to true to send content to the creator's TikTok inbox as a draft instead of publishing immediately via DIRECT_POST. Review the Platform-Specific Data table below for each field's type, requiredness, default, and whether it applies to videos only or photo posts only before sending the request.

Creator Info

If your interface lets people customize TikTok publishing, first retrieve what the linked creator is currently allowed to do by calling the creator-info endpoint with the accountId query parameter. The reply includes privacyLevelOptions, commentDisabled, duetDisabled, stitchDisabled, and maxVideoPostDurationSec. Shape the form around those values: show only privacy levels the creator can use, turn off controls the creator cannot use, and reject videos longer than maxVideoPostDurationSec. Running this pre-check avoids a common failure where a form accepts a video longer than the creator's limit or offers a privacy option the account does not support, only for the upload to fail later.

Media Requirements

Validate media before publishing, because each requirement below is a distinct failure point. For videos, confirm the container is MP4, MOV, or WebM with MP4 recommended, the codec is H.264, H.265, VP8, or VP9 with H.264 recommended, the frame rate is between 23 and 60 FPS, and both width and height are between 360 and 4,096 pixels. Confirm the file is no larger than 4 GB and that its duration fits both the creator-specific maxVideoPostDurationSec from creator-info and the maximum API upload length of 10 minutes. For photos and carousels, confirm there are between 1 and 32 images, that all items are images only with no mixing of images and videos, that every image uses the same aspect ratio between 1:2.13 and 2.13:1, and that every image URL is publicly reachable so it can be downloaded, normalized to a TikTok-compatible JPEG, and rehosted before TikTok fetches it. Set the cover image with photoCoverIndex, starting at 0. Use the Media Requirements tables below as a pre-publish checklist and reject or transcode media that fails any row instead of sending it to the API.

Cross-Post

Send the same vertical clip to three destinations together by listing one entry per destination in the platforms array, each carrying its own accountId plus any destination-specific settings. The TikTok entry uses the TikTok fields described on this page, while the YouTube entry in the example carries its own platformSpecificData with title and visibility, and the Instagram entry targets the connected Instagram account. Keep the shared content and mediaItems identical across entries, and check each platform's result in the response independently, because success on one platform does not guarantee success on the others.

Photo post field map
Request fieldTikTok fieldLimit
contenttitle90 characters
platformSpecificData.descriptiondescription4,000 characters

Photo posts only; description optional with content fallback for backward compatibility.

TikTok platformSpecificData fields
FieldTypeRequiredValues and constraintsDescription
privacyLevelstringNoPUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLYWho can see this post. Defaults to "PUBLIC_TO_EVERYONE".
disableCommentbooleanNo—Disable comments on this post. Defaults to false.
disableDuetbooleanNo—Disable duet for this video. Videos only. Defaults to false.
disableStitchbooleanNo—Disable stitch for this video. Videos only. Defaults to false.
brandContentTogglebooleanNo—Mark as branded content (paid partnership). Defaults to false.
brandOrganicTogglebooleanNo—Mark as organic brand promotion. Defaults to false.
isAigcbooleanNo—AI-generated content disclosure for photo and video posts. Defaults to false.
videoCoverTimestampMsnumberNoRange: 0–unboundedTimestamp in milliseconds to use as the video cover frame. Videos only.
autoAddMusicbooleanNo—Automatically add background music to photo carousels. Photo posts only. Defaults to true.
photoCoverIndexnumberNoRange: 0–unbounded0-indexed position of the cover image in a photo carousel. Photo posts only. Defaults to 0.
descriptionstringNoLength: 0–4000Separate description for a TikTok photo or carousel post. Max 4,000 characters. When omitted, the post content is also used as the description. Photo posts only.
draftbooleanNo—When true, sends content to the creator's TikTok inbox as a draft. Defaults to false (publishes immediately via DIRECT_POST).

All fields optional; pass inside platformSpecificData on the TikTok platform entry.

Video media requirements
SpecificationTikTok requirement
ContainerMP4 recommended; MOV and WebM supported
Video codecH.264 recommended; H.265, VP8, and VP9 supported
Frame rate23-60 FPS
DimensionsWidth and height must each be 360-4,096 px
DurationCreator-specific; maximum API upload length is 10 minutes
File size4 GB maximum

Duration is creator-specific; check maxVideoPostDurationSec from creator-info before publishing.

Photo and carousel media requirements
RequirementSupport
Images per post1-32; two or more images create a carousel
Media typeImages only; TikTok carousels cannot mix images and videos
Aspect ratioBetween 1:2.13 and 2.13:1
Matching slidesEvery carousel image must use the same aspect ratio
Delivery formatImages are normalized to TikTok-compatible JPEG files
Cover imageSet photoCoverIndex; indexes start at 0

Two or more images create a carousel; every image URL must be publicly reachable.

Connect a TikTok account
curl {{API_BASE_URL}}/v1/connect/tiktok \
  -H "x-access-key: YOUR_API_KEY"
Publish a TikTok video
curl -X POST "{{API_BASE_URL}}/v1/posts" \
  -H "x-access-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "A short example update.",
    "platforms": [
      { "platform": "tiktok", "accountId": "tt_321" }
    ],
    "mediaItems": [
      { "type": "video", "url": "https://cdn.example.com/video.mp4" }
    ],
    "publishNow": true
  }'
Published video response
{
	"success": true,
	"status": "published",
	"postId": "post_pqr678",
	"platforms": [
		{
			"platform": "tiktok",
			"success": true,
			"platformPostUrl": "https://www.tiktok.com/@user/video/7123456789"
		}
	]
}
Publish a TikTok photo carousel
curl -X POST "{{API_BASE_URL}}/v1/posts" \
  -H "x-access-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "A short example update.",
    "platforms": [
      {
        "platform": "tiktok",
        "accountId": "tt_321",
        "platformSpecificData": {
          "description": "Example post details.",
          "privacyLevel": "PUBLIC_TO_EVERYONE",
          "autoAddMusic": true,
          "photoCoverIndex": 0
        }
      }
    ],
    "mediaItems": [
      { "type": "image", "url": "https://cdn.example.com/stop-1.jpg" },
      { "type": "image", "url": "https://cdn.example.com/stop-2.jpg" },
      { "type": "image", "url": "https://cdn.example.com/stop-3.jpg" }
    ],
    "publishNow": true
  }'
TikTok platformSpecificData entry
{
	"platform": "tiktok",
	"accountId": "tt_321",
	"platformSpecificData": {
		"privacyLevel": "PUBLIC_TO_EVERYONE",
		"disableComment": false,
		"disableDuet": false,
		"disableStitch": false,
		"draft": false
	}
}
Fetch TikTok creator info
curl "{{API_BASE_URL}}/v1/tiktok/creator-info?accountId=tt_321" \
  -H "x-access-key: YOUR_API_KEY"
Cross-post one vertical video to TikTok, YouTube Shorts, and Instagram Reels
curl -X POST "{{API_BASE_URL}}/v1/posts" \
  -H "x-access-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "A short example update.",
    "platforms": [
      { "platform": "tiktok", "accountId": "tt_321" },
      { "platform": "youtube", "accountId": "yt_789", "platformSpecificData": { "title": "New Tutorial", "visibility": "public" } },
      { "platform": "instagram", "accountId": "ig_456" }
    ],
    "mediaItems": [
      { "type": "video", "url": "https://cdn.example.com/vertical.mp4" }
    ],
    "publishNow": true
  }'