Skip to main content

Base URL

All API requests are made to:

Authentication

All endpoints require authentication using an API key in the Authorization header:
See Authentication for details on obtaining and managing API keys.

Request Format

All POST/PUT requests must include:
  • Content-Type: application/json header
  • JSON-encoded request body

Response Format

All responses are JSON-encoded with appropriate HTTP status codes.

Success Response

Error Response

HTTP Status Codes

Rate Limits

API keys are rate-limited based on your plan:
  • Free: 100 requests/minute
  • Paid: 1,000 requests/minute
  • Enterprise: Custom limits
Rate limit information is included in response headers:
When you exceed the rate limit, you’ll receive a 429 response with a Retry-After header indicating when you can retry.

Pagination

List endpoints support pagination using query parameters:
Paginated responses include metadata:

Idempotency

POST requests that create resources support idempotency keys to safely retry requests:
If you retry a request with the same idempotency key within 24 hours, you’ll receive the same response as the original request.

Timeouts

All API requests have a maximum timeout:
  • Session operations: 10 seconds
  • File operations: 30 seconds
  • Code execution: 30 seconds (default), up to 5 minutes (configurable)
If an operation exceeds the timeout, you’ll receive a 408 Request Timeout response.

Webhooks

buntime.sh can send webhooks for long-running operations:
  • Execution completed
  • Session expired
  • Resource limit exceeded
Configure webhooks in your dashboard.

API Endpoints

Sessions

Manage isolated execution environments:

Create Session

Create a new session

Get Session Info

Retrieve session details

Delete Session

Delete a session

Execution

Run code in sessions:

Execute Code

Run code or commands

Kill Process

Stop running processes

Files

Manage files in sessions:

Write File

Create or update files

Read File

Read file contents

List Files

List all files

Preview

Access web applications:

Web Preview

Access running web apps

SDKs

We provide official SDKs to make integration easier:

TypeScript/JavaScript

Type-safe Node.js and Bun client

Examples

Quick Start

Multi-file Project

Need Help?

Join Discord

Get help from the community

View Examples

Browse code examples

Report Issues

Report bugs or issues

Email Support

Contact our support team