Skip to navigation

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.

Download it:

curl https://api.taigabilling.com/openapi.json -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

Point your generator 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

1

New API version

Taiga publishes a new API version.

2

New endpoint

You start using a new endpoint.

3

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.