Skip to main content

Base URL

All API requests should be made to:
https://api.runtools.ai/v1

Authentication

Authenticate using your API key in the Authorization: Bearer header:
curl https://api.runtools.ai/v1/sandboxes \
  -H "Authorization: Bearer rt_live_xxx"
The legacy X-API-Key header is also supported for backward compatibility.

Get Your API Key

Create an API key in the dashboard

Request Format

  • Content-Type: application/json
  • Accept: application/json
curl -X POST https://api.runtools.ai/v1/sandboxes \
  -H "X-API-Key: rt_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"template": "nodejs-20"}'

Response Format

All responses are JSON with this structure:
{
  "data": { ... },        // Response data
  "meta": {               // Optional metadata
    "requestId": "req_xxx"
  }
}

Error Responses

{
  "error": {
    "code": "not_found",
    "message": "Sandbox not found",
    "requestId": "req_xxx"
  }
}

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Rate Limited
500Internal Error

Rate Limits

TierRequests/Minute
Free60
Pro300
Team1,000
EnterpriseCustom
Rate limit headers are included in responses:
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 299
X-RateLimit-Reset: 1609459200

Pagination

List endpoints support pagination:
GET /v1/sandboxes?limit=10&cursor=xxx
Response includes pagination info:
{
  "data": [...],
  "meta": {
    "hasMore": true,
    "nextCursor": "yyy"
  }
}

WebSocket Endpoints

Some endpoints use WebSocket for real-time data:
wss://api.runtools.ai/v1/sandboxes/:id/logs
wss://api.runtools.ai/v1/run/:apiSlug/stream/:runId

API Sections

Sandboxes

Create, manage, and execute in sandboxes

Agents

Create and run AI agents

AIP

Sessions, context blocks, search, invoke

Tools

Manage and execute tools

Templates

Create custom environments

Code Execution

Run code in ephemeral sandboxes

SDKs

We recommend using our SDK instead of raw API calls:
import { RunTools } from '@runtools/sdk';

const rt = new RunTools({ apiKey: 'rt_live_xxx' });
const sandbox = await rt.sandboxes.create({ template: 'nodejs-20' });