Publish Kit API Documentation
The agentic social media platform. One API key — your AI agent can generate content, produce images & videos, upload media, and publish to 9+ social platforms programmatically.
Interactive API Reference
Browse every endpoint with a sidebar, test requests live, see request/response schemas, and copy code samples.
Powered by Scalar — enter your API key and start testing immediately.
Quick Start
Get your first post published in 3 steps.
Authentication
API keys, scopes, and security details.
Posting API
Publish, schedule, and retrieve posts.
AI Content
Generate posts, images, and videos with AI.
Media Upload
Upload images and videos to attach to posts.
Agent Workflows
End-to-end automation examples.
Quick Start
Get your agent publishing to social media in 3 steps.
Connect social accounts
Sign up at publishkit.io, go to Dashboard → Profile → connect Twitter, LinkedIn, Instagram, etc.
Create an API key
Dashboard → API Keys → Create Key. Copy the full key — it is only shown once.
Make your first call
POST to /api/external/v1/post with your key and content.
curl -X POST https://publishkit.io/api/external/v1/post \
-H "X-API-Key: pk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"content": "Hello from my AI agent! 🤖",
"platforms": ["twitter", "linkedin"]
}'{
"success": true,
"post": { "id": "uuid", "status": "published" },
"results": [
{ "platform": "twitter", "success": true },
{ "platform": "linkedin", "success": true }
],
"credits_remaining": 199
}Authentication
All endpoints (except Free Tools) require an API key.
Option A — X-API-Key header (recommended)
X-API-Key: pk_live_your_keyOption B — Bearer token
Authorization: Bearer pk_live_your_key| Scope | Allows |
|---|---|
post:create | Create, publish, and schedule posts |
post:read | Read post history and status |
connection:read | List connected social accounts |
connection:write | Manage social account connections |
profile:read | Read profile information |
account:read | Read credit balance and subscription info |
Posting & Scheduling
POST /api/external/v1/post — publish immediately or schedule for later. 1 credit per post.
Publish now
{
"content": "Your post text",
"platforms": ["twitter", "instagram"],
"mediaUrls": ["https://image.jpg"],
"hashtags": ["ai", "content"]
}Schedule for later
{
"content": "Scheduled post",
"platforms": ["linkedin"],
"scheduledAt": "2026-03-16T09:00:00Z"
}AI Content Generation
Generate posts, images, and videos — all using your profile brand context, products, and audience settings.
Text & Images
POST /api/content/posts/generateAI Post
2–12 creditsGenerate platform-optimised post copy. Set includeImage: true to attach a generated image.
POST /api/ai-content/images/generateAI Image
8 creditsGenerate images using brand context, product references, style presets, and aspect ratio.
Video
POST /api/ai-content/videos/generateAI Video from Image
70+ creditsAnimate an image with audio and a motion prompt. Supports 480p / 720p / 1080p output.
POST /api/ai-content/videos/subtitlesAdd Subtitles to Video
5 creditsTranscribe a video and render animated captions using Remotion + Whisper.
AI Avatars
GET /api/ai-content/avatars/listList Avatars
FreeList all trained avatars for the authenticated account.
POST /api/ai-content/avatars/generateGenerate Avatar Image
8 creditsGenerate an image with a trained avatar. Add products or scene references via additionalImages.
GET /api/ai-content/avatars/voicesList Voices
FreeList all available AI voices for avatar video narration.
PATCH /api/ai-content/avatars/updateUpdate Avatar
FreeUpdate avatar name, description, or thumbnail.
DELETE /api/ai-content/avatars/deleteDelete Avatar
FreePermanently delete a trained avatar.
POST /api/ai-content/avatars/set-defaultSet Default Avatar
FreeMark an avatar as the default for the profile.
Media Upload
Three ways to attach media to posts.
Inline with post
Attach media= file in multipart/form-data when calling POST /api/external/v1/post
200 MB maxBy URL reference
Pass mediaUrls: ["https://..."] in your post body — any already-hosted image or video
Any hosted URLPre-upload via URL
POST /api/profiles/{id}/upload-media-url to re-upload from external URL and get a permanent URL
Re-hosts the fileSupported Platforms
twitterlinkedininstagramfacebooktiktokyoutubepinterestredditthreadsAI Agent Workflows
Generate & Publish
- 1
GET /api/external/v1/profile → check credits >= 12 - 2
GET /api/external/v1/connections → discover platforms - 3
POST /api/content/posts/generate with includeImage: true - 4
POST /api/external/v1/post with generated content + imageUrl
Upload & Schedule
- 1
POST /api/external/v1/post (multipart) with media file - 2
Include scheduledAt: "2026-03-16T09:00:00Z" - 3
GET /api/external/v1/post?status=scheduled → confirm
AI Image — Multi-Platform
- 1
POST /api/ai-content/images/generate → get imageUrl - 2
Build platformContent for each platform - 3
POST /api/external/v1/post with mediaUrls + platformContent
Product Launch Campaign
- 1
POST /api/profiles/{id}/products → add product with images - 2
POST /api/ai-content/images/generate with subjectType: product → get productImageUrl - 3
POST /api/ai-content/avatars/generate with additionalImages: [productImageUrl] - 4
Schedule posts at T-3d, T-1d, launch day, T+1d
Credits & Plans
| Operation | Credits |
|---|---|
| Publish / schedule a post | 1 |
| AI post — text only | 2 |
| AI post + image | 12 |
| AI image generation | 8 |
| AI video (5 seconds) | 70 |
| AI video per extra second | 14 |
| Avatar image generation | 8 |
| Add subtitles to video | 5 |
Starter
$19/mo
1,900 credits/mo · 5 profiles
Pro
Popular$49/mo
4,900 credits/mo · 15 profiles
Business
$99/mo
9,900 credits/mo · 50 profiles