> ## 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.

# Installation

> Install the Runtools SDK

## Requirements

* Node.js 20+ or Bun 1.0+
* TypeScript 5+
* An API key from the dashboard or `runtools auth keys create`

## Install

```bash theme={null}
npm install @runtools-ai/sdk
```

## Configure Auth

```bash .env theme={null}
RUNTOOLS_API_KEY=rt_live_xxx
```

```typescript theme={null}
import { RunTools } from '@runtools-ai/sdk';

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

## Options

```typescript theme={null}
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',
});
```

## Verify

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

## Framework Example

```typescript app/api/sandboxes/route.ts theme={null}
import { RunTools } from '@runtools-ai/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.
