ReferenceBeta

SDK reference

The smallest successful omnious-sdk integration, with advanced surfaces linked only when you need them.

Owner
Developer Experience
Version
api-2026.07
Verified
2026-07-13

omnious-sdk has one core path: construct a client and call ask. The Interactive API Console runs a real request first, then generates SDK code from your exact prompt and settings.

playground firstIf you are integrating for the first time, use the console instead of reading this page top to bottom. Return here only when you need an advanced lifecycle such as tools, sessions, or direct x402.
not yet on npmThe package is not published to the npm registry yet, so npm install omnious-sdk currently fails with a 404. Until it ships, build the tarball from the repository — it is self-contained (the router client modules are bundled in) and the import name below works unchanged once the package is published. The publish gate verifies the runtime bundle, declaration import closure, and exact harness/tool-policy version parity before a tarball can be released.
install from the repository (until the npm release)omnious-sdk
# omnious-sdk is not on npm yet — build and install it from the repository
git clone https://github.com/LJ-XRPL/Ai-economics
cd Ai-economics/sdk && bun install && bun run build
npm pack   # emits omnious-sdk-0.1.0.tgz — install that tarball in your app
the complete first integrationomnious-sdk
import { OmniousClient } from "omnious-sdk";

const omnious = new OmniousClient({
  routerUrl: "https://api.omnious.xyz",
  creditKey: process.env.OMNIOUS_CREDIT_KEY,
});

const result = await omnious.ask("Explain model auctions simply.", {
  model: "auto",
  onDelta: (text) => process.stdout.write(text),
});

Choose only the layer you need

NeedSDK surfaceRead next
One prompt or streamask, streamInference
Local tool executionask with tools and executorsAgent sessions
Local desktop executionCuaDriverAdapter plus computerComputer use
One funded multi-turn loopsessionOperations
Crash-safe long-running workrunTask, task, followDurable tasks
Market and receipt readsmodels, receipt, analytics methodsMarket data
No unified API balancewalletKey or signerDirect x402

Defaults that remove boilerplate

  • model: "auto" lets the live market choose.
  • creditKey makes each ask one HTTP request.
  • onDelta is the only callback needed for streaming.
  • Tool rounds, retries, payment envelopes, and stream parsing stay inside the SDK.
not in the mainnet launchEmbeddings, Context Passports, and speculative auctions are feature-gated for V1 mainnet. Image generation is live and its detailed contract lives in Wire formats, away from the core SDK learning path.
errorsEverything non-2xx throws OmniousError. The common codes are spend_cap, feature_gated, and provider_failed; none should trigger a second payment.

The full method inventory remains in sdk/README.md for generated clients and maintainers. The docs path stays focused on the smallest successful integration.