Loading the kernel surface…
Loading the kernel surface…
Drop-in OpenAI compatibility that adds routing intelligence, enforceable governance, and deterministic prepaid spend control to every request.
A single base URL for chat and embeddings, with routing and spend controls built in.
Use https://api.onwinds.com/v1 for chat completions and embeddings.
SSE streaming for transparent generation and predictable UX.
Reserve budget before execution and finalize on completion.
Stable request IDs and structured errors for debugging.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ONWINDS_API_KEY,
baseURL: "https://api.onwinds.com/v1",
defaultHeaders: {
"x-onwinds-region-required": "eu",
"x-onwinds-retention-mode": "zdr",
},
});
await client.chat.completions.create({
model: "onwinds/auto",
stream: true,
max_tokens: 800,
messages: [{ role: "user", content: "Summarize the meeting notes." }],
});Create logical models, allowlist providers, and keep workspace + API aligned.