API Reference
YouTube API
Upload videos, Shorts, and manage YouTube channels with a single API call.
Quick Start
Get started in 3 steps
Get API Key
Sign up for free and get your API key in seconds.
Connect Account
Use our OAuth flow to connect YouTube accounts.
Start Posting
Make API calls to post content to YouTube.
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: 'Learn how to build a REST API from scratch...',
mediaItems: [{ type: 'video', url: 'https://example.com/tutorial.mp4' }],
platforms: [{
platform: 'youtube',
accountId: 'acc_abc123',
platformSpecificData: {
title: 'REST API Tutorial for Beginners',
visibility: 'public'
}
}],
tags: ['api', 'tutorial', 'programming'],
publishNow: true
})
});
const post = await response.json();
console.log(post.post._id); // '65f1c0a9e2b5af0012ab34cd'Endpoints
YouTube Endpoints
/v1/postsUpload or schedule a YouTube video or Short
/v1/posts/{id}Get status and details of a YouTube upload
/v1/posts/{id}Cancel a scheduled YouTube upload
/v1/profilesList all connected YouTube channels
Media Specs
Media Requirements
| Type | Format | Max Size | Notes |
|---|---|---|---|
| Video | MP4, MOV, AVI, WMV | 256 GB | Up to 12 hours duration |
| Shorts | MP4, MOV | 256 GB | Up to 60 sec, 9:16 aspect |
| Thumbnail | JPEG, PNG | 2 MB | 1280x720 recommended |
| Title | Text | 100 chars | Required for videos |
Late automatically transcodes and optimizes media for YouTube's requirements.
Rate Limits
API Limits
YouTube's Data API has quota limits that reset daily. Late manages your quota usage and queues uploads to avoid hitting limits.
Late handles all rate limiting automatically. We queue and retry requests as needed.
Capabilities
Features
- Upload long-form videos and Shorts
- Schedule video premieres
- Custom thumbnails support
- Tags, descriptions, and playlists
- Privacy settings (public/unlisted/private)
- Multi-channel management
- Webhook notifications for processing status
Response
Response Example
{
"post": {
"_id": "65f1c0a9e2b5af0012ab34cd",
"status": "published",
"content": "Learn how to build a REST API from scratch...",
"platforms": [{
"platform": "youtube",
"accountId": { "_id": "acc_abc123", "username": "YourChannel" },
"status": "published",
"platformPostId": "dQw4w9WgXcQ",
"platformPostUrl": "https://youtube.com/watch?v=dQw4w9WgXcQ"
}],
"createdAt": "2025-01-10T10:30:00Z"
},
"message": "Post published successfully"
}Start building with YouTube API
Skip the YouTube Data API complexity. Late handles OAuth, video processing, and quota limits so you can ship faster.
Free tier available • No credit card required • 99.97% uptime