Platforms
Threads API
Post to Threads with Late API - Text, images, videos, and thread sequences
Quick Start
Post to Threads 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": "Sharing some thoughts on building in public ๐",
"platforms": [
{"platform": "threads", "accountId": "YOUR_ACCOUNT_ID"}
],
"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: 'Sharing some thoughts on building in public ๐',
platforms: [
{ platform: 'threads', accountId: 'YOUR_ACCOUNT_ID' }
],
publishNow: true
})
});
const { post } = await response.json();
console.log('Posted to Threads!', post._id);import requests
response = requests.post(
'https://getlate.dev/api/v1/posts',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'content': 'Sharing some thoughts on building in public ๐',
'platforms': [
{'platform': 'threads', 'accountId': 'YOUR_ACCOUNT_ID'}
],
'publishNow': True
}
)
post = response.json()
print(f"Posted to Threads! {post['_id']}")Overview
Threads (by Meta) supports images, videos, and thread sequences (multiple connected posts).
Image Requirements
| Property | Requirement |
|---|---|
| Max Images | 20 per post |
| Formats | JPEG, PNG, WebP, GIF |
| Max File Size | 8 MB per image |
| Recommended | 1080 ร 1350 px (4:5) |
Aspect Ratios
| Ratio | Dimensions | Notes |
|---|---|---|
| 4:5 | 1080 ร 1350 px | Portrait, recommended |
| 1:1 | 1080 ร 1080 px | Square |
| 16:9 | 1080 ร 608 px | Landscape |
Image Post Example
curl -X POST https://getlate.dev/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Sharing some thoughts on building in public ๐",
"mediaItems": [
{"url": "https://example.com/photo1.jpg"},
{"url": "https://example.com/photo2.jpg"}
],
"platforms": [
{"platform": "threads", "accountId": "YOUR_ACCOUNT_ID"}
],
"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: 'Sharing some thoughts on building in public ๐',
mediaItems: [
{ url: 'https://example.com/photo1.jpg' },
{ url: 'https://example.com/photo2.jpg' }
],
platforms: [
{ platform: 'threads', accountId: 'YOUR_ACCOUNT_ID' }
],
publishNow: true
})
});response = requests.post(
'https://getlate.dev/api/v1/posts',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'content': 'Sharing some thoughts on building in public ๐',
'mediaItems': [
{'url': 'https://example.com/photo1.jpg'},
{'url': 'https://example.com/photo2.jpg'}
],
'platforms': [
{'platform': 'threads', 'accountId': 'YOUR_ACCOUNT_ID'}
],
'publishNow': True
}
)Video Requirements
| Property | Requirement |
|---|---|
| Max Videos | 1 per post |
| Formats | MP4, MOV |
| Max File Size | 1 GB |
| Max Duration | 5 minutes |
| Min Duration | 0 seconds |
| Aspect Ratio | 9:16 (vertical), 16:9 (landscape), 1:1 |
| Resolution | 1080p recommended |
Recommended Video Specs
| Property | Recommended |
|---|---|
| Resolution | 1080 ร 1920 px (vertical) |
| Frame Rate | 30 fps |
| Codec | H.264 |
| Audio | AAC, 128 kbps |
Thread Sequences
Create connected posts (root + replies):
curl -X POST https://getlate.dev/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"platforms": [{
"platform": "threads",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"threadItems": [
{
"content": "Here is a thread about API design ๐งต",
"mediaItems": [{"url": "https://example.com/cover.jpg"}]
},
{
"content": "1/ First, let us talk about REST principles..."
},
{
"content": "2/ Authentication is crucial. Here is what we recommend...",
"mediaItems": [{"url": "https://example.com/auth-diagram.jpg"}]
},
{
"content": "3/ Finally, always version your API! /end"
}
]
}
}],
"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({
platforms: [{
platform: 'threads',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
threadItems: [
{
content: 'Here is a thread about API design ๐งต',
mediaItems: [{ url: 'https://example.com/cover.jpg' }]
},
{ content: '1/ First, let us talk about REST principles...' },
{
content: '2/ Authentication is crucial. Here is what we recommend...',
mediaItems: [{ url: 'https://example.com/auth-diagram.jpg' }]
},
{ content: '3/ Finally, always version your API! /end' }
]
}
}],
publishNow: true
})
});response = requests.post(
'https://getlate.dev/api/v1/posts',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'platforms': [{
'platform': 'threads',
'accountId': 'YOUR_ACCOUNT_ID',
'platformSpecificData': {
'threadItems': [
{
'content': 'Here is a thread about API design ๐งต',
'mediaItems': [{'url': 'https://example.com/cover.jpg'}]
},
{'content': '1/ First, let us talk about REST principles...'},
{
'content': '2/ Authentication is crucial. Here is what we recommend...',
'mediaItems': [{'url': 'https://example.com/auth-diagram.jpg'}]
},
{'content': '3/ Finally, always version your API! /end'}
]
}
}],
'publishNow': True
}
)Thread Sequence Notes
- First item is the root post
- Subsequent items become replies in order
- Each item can have its own media
- No limit on thread length
Carousel Posts
Multiple images in a single swipeable post:
{
"content": "Product launch day! Here are all the new features:",
"mediaItems": [
{ "url": "https://example.com/feature1.jpg" },
{ "url": "https://example.com/feature2.jpg" },
{ "url": "https://example.com/feature3.jpg" }
],
"platforms": [
{ "platform": "threads", "accountId": "acc_123" }
]
}Up to 20 images per carousel.
GIF Support
Threads supports animated GIFs:
- Auto-play in feed
- Max 8 MB
- Counts toward image limit
- May be converted to video internally
Link Previews
URLs in text generate preview cards:
{
"content": "Just published a new blog post! https://myblog.com/new-post",
"platforms": [
{ "platform": "threads", "accountId": "acc_123" }
]
}Text Limits
| Property | Limit |
|---|---|
| Post text | 500 characters |
| With link | Link may use additional space |
Common Issues
"Too many images"
Max 20 images per post. Use a thread sequence for more content.
Video too long
Max duration is 5 minutes. Trim or split longer videos.
Image rejected
- Check file size (โค8 MB)
- Ensure valid format
- Verify aspect ratio is reasonable
Thread sequence failed
- Ensure first item has content
- Check each item's media individually
- Verify account permissions
"Media type mismatch"
Unlike TikTok, Threads allows mixing images and videos in thread sequences, but not in a single post with multiple media.
Related API Endpoints
- Connect Threads Account โ Via Instagram authentication
- Create Post โ Post creation and scheduling
- Upload Media โ Image and video uploads