Client / JavaScript
JavaScript SDK
Tiny typed wrapper around the REST API. Works in Node, browsers, and edge runtimes.
Install
# Once published: npm install @skrillavision/sdk # For now, copy src/sdk/index.ts into your project.
Connect
import { createSkrillaClient } from "@skrillavision/sdk";
const client = createSkrillaClient({
baseUrl: "https://your-app.lovable.app",
apiKey: process.env.SKRILLAVISION_KEY, // optional today
});List deals
const { deals } = await client.deals.list({
category: "Compute Units",
limit: 10,
});
for (const d of deals) {
console.log(d.title, d.price);
}Fetch one
const { deal } = await client.deals.get("neural-core-v4");
if (!deal) throw new Error("delisted");Health probe
const status = await client.health();
// { status: "ok", version: "0.1.0" }