TypeScript SDKGuides
Guides
Task-oriented walkthroughs for common SDK integration patterns.
The API reference tells you what each method returns. These guides tell you how to use them together for the things real apps actually do.
Streaming
Token-by-token output, partial tool calls, reasoning channels, cancellation.
Error handling
Branch on BastionError subclasses, retry safely, surface useful messages.
Environments
Node, Bun, Deno, edge runtimes, and browsers — what works where.
Custom fetch
Timeouts, proxies, tracing, request mocking via the fetch override.