Skip to main content
Install the official SDK.
Set baseURL to the SnapGen OpenAI-compatible endpoint.
To stream, pass stream: true and use for await to read each chunk.

Use Responses

Inside main, the same client supports Responses:
See Chat Completions and Responses for request options, streaming, and tools.