Skip to main content
The official OpenAI JavaScript and TypeScript SDK works with Yelu by changing the API key and base URL. Use it in trusted server-side runtimes, not client-side browser bundles.

Install

Configure the client

Chat Completions

Responses

Stream output

Handle errors

The SDK can be imported in browser tooling, but a Yelu key must not be shipped to users. Call Yelu from your authenticated backend.
See the Streaming example, Function calling guide, and Errors for complete integration patterns.
Last modified on July 13, 2026