Service 06

Python + TypeScript SDKs

One API. Two SDKs. Auto-generated from OpenAPI, contract-tested in CI, semver-stable. Cloud, VPC, or fully on-prem — same SDK, change one env var.


The problem

Custom SDKs drift from the API. Language-specific quirks compound.

Custom-built SDKs drift from the API. The Python SDK adds parameters before the TS SDK; the TS SDK swallows errors the Python SDK propagates; one language ships an async surface while the other stays sync. Multi-language teams hit cross-SDK bugs constantly, and there's no automated check that catches drift before release.

For agentic apps where the SDK is the integration point with the cognitive platform, SDK quality is product quality. A flaky SDK = a flaky agentic experience.


How it works

OpenAPI-generated SDKs, contract-tested, semver-stable across languages.

Cerebe's SDKs are auto-generated from the OpenAPI spec. Python and TypeScript share the same API surface — same method names, same parameter shapes, same return types. Contract tests in CI run all examples in both languages against the staging API on every release; drift fails the build.

Both SDKs are async-first (with sync variants where ergonomic), typed end-to-end (Pydantic on Python, Zod on TS), and semver-stable. Cloud, VPC, on-prem — change CEREBE_API_URL and the SDK targets the new endpoint; no code changes required for the deployment shape.

  • Python + TypeScript SDKs auto-generated from the same OpenAPI spec
  • Contract tests in CI: every release runs all examples in both languages against staging API
  • Semver-stable: breaking changes go through deprecation warnings + major version bumps
  • Type-safe: typed responses + pydantic / Zod schema validation by default
  • Async-first: both SDKs offer async variants for the agentic critical path
  • Cloud, VPC, on-prem — change CEREBE_API_URL env var; everything else stays the same
@cerebe/sdk + cerebe (python) typescript
# Python — pip install cerebe
from cerebe import Cerebe

cb = Cerebe(api_key=...)              # or BYOK on Enterprise
res = await cb.llm.complete_async(
    prompt="...", route="capability:reasoning-fast",
    session="sess_123",
)

# TypeScript — npm install @cerebe/sdk
import { Cerebe } from "@cerebe/sdk";

const cb = new Cerebe({ apiKey: process.env.CEREBE_API_KEY });
const res = await cb.llm.complete({
  prompt: "...",
  route: "capability:reasoning-fast",
  session: "sess_123",
});

// Both SDKs are auto-generated from the same OpenAPI spec
// → identical API surface across languages
// → contract-tested: every release runs all examples in both languages
// → backward-compatible: semver, deprecation warnings before removal

# On-prem / VPC deployment — change one env var, no code changes:
# CEREBE_API_URL=https://cerebe.your-vpc.example.com

Pricing relevance

SDKs are free + OSS. API usage is metered on cerebe.ai per plan. Enterprise tier supports BYOK (your vendor keys, no markup) and VPC / on-prem deployments with the same SDK.

Open-source posture

Both SDKs are OSS (Apache-2.0) on cerebe.ai's repo. OpenAPI spec is OSS-published. Generators (openapi-generator + custom post-processing) are OSS. Server runtime + multi-tenant infrastructure are hosted-only.

Get Started

The SDK doesn't drift. The API doesn't surprise.

OpenAPI-generated. Contract-tested. Semver-stable. Async-first. Cloud, VPC, or on-prem with one env var. Install pip install cerebe or npm install @cerebe/sdk. Full reference at cerebe.ai.