SDKs

Official client libraries for TypeScript, Python, PHP, and Go.

We publish official SDKs so you don’t have to hand-roll HTTP calls, auth headers, pagination, retries, or error handling. Every SDK is generated from the same OpenAPI spec that powers this reference, so it always matches the live API — and is fully typed.

What every SDK gives you

  • Authentication — pass your API key once; the SDK sends it on every request.
  • Typed models — resources and parameters are fully typed for editor autocomplete and safety.
  • Automatic pagination — list methods return an iterator that fetches pages for you.
  • Retries with backoff — transient 429/5xx responses are retried automatically.
  • Typed errors — non-2xx responses raise a typed error carrying code and request_id.

Environments

Point the SDK at the sandbox while developing, then switch to production:

1import { UsgmClient, UsgmEnvironment } from "@usgm/sdk";
2
3const usgm = new UsgmClient({
4 apiKey: process.env.USGM_API_KEY,
5 environment: UsgmEnvironment.Sandbox, // omit for Production
6});

SDKs are generated with Fern from the gateway’s OpenAPI 3.1 document. When the API changes, the SDKs are regenerated and re-published from the same spec, so the client is never out of date.