Skip to content
Docs menu · SDKs
Get started / SDKs

SDKs

Official libraries that wrap the CatzPrint API, so printing from your code is one call. All five work the same way and are tested against the live API.

Install

Pick your language. Every SDK reads your API key from CATZPRINT_API_KEY if you don't pass one.

npm install @catzprint/sdk

Print your first job

Create an API key in the console under API keys. Use a cz_test_ key while you build: test jobs go to your printers but are never billed.

import { CatzPrint } from "@catzprint/sdk";

const cz = new CatzPrint({ apiKey: process.env.CATZPRINT_API_KEY });

const printers = await cz.printers.list();
const job = await cz.printText("Hello from CatzPrint!", { printerId: printers[0].id });
const done = await cz.jobs.waitFor(job.id);
console.log(done.status); // "printed"

What every SDK does

FeatureDetails
Print helpersText, receipt commands, templates with data, PDF and images. Send to a printer, a location or a role such as receipt.
Wait for a jobwaitFor polls until the job is printed, failed or cancelled.
JobsGet, list (with automatic paging), cancel, retry and reprint.
LookupsPrinters, locations, templates, and which organization your key belongs to.
Safe retriesNetwork errors, 429 and 5xx are retried with backoff. Every print carries an idempotency key, so a retry never prints twice.
Typed errorsAuthentication, permission, validation, not found, out of prints, rate limit and server errors, each with the API's message.
Webhooksverify checks the CatzPrint-Signature header (HMAC-SHA256, constant time, 5-minute tolerance).
End-to-end encryptionPass sealed: true and the document is encrypted on your machine to the server key before it is sent.
TipNever put a live API key in a browser or mobile app. Call CatzPrint from your server.

Packages and versions

LanguagePackageNeeds
Node.js / TypeScript@catzprint/sdkNode 18+, no dependencies
PythoncatzprintPython 3.9+, sync and async clients
PHPcatzprint/catzprint-phpPHP 8.1+, ext-curl (ext-sodium for sealing)
Gogithub.com/Catalizo/catzprint-goGo 1.22+
RustcatzprintStable Rust, async (tokio) or the blocking feature

Can't use an SDK? Everything they do is plain HTTPS, described in the API reference.