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.
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.jsonCompatible generators
openapi-typescript
OpenAPI Generator
Stainless
Fern
Speakeasy
Your generator
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.tsTypeScript example
Use the generated types with your HTTP client:
import type { paths } from "./taiga-api";
type EncounterList =
paths["/api/encounters/v4"]["get"]["responses"]["200"]["content"]["application/json"];Full client example
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.