Osaurus SDK for Node.js and Electron.
npm install @osaurus/sdk
# or
pnpm add @osaurus/sdk
# or
yarn add @osaurus/sdk
# or
bun add @osaurus/sdkimport { discover } from "@osaurus/sdk";
const instance = await discover();
console.log("Osaurus running at:", instance.url);See examples folder for complete examples:
- Basic - Basic usage of the SDK.
- With OpenAI - Using the SDK with OpenAI.
- Streaming - Using the SDK with streaming.
- Electron - Using the SDK with Electron.
cd examples
bun install
bun run basicdiscover(): Promise<OsaurusInstance>
Discovers the latest running Osaurus instance.
Returns:
instanceId: Unique instance identifierurl: Base URL for API callsport: Port numberaddress: IP addressexposeToNetwork: Whether exposed to LANupdatedAt: Last update timestamp
Throws if no running instance found.
MIT