Skip to main content
hiloop ships a TypeScript and a Python SDK. Their typed operations and models are generated from the same API contract as the CLI and the API reference. The clients and generated models ship together and stay versioned in lockstep.
The SDKs are published at 0.x during the public preview: typed, versioned, and functional. Pin a version and expect the surface to evolve until GA.

Install

Configure a client

Point the client at the hiloop edge and authenticate with your API key. In TypeScript, pass it as the client’s auth option; in Python, as the AuthenticatedClient token. Either way the SDK sends it as an Authorization: Bearer header on every request.
In TypeScript, createClient builds an isolated instance you pass to each call as { client }. If you’d rather configure once and skip threading it through, set the package-level default client instead — then every operation uses it automatically:
TypeScript
The package also exports createConfig for building a config object you reuse across instances.

A first call

Echo your identity — the same check hiloop whoami runs:

Handle errors

Every API error uses the same typed envelope, and both SDKs surface it as ErrorBody. Branch on its stable snake_case code (for example not_found, quota_exceeded, rate_limited, internal) — never on the message text, whose wording can change. In TypeScript the envelope is the error half of each call’s result; in Python an error response is returned as an ErrorBody value you narrow with isinstance.
Two fields carry extra signal when present:
  • details.quota on quota_exceeded / rate_limited rejections names the limit that rejected the request (metric, limit, current, retry_after_seconds); rate limits also send a Retry-After header.
  • request_id on server faults (5xx) — quote it when contacting support to locate the failing request.

Patterns to know

  • Endpoint functions. Every operation is an importable function (for example, projectServiceListProjects) called with { client, body } in TypeScript, or a service module with sync / asyncio variants in Python.
  • Idempotency keys on create-style mutations. Supply a key explicitly when a retry must remain safe across processes.
  • Typed request and response models. Bodies and rows are typed (e.g. DataView, QueryRequest, QueryResponse), so your editor guides the call. Full type listings are in the TypeScript and Python SDK reference.

Where to go next