Taiga

Generate an SDK

Use the OpenAPI spec to generate typed clients.

The Taiga Partner API is published as an OpenAPI 3.0.1 document. Drop it into your favorite generator to produce typed clients in any language.

Taiga Partner API · OpenAPI 3.0.1
Full machine-readable spec for every endpoint, request body, and response schema.

JSON

Requires an authorized Taiga partner account.

Download

You need an authorized partner account to download.

The spec lives behind Taiga authentication. Sign in to the developer portal with a Taiga partner account to download it from the browser, or pass an API key when fetching programmatically. See Authentication for how to create one.

You can also fetch it from the CLI with an API key:

curl https://api.taigabilling.com/openapi.json \
  -H "Authorization: Bearer $TAIGA_API_KEY" \
  -o taiga-openapi.json

Compatible generators

openapi-typescript

Lightweight TypeScript types only

OpenAPI Generator

Full clients in many languages

Stainless

Polished, idiomatic SDKs

Fern

SDK + docs generation

Speakeasy

SDK + docs generation

Your generator

Anything that speaks OpenAPI 3.0.1

Generate a client

Most generators do not pass authentication headers when fetching specs over HTTP, so point them at the local taiga-openapi.json file you downloaded above.

npx openapi-typescript ./taiga-openapi.json \
  -o ./src/taiga-api.ts

TypeScript example

Use the generated types with your HTTP client:

taiga.ts
import type { paths } from "./taiga-api";

type EncounterList =
  paths["/api/encounters/v4"]["get"]["responses"]["200"]["content"]["application/json"];

Full client example

client.ts
const res = await fetch(
  "https://api.taigabilling.com/api/encounters/v4?limit=10",
  {
    method: "GET",
    headers: {
      Authorization: `Bearer ${process.env.TAIGA_API_KEY}`,
    },
  }
);

const encounters = await res.json();

Pass your API key to your generated client's auth configuration as a Bearer token.

When to regenerate

New API version. Taiga publishes a new API version.

New endpoint. You start using a new endpoint.

CI signal. Your build detects an OpenAPI change.

Keep generated code separate.

Keep generated client code in its own folder, separate from handwritten integration code. That makes spec updates easier to review.

On this page