Lattice SDKv3.2.0Stable

One client for every runtime you ship.

Typed requests, idempotency and streamed events across five languages. Same API, same limits, same trace — no hand-written HTTP in your app.

Languages
5
Client size
4.7 kB
Runtime deps
0
P99 latency
212 ms
SDK showcase
2026-10-01
create-run.ts
import { Lattice } from "@lattice/sdk";
const lattice = new Lattice({
apiKey: process.env.LATTICE_API_KEY,
});
const run = await lattice.runs.create({
workflow: "invoice-reminder",
version: "v3",
input: {
invoiceId: "inv_8fK2mQ",
dueIn: "3d",
},
idempotencyKey: "invoice-8fK2mQ-reminder-1",
});
console.log(run.id, run.status);
npm install @lattice/sdk
Live responserun_4nT8xWq2
Status
200 OK
Latency
184 ms
Region
fra1
{
"id": "run_4nT8xWq2",
"object": "workflow.run",
"status": "queued",
"workflow": "invoice-reminder",
"version": "v3",
"input": {
"invoiceId": "inv_8fK2mQ",
"dueIn": "3d"
},
"attempt": 1,
"region": "fra1",
"created_at": "2026-11-07T14:32:08.114Z",
"trace_id": "trc_9pR3kL7d",
"links": {
"self": "https://api.lattice.dev/v1/runs/run_4nT8xWq2",
"events": "https://api.lattice.dev/v1/runs/run_4nT8xWq2/events"
}
}
Typed end to end
Request and response types are generated with every release, so a breaking change fails at compile time.
Retries that behave
Jittered exponential backoff on 429 and 5xx, capped by the rate-limit reset header. Never on a 4xx you can fix.
Streamed by default
Consume run events over SSE with a typed async iterator. Backpressure and reconnects are handled.
Zero runtime deps
4.7 kB gzipped. ESM and CJS builds, Node 20+, Bun, Deno and edge runtimes.

MIT licensed · Node 20+, Bun, Deno and Workers · signed releases

Response loaded. 200 OK in 184 milliseconds.