MASAKA / SDK & API / Server SDK
SDK & API

Trusted server
integration.

The Node client exposes MasakaBrowser and the compatible JetBrowser name over the same project API.

Bounded example

Node.js
import { MasakaBrowser } from './sdk/client.mjs';

const browser = new MasakaBrowser({
  apiKey: process.env.MASAKA_API_KEY
});
const session = await browser.create({
  url: 'https://duckduckgo.com/',
  region: 'overseas',
  maxSeconds: 300
});
try {
  await browser.waitForReady(session.id);
  await browser.control(session.id, 'agent');
  const view = await browser.snapshot(session.id);
  console.log(view.tabs, view.active_tab);
  const opened = await browser.newTab(session.id);
  await browser.switchTab(session.id, opened.active_tab);
} finally {
  await browser.stop(session.id);
}

Retry policy

Safe reads may retry with backoff. A mutation is sent once. If its poll times out, the SDK returns the command ID and marks the outcome uncertain so callers inspect rather than replay.

Tabs

List tabs before using a handle. The SDK maps tabs, tab_switch, tab_new, and tab_close to the command queue and returns the updated real tab state.