Skip to content

SDK overview

@viite-ai/platform-sdk exposes a single PlatformApiClient that composes one typed sub-client per vertical. Construct it once; every sub-client shares the same auth.

import { PlatformApiClient } from '@viite-ai/platform-sdk'
const client = new PlatformApiClient({
baseUrl: 'https://platform-api.viite.ai',
getToken: () => process.env.VIITE_API_KEY, // or credentials: 'include' in a browser
})

See Install the SDK for auth modes.

AccessorVertical
client.authsign in / up / out (syncs the token to every sub-client)
client.apiKeysAPI-key management
client.configruntime config
client.settingsuser + app settings
client.sourcesingestion source reads
client.tasksthe /tasks kanban — every row the caller owns, including social/blog/link drafts and sales Deals, in one list (each carrying a channel)
client.quoteRequestquote requests
client.blogpublished blog posts (API-key public read)
client.assetsbinary uploads + storage usage
client.creditsAI credit balance, transactions, top-up checkout
client.entitlementsthe org’s plan and limits
client.connectorsconnected destinations (session only)
client.offerspricing catalog (admin writes + API-key public read)
client.observationsappend-only numeric time-series (the watch history)
client.skillsuser-authored pipeline skills
client.setSessionToken(token)
client.setSessionCookie(cookie)
client.getSessionToken()
client.clearSessionToken()

The most commonly used surface — jobs — is documented on the next page.