One file, zero dependencies. Chat, streaming, the model catalog and account auth — the same library that powers this dashboard.
curl -O https://ai.aunuhost.bond/sdk/aucore.js
# or with npm-style tooling, just import the file directly
import { AunuCore } from "./aucore.js";
const ai = new AunuCore({ apiKey: process.env.AUCORE_KEY });
// one-shot chat — returns the assistant text
const reply = await ai.chat("Explain vector databases in one line");
console.log(reply);
// full OpenAI-compatible control
const out = await ai.completions({
model: "gpt-oss-120b",
messages: [{ role: "user", content: "Hello" }],
temperature: 0.4,
});
// token-by-token streaming
for await (const chunk of ai.stream("Write a haiku about latency")) {
process.stdout.write(chunk);
}
// catalog
const models = await ai.modelIds();
`ai.chat()`, `ai.completions()`, `ai.stream()` — with automatic retry on 429/5xx and 120s timeout.
`ai.models()`, `ai.modelIds()` — live model list with context, modalities and plan availability.
`ai.login()`, `ai.register()`, `ai.me()` — dashboard sessions work as API credentials.
`AunuCoreError` carries `status`, `type` and the raw error body — clean handling everywhere.