Developer Resources
SDKs
The official Kaiten SDKs — the Go client, the Python client, and the two @kaitencloud TypeScript packages — how each one is built, what it covers, which credential it carries, and OpenFeature for flag evaluation. Setup lives in each repository.
Three repositories hold the official SDKs: a Go client, a Python client, and a TypeScript monorepo that publishes two packages under the @kaitencloud scope — a server client and a browser client. Each repository holds its own installation and usage instructions, kept next to the code they describe. This page tells you which one to open, what it covers, and where the line between browser and server runs.
Three repositories
Go — kaitencloud/sdk-go
The typed Go client, one namespace per resource — customers, instances, Licenses, entitlements, feature flags, deployment zones — and a second client for the Platform API. The Kaiten CLI is built on it.
Python — kaitencloud/sdk-python
Typed sync and async clients for the Core API and the Platform API, published on PyPI as kaitencloud.
TypeScript / JavaScript — kaitencloud/sdk-js
The monorepo of the two @kaitencloud packages, published on npm: the server client and the browser client.
Built on the specification
The API publishes its own OpenAPI specification at /api/openapi.json, and that specification is generated from the API's code — not written by hand. Every SDK is built on that document, each in its own way, so the four do not expose one identical surface. The table states what each one is and what it reaches; it describes sdk-go v0.1.0, kaitencloud 1.0.0, @kaitencloud/client 1.1.0 and @kaitencloud/server 1.0.1.
| SDK | Runs | How it is built | What it covers |
|---|---|---|---|
sdk-go | Go, server-side | A typed layer written by hand over a client generated from the specification | The resources of the Core API — customers, instances and their usage, License families, Licenses and their grants, entitlements and their groups, feature flags, components, releases, deployment zones, metadata fields, service accounts — and the Platform API, through a separate client. Its typed layer leaves out flag evaluation and the OpenFeature manifest, connector activation and settings, and the integration records of a customer or an instance. |
kaitencloud | Python, server-side | Response models generated from the specification, methods written by hand; a sync and an async client with the same methods | The same resources, plus the OpenFeature manifest, connector activation and settings and the integration records, and the Platform API through a separate client. Verifies the signature of an outbound webhook (kaitencloud.webhooks.verify_webhook) and types its payload. Leaves flag evaluation to OpenFeature. |
@kaitencloud/server | Node, never bundled for a browser | Generated from the specification: one class per resource, one method per operation | Every operation of the Core API, and not the Platform API. Verifies the signature of an outbound webhook (verifyKaitenWebhook) and types its payload. |
@kaitencloud/client | Browser, and Node server-side | A curated layer written by hand over a generated core | What a customer-facing surface reads: the License catalog, the licensing snapshot of one customer and instance, usage — read and reported — and flag evaluation. @kaitencloud/client/testing ships a fake client and fixtures for tests. |
Webhook verification is a Kaiten Cloud concern, since managed delivery is a Kaiten Cloud capability. A React SDK, with embedded components for gating, pricing and the customer portal, is on the roadmap Coming soon.
Each server-side SDK makes a refused usage report explicit, so the 409 the API answers never reads as a success: Instances.ReportUsage returns sdk.ErrThresholdExceeded in Go, instances.report_usage raises ThresholdExceededError in Python, and @kaitencloud/server throws a KaitenError that isThresholdExceeded(error) recognises.
A first call
One read against the Kaiten Sushi Shop dataset, in each server-side SDK. The base URL keeps its /api prefix: https://app.kaiten.sh/api on Kaiten Cloud, http://localhost:6060/api on the Community Edition. The Go client, @kaitencloud/client, and the OpenFeature providers need it in the value; the Python client and @kaitencloud/server add it when it is missing. Installing each SDK is covered by its repository's README.
package main
import (
"context"
"fmt"
"log"
sdk "github.com/kaitencloud/sdk-go"
)
func main() {
client, err := sdk.NewClient("http://localhost:6060/api", sdk.WithBearerToken("ksh_xxx"))
if err != nil {
log.Fatal(err)
}
customer, err := client.Customers.Get(context.Background(), "sakura-tokyo")
if err != nil {
log.Fatal(err)
}
fmt.Println(customer.Name) // Sakura Tokyo
}from kaitencloud import KaitenClient
client = KaitenClient(base_url="http://localhost:6060/api", token="ksh_xxx")
customer = client.customers.get("sakura-tokyo")
print(customer.name) # Sakura Tokyoimport { createKaitenClient, Customers } from '@kaitencloud/server';
const client = createKaitenClient({
baseUrl: 'http://localhost:6060/api',
token: 'ksh_xxx',
});
const { data: customer } = await Customers.getCustomer({
client,
path: { customerSlug: 'sakura-tokyo' },
});
console.log(customer?.name); // Sakura TokyoCredentials
Every server-side SDK authenticates with a service-account token (ksh_…), sent as Bearer — see authentication for issuing one and scopes for what to grant it. The call above needs read:customers.
The Go and Python SDKs each carry a second client for the Platform API and its credential (ksm_…). That surface belongs to the operator of a self-hosted stack: it listens on its own port and is not reachable on Kaiten Cloud. The TypeScript packages do not model it — a token that reaches every organization has no place in an application bundle.
Browser and server: one boundary
The split between client and server is a security boundary made structural. In a browser, @kaitencloud/client never holds a secret, so it is the package a browser bundle imports; on a server, the same client may carry a ksh_ token. @kaitencloud/server carries the full contract behind a ksh_ token and never ships to a browser. In @kaitencloud/client, the transport adds a runtime check: a request that would carry a ksh_ or ksm_ credential out of a browser is refused before it leaves. That check catches a developer's mistake — it is not a security boundary in itself. A secret that has reached a browser is already public and must be revoked.
How @kaitencloud/client sends its credential is its authScheme option. It is required and has no default: a KaitenClient built without one throws.
"bearer"— the credential goes out asAuthorization: Bearer. It is aksh_…token, or a JWT from the identity provider the API's gateway trusts; both carry rights over the whole organization, so this scheme belongs on a server."none"— no credential. For an endpoint in front of Kaiten that authenticates the request itself, such as a route of your own backend."publishable"Coming soon — a publishable key (pk_…), the credential designed for the browser. The SDK carries the scheme, and no endpoint accepts it yet.
A credential scoped to one of your customers, for that customer's browser, is on the roadmap too Coming soon. Until one ships, a browser holds no Kaiten credential: your backend reads the License catalog or a customer's snapshot — with @kaitencloud/client and authScheme: "bearer", or the operations underneath with @kaitencloud/server — and hands the page plain data. The ksh_ token stays on the server.
Flag evaluation: OpenFeature
Feature flags need no Kaiten-specific client. Kaiten implements the OpenFeature Remote Evaluation Protocol (OFREP), so any OpenFeature SDK configured with the generic OFREP provider evaluates Kaiten flags — base URL plus the caller's credential. The generic providers cover each runtime: @openfeature/ofrep-web-provider in a browser, @openfeature/ofrep-provider in Node, openfeature-provider-ofrep in Python, and the ofrep provider of go-sdk-contrib in Go. Kaiten's own console evaluates its platform flags through the web provider. The OpenFeature & OFREP page covers the endpoints, the context they expect, and provider configuration in Go, Python, and JavaScript.
Plain HTTP works everywhere an SDK does. The API conventions page covers what every endpoint shares, and the quickstart runs the whole chain with curl.
Where to go next
API Conventions
What every endpoint of the Kaiten API shares — identifiers and slug rules, cursor pagination, the problem+json error envelope, field formats, and bringing your own identifiers.
Overview
Run the Community Edition on your own infrastructure — what the stack contains, what differs from Kaiten Cloud, and where each operator page sits.