kadenzo-sdk
v1.0.0
Published
Official JavaScript/TypeScript SDK for the Kadenzo API — schedule posts, generate captions, upload media, read analytics, and find best times across 12+ networks.
Maintainers
Readme
kadenzo-sdk
Official JavaScript/TypeScript SDK for the Kadenzo API — schedule posts, generate captions, upload media, read analytics, and find your best times across 12+ networks (Instagram, TikTok, X, LinkedIn, YouTube, Facebook, Pinterest, Threads, Bluesky, Mastodon, Telegram) from your own code. Zero dependencies, fully typed.
Install
npm install kadenzo-sdkAuth
Generate an API key in Kadenzo (Settings → API keys, studio.kadenzo.app/dashboard/settings?section=api; paid plans), then pass it in or set KADENZO_API_KEY.
import { Kadenzo } from 'kadenzo-sdk'
const kadenzo = new Kadenzo({ apiKey: process.env.KADENZO_API_KEY })Quick start
// 1. List your connected accounts
const accounts = await kadenzo.accounts.list()
// 2. Generate copy from a topic
const draft = await kadenzo.generate({
topic: 'our summer sale',
platform: 'instagram',
goal: 'promote',
})
// 3. Schedule it for a future time
const post = await kadenzo.posts.schedule({
content: draft.text ?? 'Hello 👋',
accountIds: [accounts[0].id],
scheduledFor: '2026-08-01T09:00:00Z',
})API
// Accounts
await kadenzo.accounts.list()
await kadenzo.accounts.analytics(accountId, { limit })
await kadenzo.accounts.bestTimes(accountId) // Professional+
// Posts (schedule-only — the scheduler publishes at scheduledFor)
await kadenzo.posts.list({ status, limit, offset })
await kadenzo.posts.get(postId)
await kadenzo.posts.schedule({ content, accountIds, scheduledFor, mediaUrls, dryRun })
await kadenzo.posts.update(postId, { content, accountIds, scheduledFor, mediaUrls })
await kadenzo.posts.cancel(postId)
await kadenzo.posts.analytics(postId)
// Media — upload a Buffer/Blob, get a hosted URL to attach
const { urls } = await kadenzo.media.upload(fileBuffer, 'photo.jpg')
// Generate copy
await kadenzo.generate({ topic, platform, goal }) // platform: instagram|tiktok|snapchat|facebook|youtube
// Listening + replies
await kadenzo.mentions.list({ platform, since, unread, limit })
await kadenzo.comments.create({ accountId, targetId, text }) // instagram|facebook|linkedinErrors
Any non-2xx response throws a KadenzoError with the HTTP status and the API's code:
import { Kadenzo, KadenzoError } from 'kadenzo-sdk'
try {
await kadenzo.posts.schedule({ accountIds: [], scheduledFor: '2026-08-01T09:00:00Z' })
} catch (err) {
if (err instanceof KadenzoError) {
console.error(err.status, err.code, err.message) // e.g. 422 invalid_account_ids ...
}
}Notes
- Schedule-only: posts go live at
scheduledForthrough each network's official API — there's no instant publish. - Idempotency: pass
idempotencyKeytoposts.schedule()to make retries safe. - Requirements: Node 18+ (built-in
fetch/FormData/Blob) or a modern browser.
Links
- Website: https://kadenzo.app
- API docs: https://kadenzo.app/features/api
- CLI:
kadenzo-cli· MCP server:kadenzo-mcp
License
MIT © Kadenzo
