hangar DOCS
Guides

TypeScript SDK.

A zero-dependency client for the Hangar provisioning API, designed for Node.js 20+ and browser runtimes.

Install and create a client

npm install @hangar/sdk

import { HangarClient } from "@hangar/sdk";

const hangar = new HangarClient({
  apiKey: process.env.HANGAR_API_KEY!,
});

Instances

const instance = await hangar.instances.create({
  name: "Research bot", agent: "openclaw", tier: "plus", region: "eu",
});
await hangar.instances.list();
await hangar.instances.get(instance.id);
await hangar.instances.stop(instance.id);
await hangar.instances.start(instance.id);
await hangar.instances.delete(instance.id);

Jobs and GDPR

await hangar.jobs.schedule(instance.id, {
  cron: "0 9 * * *", prompt: "Send a daily report",
});
await hangar.jobs.list(instance.id);
await hangar.jobs.remove(instance.id, "job_42");

const archive = await hangar.gdpr.exportData();
await hangar.gdpr.deleteAccount();

The client retries rate limits and server errors up to three times, honoring Retry-After where it is available.