Docs
BlogHomeStart building

Totalum Database SDK — Overview

The TypeScript SDK used on every Totalum project — CRUD, filters, and built-in integrations, all through one client.


The Totalum Database SDK (totalum-api-sdk) is the official TypeScript SDK used on all Totalum projects to talk to the built-in database and platform services. It gives you a single typed client for:

  • CRUD operations — create, read, update and delete records.
  • Powerful filters and queries — nested relations, aggregations, grouping, pagination.
  • Built-in integrations — PDF generation, AI (ChatGPT & images), document scanning (OCR), video analysis, web scraping, email sending and file uploads.

#Install

bash
npm install totalum-api-sdk
ts
import { TotalumApiSdk } from 'totalum-api-sdk';

const totalum = new TotalumApiSdk({ apiKey: process.env.TOTALUM_API_KEY });
Inside a Totalum project you're already set up

Projects generated by Totalum come with the SDK installed and authenticated. When building with the AI agent, just ask it to read or write data — it uses this SDK under the hood.

#The SDK surface

The client is organized into namespaces:

NamespaceWhat it does
crudGet, query, create, edit, delete records and manage relations.
filesUpload/download files, generate PDFs, scan documents.
emailSend transactional emails.
openaiChatGPT completions and AI image generation/editing.
geminiAnalyze video with AI.
scrappingScrape pages and extract structured data.

#Reference

Dive into each topic in the sidebar under Totalum Database SDK: