Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.runtools.ai/llms.txt

Use this file to discover all available pages before exploring further.

Requirements

  • Node.js 20+ or Bun 1.0+
  • TypeScript 5+
  • An API key from the dashboard or runtools auth keys create
@runtools/sdk is not available on the public npm registry yet.

Local Workspace Install

From a sibling project inside this multi-repo workspace:
package.json
{
  "dependencies": {
    "@runtools/sdk": "file:../runtools-sdk"
  }
}
Then install:
npm install
Build the SDK when you change it:
cd ../runtools-sdk
npm install
npm run build

Configure Auth

.env
RUNTOOLS_API_KEY=rt_live_xxx
import { RunTools } from '@runtools/sdk';

export const rt = new RunTools({
  apiKey: process.env.RUNTOOLS_API_KEY,
});

Options

const rt = new RunTools({
  apiKey: process.env.RUNTOOLS_API_KEY,
  apiUrl: 'https://api.runtools.ai',
  authUrl: 'https://auth.runtools.ai',
  toolsUrl: 'https://tools.runtools.ai',
  convexUrl: process.env.RUNTOOLS_CONVEX_URL,
});

Verify

const page = await rt.sandbox.listPage({ limit: 5 });
console.log(page.data.length, page.hasMore);

Framework Example

app/api/sandboxes/route.ts
import { RunTools } from '@runtools/sdk';

const rt = new RunTools({ apiKey: process.env.RUNTOOLS_API_KEY });

export async function POST() {
  const sandbox = await rt.sandbox.create({ template: 'base-ubuntu' });
  return Response.json({ id: sandbox.id });
}
Keep API keys in server-side code only.