LateLate API
Platforms

TikTok API

Post to TikTok with Late API - Videos, photo carousels, and creator tools


Quick Start

Post to TikTok in under 60 seconds:

curl -X POST https://getlate.dev/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Check out this amazing sunset! 🌅 #sunset #nature",
    "mediaItems": [
      {"url": "https://example.com/sunset-video.mp4"}
    ],
    "platforms": [{
      "platform": "tiktok",
      "accountId": "YOUR_ACCOUNT_ID"
    }],
    "tiktokSettings": {
      "privacy_level": "PUBLIC_TO_EVERYONE",
      "allow_comment": true,
      "allow_duet": true,
      "allow_stitch": true,
      "content_preview_confirmed": true,
      "express_consent_given": true
    },
    "publishNow": true
  }'
const response = await fetch('https://getlate.dev/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Check out this amazing sunset! 🌅 #sunset #nature',
    mediaItems: [
      { url: 'https://example.com/sunset-video.mp4' }
    ],
    platforms: [{
      platform: 'tiktok',
      accountId: 'YOUR_ACCOUNT_ID'
    }],
    tiktokSettings: {
      privacy_level: 'PUBLIC_TO_EVERYONE',
      allow_comment: true,
      allow_duet: true,
      allow_stitch: true,
      content_preview_confirmed: true,
      express_consent_given: true
    },
    publishNow: true
  })
});

const { post } = await response.json();
console.log('Posted to TikTok!', post._id);
import requests

response = requests.post(
    'https://getlate.dev/api/v1/posts',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'content': 'Check out this amazing sunset! 🌅 #sunset #nature',
        'mediaItems': [
            {'url': 'https://example.com/sunset-video.mp4'}
        ],
        'platforms': [{
            'platform': 'tiktok',
            'accountId': 'YOUR_ACCOUNT_ID'
        }],
        'tiktokSettings': {
            'privacy_level': 'PUBLIC_TO_EVERYONE',
            'allow_comment': True,
            'allow_duet': True,
            'allow_stitch': True,
            'content_preview_confirmed': True,
            'express_consent_given': True
        },
        'publishNow': True
    }
)

post = response.json()
print(f"Posted to TikTok! {post['_id']}")

Content Types

TikTok supports two content types:

TypeDescriptionMax Items
VideoSingle video post1
Photo CarouselMultiple images35

Important: You cannot mix photos and videos in the same post.

Video Requirements

PropertyRequirement
FormatsMP4, MOV, WebM
Max File Size4 GB
Max Duration10 minutes
Min Duration3 seconds
Resolution720 × 1280 px minimum
Aspect Ratio9:16 (recommended)
Frame Rate24-60 fps
CodecH.264
PropertyRecommended
Resolution1080 × 1920 px
Aspect Ratio9:16 (vertical)
Frame Rate30 fps
Bitrate10-20 Mbps
AudioAAC, 128 kbps

Video Cover (Thumbnail)

Customize which frame appears as the thumbnail:

{
  "tiktokSettings": {
    "video_cover_timestamp_ms": 3000
  }
}
  • Value in milliseconds
  • Default: 1000 (1 second)
  • Must be within video duration

Create photo carousels with up to 35 images:

curl -X POST https://getlate.dev/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "My travel highlights ✈️",
    "mediaItems": [
      {"url": "https://example.com/photo1.jpg"},
      {"url": "https://example.com/photo2.jpg"},
      {"url": "https://example.com/photo3.jpg"}
    ],
    "platforms": [{
      "platform": "tiktok",
      "accountId": "YOUR_ACCOUNT_ID"
    }],
    "tiktokSettings": {
      "privacy_level": "PUBLIC_TO_EVERYONE",
      "allow_comment": true,
      "media_type": "photo",
      "photo_cover_index": 0,
      "content_preview_confirmed": true,
      "express_consent_given": true
    },
    "publishNow": true
  }'
const response = await fetch('https://getlate.dev/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'My travel highlights ✈️',
    mediaItems: [
      { url: 'https://example.com/photo1.jpg' },
      { url: 'https://example.com/photo2.jpg' },
      { url: 'https://example.com/photo3.jpg' }
    ],
    platforms: [{
      platform: 'tiktok',
      accountId: 'YOUR_ACCOUNT_ID'
    }],
    tiktokSettings: {
      privacy_level: 'PUBLIC_TO_EVERYONE',
      allow_comment: true,
      media_type: 'photo',
      photo_cover_index: 0,
      content_preview_confirmed: true,
      express_consent_given: true
    },
    publishNow: true
  })
});
response = requests.post(
    'https://getlate.dev/api/v1/posts',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'content': 'My travel highlights ✈️',
        'mediaItems': [
            {'url': 'https://example.com/photo1.jpg'},
            {'url': 'https://example.com/photo2.jpg'},
            {'url': 'https://example.com/photo3.jpg'}
        ],
        'platforms': [{
            'platform': 'tiktok',
            'accountId': 'YOUR_ACCOUNT_ID'
        }],
        'tiktokSettings': {
            'privacy_level': 'PUBLIC_TO_EVERYONE',
            'allow_comment': True,
            'media_type': 'photo',
            'photo_cover_index': 0,
            'content_preview_confirmed': True,
            'express_consent_given': True
        },
        'publishNow': True
    }
)
PropertyRequirement
Max Photos35
FormatsJPEG, PNG, WebP
Max File Size20 MB per image
Aspect Ratio9:16 recommended
Resolution1080 × 1920 px recommended

Title/Caption Limits

Content TypeTitle LimitDescription
Video2200 charsFull content used as title
Photo90 charsAuto-truncated (hashtags/URLs stripped)

For photo carousels with longer captions, use the description field:

{
  "tiktokSettings": {
    "description": "This is my detailed description up to 4000 characters..."
  }
}

Auto-Add Music

Let TikTok add recommended music to photo carousels:

{
  "tiktokSettings": {
    "auto_add_music": true
  }
}

Note: Only works for photo carousels, not videos.

AI Disclosure

Disclose AI-generated content:

{
  "tiktokSettings": {
    "video_made_with_ai": true
  }
}

Draft Mode

Send to Creator Inbox as draft instead of publishing:

{
  "tiktokSettings": {
    "draft": true
  }
}

Required TikTok Settings

Due to TikTok's Direct Post API requirements, these fields are required:

FieldRequired ForNotes
privacy_levelAllMust match allowed values from creator info
allow_commentAllEnable/disable comments
allow_duetVideos onlyEnable/disable duets
allow_stitchVideos onlyEnable/disable stitches
content_preview_confirmedAllMust be true
express_consent_givenAllMust be true

Common Issues

"Invalid privacy_level"

The privacy_level must be one of the values allowed for the creator's account. Fetch allowed values from the TikTok creator info endpoint.

"Missing required fields"

Ensure content_preview_confirmed and express_consent_given are both true.

"Cannot mix media types"

TikTok doesn't allow photos and videos in the same post. Use either all photos or one video.

Video rejected

  • Check duration (3 sec - 10 min)
  • Verify format (MP4 recommended)
  • Ensure aspect ratio is vertical (9:16)

Photo titles are limited to 90 characters. Use the description field for longer text.