Skip to main content
Mizu Contract includes built-in SDK generators that create native, fully-typed client libraries from your contract definitions. Generate idiomatic code for each language with resource-based API access and first-class streaming support.

What is SDK Generation?

SDK generation creates client libraries from your API contract. Instead of writing HTTP client code by hand for each language, you define your API once and generate clients automatically.

Quick Start

Generate SDK clients using the CLI:

Why Use Native SDK Generators?

Benefits Over Manual Client Code

Benefits Over Generic OpenAPI-Based Generation

When to use OpenAPI generators? OpenAPI generators support 40+ languages and have mature tooling. Use them when you need languages Mizu doesn’t support natively, or when you need OpenAPI compatibility with other tools. See Client Generation for OpenAPI approaches.

Available SDK Generators

Mizu provides native SDK generators for three languages:

Go

Zero dependencies, stdlib only. Fluent resource-based API with EventStream for streaming.

Python

Modern Python with type hints. Sync and async clients using httpx.

TypeScript

Runtime agnostic (Node/Bun/Deno). AsyncIterable streaming with full type inference.

Quick Comparison

How It Works

Step 1: Define Your Contract

Create a contract definition in YAML:

Step 2: Generate SDK Clients

Step 3: Use the Generated Clients

CLI Reference

Command Syntax

Flags

Examples

Choosing the Right Approach

Use this decision matrix to choose between SDK generation and OpenAPI:

CI/CD Integration

Regenerate SDKs on contract changes:

What’s Next?

Go

Complete guide to generating and using Go SDKs

Python

Complete guide to generating and using Python SDKs

TypeScript

Complete guide to generating and using TypeScript SDKs

OpenAPI Generation

Alternative approach using OpenAPI specification

See Also