v1.0REST APIOpenAPI 3.1

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.

Open API Reference

Quick Start

Get your agent publishing to social media in 3 steps.

1

Connect social accounts

Sign up at publishkit.io, go to Dashboard → Profile → connect Twitter, LinkedIn, Instagram, etc.

2

Create an API key

Dashboard → API Keys → Create Key. Copy the full key — it is only shown once.

3

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_key

Option B — Bearer token

Authorization: Bearer pk_live_your_key
ScopeAllows
post:createCreate, publish, and schedule posts
post:readRead post history and status
connection:readList connected social accounts
connection:writeManage social account connections
profile:readRead profile information
account:readRead 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/generate

AI Post

2–12 credits

Generate platform-optimised post copy. Set includeImage: true to attach a generated image.

POST /api/ai-content/images/generate

AI Image

8 credits

Generate images using brand context, product references, style presets, and aspect ratio.

Video

POST /api/ai-content/videos/generate

AI Video from Image

70+ credits

Animate an image with audio and a motion prompt. Supports 480p / 720p / 1080p output.

POST /api/ai-content/videos/subtitles

Add Subtitles to Video

5 credits

Transcribe a video and render animated captions using Remotion + Whisper.

AI Avatars

GET /api/ai-content/avatars/list

List Avatars

Free

List all trained avatars for the authenticated account.

POST /api/ai-content/avatars/generate

Generate Avatar Image

8 credits

Generate an image with a trained avatar. Add products or scene references via additionalImages.

GET /api/ai-content/avatars/voices

List Voices

Free

List all available AI voices for avatar video narration.

PATCH /api/ai-content/avatars/update

Update Avatar

Free

Update avatar name, description, or thumbnail.

DELETE /api/ai-content/avatars/delete

Delete Avatar

Free

Permanently delete a trained avatar.

POST /api/ai-content/avatars/set-default

Set Default Avatar

Free

Mark 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 max

By URL reference

Pass mediaUrls: ["https://..."] in your post body — any already-hosted image or video

Any hosted URL

Pre-upload via URL

POST /api/profiles/{id}/upload-media-url to re-upload from external URL and get a permanent URL

Re-hosts the file

Supported Platforms

Twittertwitter
LinkedInlinkedin
Instagraminstagram
Facebookfacebook
TikToktiktok
YouTubeyoutube
Pinterestpinterest
Redditreddit
Threadsthreads

AI Agent Workflows

Generate & Publish

  1. 1GET /api/external/v1/profile → check credits >= 12
  2. 2GET /api/external/v1/connections → discover platforms
  3. 3POST /api/content/posts/generate with includeImage: true
  4. 4POST /api/external/v1/post with generated content + imageUrl

Upload & Schedule

  1. 1POST /api/external/v1/post (multipart) with media file
  2. 2Include scheduledAt: "2026-03-16T09:00:00Z"
  3. 3GET /api/external/v1/post?status=scheduled → confirm

AI Image — Multi-Platform

  1. 1POST /api/ai-content/images/generate → get imageUrl
  2. 2Build platformContent for each platform
  3. 3POST /api/external/v1/post with mediaUrls + platformContent

Product Launch Campaign

  1. 1POST /api/profiles/{id}/products → add product with images
  2. 2POST /api/ai-content/images/generate with subjectType: product → get productImageUrl
  3. 3POST /api/ai-content/avatars/generate with additionalImages: [productImageUrl]
  4. 4Schedule posts at T-3d, T-1d, launch day, T+1d

Credits & Plans

OperationCredits
Publish / schedule a post1
AI post — text only2
AI post + image12
AI image generation8
AI video (5 seconds)70
AI video per extra second14
Avatar image generation8
Add subtitles to video5

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


API v1.0 · REST · OpenAPI 3.1