Skip to main content
S2 provides SDKs across several languages to simplify working with our core APIs. While the REST API can be used directly from any HTTP client, the SDKs provide higher-level abstractions (like the Producer API), retry and error handling logic, rich types, and more performant streaming sessions.

SDKs

Each repository also contains a variety of examples to demonstrate some common use cases.

Getting Started

Every SDK follows the same pattern: create a client with an access token, then navigate to basins and streams hierarchically.
import { S2 } from "@s2-dev/streamstore";

const client = new S2({
	accessToken: process.env.S2_ACCESS_TOKEN!,
});

const basin = client.basin("my-basin");
const stream = basin.stream("my-stream");
From here, operations fall into two categories: basin and stream operations for managing resources, and appending and reading for working with records. See endpoints and retries + timeouts for configuration details.