Skip to main content
The Ablo Decks SDK (@abloatai/decks) is a typed TypeScript client that lets you build Ablo slide presentations entirely from code. Instead of pointing and clicking in the editor, you describe your deck — its slides, layers, styling, and data — as structured JavaScript objects, and the SDK posts those instructions to the Ablo API on your behalf. The result is a fully-rendered Ablo deck that looks and behaves exactly like one created by hand in the editor or generated by Ablo’s AI.

What you can build

The SDK is useful any time slide creation needs to happen programmatically. Common use cases include:
  • Automated reports — generate weekly or monthly slide decks from live data sources.
  • Personalised presentations — produce a unique deck for each user or customer at request time.
  • Data-driven storytelling — pipe query results directly into charts and tables without manual copy-paste.
  • CI/CD artefacts — commit presentation generation scripts alongside your codebase so decks are always in sync with your product.

Layer types

A slide is composed of layers. Each layer has a type field and a bounding box (at: { x, y, w, h }) that positions it on the 1920 × 1080 canvas. The following layer types are available:
TypeDescription
textA single block of styled text — headings, body copy, captions.
bulletsAn unordered list of bullet points.
numberedAn ordered (numbered) list.
barA bar chart backed by an array of { label, value } data points.
donutA donut (ring) chart for part-to-whole comparisons.
chartA general chart layer supporting multiple chart families.
tableA data table with full cell and border styling.
imageAn image layer, referenced by URL (use ablo.images.upload to host your own).
shapeA geometric shape — rectangles, circles, and more.
iconA named icon from the Ablo icon library.

Resource namespaces

The Decks client exposes six resource namespaces. Each namespace maps to a distinct part of the Ablo data model:
  • ablo.decks — create, retrieve, update, and delete decks.
  • ablo.slides — manage individual slides within a deck.
  • ablo.layers — add, update, and remove layers on a slide.
  • ablo.layouts — work with named layout templates and AI-brief placeholders.
  • ablo.themes — apply structured { fonts, colors } themes across a deck.
  • ablo.images — upload raw image bytes to Ablo-hosted CDN storage and receive a URL for use in image layers.

A minimal example

The snippet below creates a single-slide deck with one heading layer. It shows the minimum code needed to get a deck into your Ablo workspace.
import { Decks } from '@abloatai/decks';

const ablo = new Decks(process.env.ABLO_API_KEY);

const deck = await ablo.decks.create({
  title: 'Launch Plan',
  slides: [
    {
      title: 'Overview',
      layers: [
        {
          type: 'text',
          text: 'We ship on Friday.',
          style: 'h1',
          at: { x: 160, y: 120, w: 1600, h: 160 },
        },
      ],
    },
  ],
});

console.log('Deck ID:', deck.id);
Every option in the SDK is a typed, discoverable Zod enum — your editor will suggest valid values as you type, so you never have to guess a string.
Ready to write your first deck? Head over to the Quickstart for a step-by-step walkthrough that gets you from installation to a running script in under five minutes.