Skip to main content
By default, SDKs connect to the cloud instance at s2.dev, and only require an access token to get started, which can be generated from the dashboard. SDKs can also connect to any S2-compatible endpoint, such as s2-lite for local development:
const client = new S2({
	accessToken: "local-token",
	endpoints: {
		account: "http://localhost:8080",
		basin: "http://localhost:8080",
	},
});

Environment Variables

SDKs can read some common configuration keys from environment variables:
VariableDescription
S2_ACCOUNT_ENDPOINTAccount-level API endpoint
S2_BASIN_ENDPOINTBasin-level API endpoint (may include {basin} placeholder for DNS-based routing)