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/sdkPrint 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
| Feature | Details |
|---|---|
| Print helpers | Text, receipt commands, templates with data, PDF and images. Send to a printer, a location or a role such as receipt. |
| Wait for a job | waitFor polls until the job is printed, failed or cancelled. |
| Jobs | Get, list (with automatic paging), cancel, retry and reprint. |
| Lookups | Printers, locations, templates, and which organization your key belongs to. |
| Safe retries | Network errors, 429 and 5xx are retried with backoff. Every print carries an idempotency key, so a retry never prints twice. |
| Typed errors | Authentication, permission, validation, not found, out of prints, rate limit and server errors, each with the API's message. |
| Webhooks | verify checks the CatzPrint-Signature header (HMAC-SHA256, constant time, 5-minute tolerance). |
| End-to-end encryption | Pass 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
| Language | Package | Needs |
|---|---|---|
| Node.js / TypeScript | @catzprint/sdk | Node 18+, no dependencies |
| Python | catzprint | Python 3.9+, sync and async clients |
| PHP | catzprint/catzprint-php | PHP 8.1+, ext-curl (ext-sodium for sealing) |
| Go | github.com/Catalizo/catzprint-go | Go 1.22+ |
| Rust | catzprint | Stable Rust, async (tokio) or the blocking feature |
Can't use an SDK? Everything they do is plain HTTPS, described in the API reference.