The official TypeScript/JavaScript SDK for the Lunos AI API gateway — one unified, OpenAI-compatible interface to multiple AI providers.
npm install @lunos/sdk
Or with other package managers:
pnpm add @lunos/sdk
yarn add @lunos/sdk
import Lunos from "@lunos/sdk";
const client = new Lunos({
apiKey: process.env.LUNOS_API_KEY,
});
const completion = await client.chat.completions.create({
model: "openai/gpt-4o",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(completion.choices[0].message.content);
fetchfetch)| Resource | Description |
|---|---|
| Configuration | Client options and environment variables |
| Chat Completions | Text generation and conversations |
| Streaming | Real-time token streaming |
| Error Handling | Error types and retry behavior |
No headings found on this page.
