SDK
renza-sdk is a thin TypeScript client over the API. It's generated from the API's
OpenAPI spec, so the types can't drift from the wire: every request body, response shape, and enum
in the reference is the type you get in your editor.
npm install renza-sdk
Prefer a different language? The spec is public — generate a client of your own from
api.renza.io/openapi.json, or drive the same surface from
the CLI.
Create a client
import { createRenzaClient } from "renza-sdk";
const renza = createRenzaClient({
apiKey: process.env.RENZA_API_KEY!,
// baseUrl defaults to "https://api.renza.io"
});
createRenzaClient accepts { apiKey, baseUrl?, fetch?, client? }. Pass a custom fetch for
testing or for a runtime with a non-standard global; client names your integration in the
Renza-Client header.
Methods are grouped by resource and mirror the API one-to-one:
const page = await renza.decks.list({ status: "draft" });
const deck = await renza.decks.get("deck_2a9f8c1b");
const imported = await renza.imports.create({
source: "paste",
html: "<!doctype html><section data-renza-slide>Slide 1</section>…",
title: "Q3 Board Deck",
});
The full surface includes decks, folders, imports, artifacts, slides, shares,
comments, grants, apiKeys, orgs, and memberships. Anything not yet wrapped is reachable
through renza.raw, the underlying typed openapi-fetch client.
Every operation page in the API reference shows its SDK call — flip the toggle to the SDK tab on any endpoint to see the exact method and arguments.
Errors
Failed calls throw RenzaApiError, carrying the error envelope:
import { RenzaApiError } from "renza-sdk";
try {
await renza.decks.get("deck_missing");
} catch (err) {
if (err instanceof RenzaApiError) {
console.error(err.status); // HTTP status
console.error(err.code); // closed-set code, e.g. "resource_not_found"
console.error(err.requestId); // Request-Id, for bug reports
}
}
Branch on err.code — the codes are a closed set, each documented at
/docs/errors.
Types
Every request and response shape is exported — Deck, DeckList, CreateDeckBody, Comment,
Grant, Share, and so on. Import them directly, or pull the generated schema types from
renza-sdk/schema.
import type { Deck, CreateDeckBody } from "renza-sdk";