API Reference
Twitter (X) API
Twitter's API charges $100/month for basic posting access and $5,000/month for full features. Zernio gives you tweets, threads, images, and videos from $19/month with no per-tweet fees.
Quick Start
- 1.Get API KeySign up for free and get your API key in seconds.
- 2.Connect AccountUse our OAuth flow to connect Twitter (X) accounts.
- 3.Start PostingMake API calls to post content to Twitter (X).
Post a tweet
JavaScript
const response = await fetch('https://zernio.com/api/v1/posts', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: 'Just shipped a new feature! ๐ Check it out at example.com',
mediaItems: [{ type: 'image', url: 'https://example.com/screenshot.png' }],
platforms: [{
platform: 'twitter',
accountId: 'acc_abc123'
}],
publishNow: true
})
});
const post = await response.json();
console.log(post.post._id); // '65f1c0a9e2b5af0012ab34cd'Twitter (X) Endpoints
POST/v1/posts
Create or schedule a tweet (text, image, video, or GIF)
GET/v1/posts/{id}
Get status and details of a tweet
DELETE/v1/posts/{id}
Cancel a scheduled tweet
GET/v1/profiles
List all connected Twitter/X accounts
Media Requirements
| Type | Format | Max Size | Notes |
|---|---|---|---|
| Image | PNG, JPEG, GIF, WebP | 5 MB | Up to 4 images per tweet |
| Video | MP4 | 512 MB | 0.5 - 140 sec duration |
| GIF | GIF | 15 MB | Animated GIFs supported |
| Text | UTF-8 | 280 chars | Links counted as 23 chars |
Zernio automatically transcodes and optimizes media for Twitter (X)'s requirements.
API Limits
Twitter's v2 API has strict rate limits that vary by endpoint. Zernio manages these automatically, ensuring your posts go out reliably.
Zernio handles all rate limiting automatically. We queue and retry requests as needed.
Features
- โPost tweets with images, videos, and GIFs
- โCreate multi-tweet threads
- โSchedule tweets for optimal times
- โMulti-account management
- โQuote tweet and reply support
- โWebhook notifications for post status
- โNo need for expensive Twitter API tiers
Response Example
Response
JSON
{
"post": {
"_id": "65f1c0a9e2b5af0012ab34cd",
"status": "published",
"content": "Just shipped a new feature! ๐ Check it out at example.com",
"platforms": [{
"platform": "twitter",
"accountId": { "_id": "acc_abc123", "username": "@yourhandle" },
"status": "published",
"platformPostId": "1234567890123456789",
"platformPostUrl": "https://x.com/yourhandle/status/1234567890123456789"
}],
"publishedAt": "2025-01-10T10:30:00Z"
},
"message": "Post published successfully"
}Start building with Twitter (X) API
Free tier available ยท No credit card required ยท 99.97% uptime

