TypeScript SDK
@akteora/sdk is a typed client for every route, generated from the same OpenAPI document as the
API reference. The Akteora dashboard is built on it, so it is exercised by every click
in the product before it is published.
npm install @akteora/sdk
import { createAkteoraClient, unwrap } from '@akteora/sdk'
const akteora = createAkteoraClient({
baseUrl: 'https://api.akteora.com',
apiKey: process.env.AKTEORA_API_KEY,
})
const brands = await unwrap(akteora.GET('/v1/brands'))
const reel = await unwrap(
akteora.GET('/v1/reels/{id}', { params: { path: { id: 'rel_01K5A7H1C9P3R5T7V9X1Z3B5D7' } } }),
)
- Paths, parameters, bodies and responses are all typed; a typo in a field is a compile error.
unwrapreturns the data, or throwsAkteoraApiErrorwith the problem document asproblem—type,detail,request_id, andlimitorrequired_scopewhere they apply.- Webhook payloads are typed as
WebhookEvent(narrow ontype), or one event withWebhookEventOf<'reel.ready'>. Verify the signature before trusting one (webhooks). - It runs anywhere
fetchdoes: Node 18+, Deno, Bun, edge runtimes. Keep an API key on a server.
Versions follow semver, with the major version matching the API's path:
1.x for /v1. A minor version adds what the API adds; nothing that compiled breaks without a
major version. The package's changelog lists each release.