> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryablo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to the Ablo Decks SDK for TypeScript

> Understand what the Ablo Decks SDK is, what it can build, and how its resources — decks, slides, layers, themes, and more — fit together.

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:

| Type       | Description                                                                    |
| ---------- | ------------------------------------------------------------------------------ |
| `text`     | A single block of styled text — headings, body copy, captions.                 |
| `bullets`  | An unordered list of bullet points.                                            |
| `numbered` | An ordered (numbered) list.                                                    |
| `bar`      | A bar chart backed by an array of `{ label, value }` data points.              |
| `donut`    | A donut (ring) chart for part-to-whole comparisons.                            |
| `chart`    | A general chart layer supporting multiple chart families.                      |
| `table`    | A data table with full cell and border styling.                                |
| `image`    | An image layer, referenced by URL (use `ablo.images.upload` to host your own). |
| `shape`    | A geometric shape — rectangles, circles, and more.                             |
| `icon`     | A 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.

```typescript theme={null}
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.

<Tip>
  Ready to write your first deck? Head over to the [Quickstart](/quickstart) for a step-by-step walkthrough that gets you from installation to a running script in under five minutes.
</Tip>
