Skip to main content
@gatelit/sdk is a zero-dependency TypeScript client that works in Node.js, Deno, Bun, and the browser.

Installation

Create a client

getToken is called before every request. For browser apps, fetch a short-lived token from your backend:

Models

Models are specified as provider/model-id:

Explore the SDK

Chat

Non-streaming requests with full response and usage

Streaming

Token-by-token streaming with async iteration

JSON output

Type-safe structured output with schema enforcement

Conversations

Multi-turn chat with automatic message history management