SDK

Capture SDK

The LookLoot Capture SDK lets partner desktop apps initialize LookLoot capture with a short app-side setup and a backend token route.

The public app integration has three moving parts:

  1. Install @lookloot/capture-sdk.
  2. Add a backend route that mints LookLoot device tokens for signed-in users and registered app IDs.
  3. Initialize LookLootCapture in your desktop app and listen for coarse state updates.

The SDK is ESM-only, targets Node.js 22 or newer, and is intended for an Electron main process. electron is a required peer dependency because the host app provides it. Windows input/audio helpers and the FFmpeg fallback are bundled by the SDK package. Windows game capture also requires bundling the OBS Studio portable runtime into your Electron app at resources/obs.

import { LookLootCapture } from "@lookloot/capture-sdk";

const capture = new LookLootCapture({
  appId: "your-registered-app-slug",
  appVersion: "1.0.0",
  obsPath: process.env.LOOKLOOT_OBS_PATH,
  getDeviceToken: async ({ appId, appVersion, deviceName }) => {
    const res = await fetch("https://your-api.example.com/api/lookloot/device-token", {
      method: "POST",
      headers: { "content-type": "application/json" },
      body: JSON.stringify({ appId, appVersion, deviceName }),
    });
    const data = await res.json();
    return data.token;
  },
});

await capture.init();

After init() succeeds, the SDK records automatically whenever it detects a game and finalizes when that game exits or the host Electron app quits.

Continue with the Quickstart for a complete setup.