> ## Documentation Index
> Fetch the complete documentation index at: https://docs.styne.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> The Styne API is a JSON HTTP API for creating sandboxes, running commands in them and managing files, snapshots and usage.

## Base URL

All calls go to `https://api.styne.ai`.

## Authentication

Send your API key in the `Authorization: Bearer` header of every request. Create keys on the dashboard; see [API keys](https://docs.styne.ai/authentication.md).

## Search, fetch and crawl

| Method | Path | What it does | Page |
| - | - | - | - |
| `POST` | `/v1/search` | Ranked web results for a query | [Search](https://docs.styne.ai/search.md) |
| `POST` | `/v1/fetch` | The text of up to 100 URLs | [Fetch](https://docs.styne.ai/fetch.md) |
| `POST` | `/v1/crawl` | Start a crawl job | [Crawl](https://docs.styne.ai/crawl.md) |
| `GET` | `/v1/crawl/{id}` | Read a crawl job and its pages | [Crawl](https://docs.styne.ai/crawl.md) |
| `DELETE` | `/v1/crawl/{id}` | Cancel a crawl job | [Crawl](https://docs.styne.ai/crawl.md) |
| `POST` | `/compat/tavily/search` | Search in the Tavily format | [Drop-in](https://docs.styne.ai/tavily-google-drop-in.md) |
| `GET` | `/compat/customsearch/v1` | Search in the Google Custom Search format | [Drop-in](https://docs.styne.ai/tavily-google-drop-in.md) |

## Request ids

Every response carries an `x-request-id` header. Quote it when you write to support.

## Errors

A failed call answers a JSON body with `code`, `error_code`, `message`, `origin` and `request_id`. Branch on `error_code`; see [Errors](https://docs.styne.ai/errors.md).

> [card] [Quickstart](https://docs.styne.ai/quickstart.md)
>
> Create a sandbox, run a command and kill it in about two minutes.

> [card] [SDKs](https://docs.styne.ai/sdks.md)
>
> Use the E2B SDKs or the CLI with Styne.

## All endpoints

Base URL: `https://api.styne.ai`. Every request carries `Authorization: Bearer <key>`; every response carries `x-request-id`. This page is generated from [`spec/run-api.json`](https://docs.styne.ai/openapi.json), the same file the per-page operation tables come from.

### Sandboxes

| Method | Path | What it does | Page |
| - | - | - | - |
| `POST` | `/sandboxes` | Create a sandbox from a template | [Quickstart](https://docs.styne.ai/quickstart.md) |
| `GET` | `/sandboxes/{id}` | Read one sandbox | [Quickstart](https://docs.styne.ai/quickstart.md) |
| `GET` | `/sandboxes` | List the account's sandboxes | [Quickstart](https://docs.styne.ai/quickstart.md) |
| `DELETE` | `/sandboxes/{id}` | Kill a sandbox | [Quickstart](https://docs.styne.ai/quickstart.md) |
| `POST` | `/sandboxes/{id}/exec` | Run a command and stream its output | [Run commands](https://docs.styne.ai/exec.md) |
| `POST` | `/sandboxes/{id}/commands` | Run a command to its exit, or start it detached | [Run commands](https://docs.styne.ai/exec.md) |
| `GET` | `/sandboxes/{id}/commands/{pid}` | Read a command's status by pid | [Run commands](https://docs.styne.ai/exec.md) |
| `GET` | `/sandboxes/{id}/commands/{pid}/stream` | Replay and follow a command's output | [Run commands](https://docs.styne.ai/exec.md) |
| `DELETE` | `/sandboxes/{id}/commands/{pid}` | Signal a running command | [Run commands](https://docs.styne.ai/exec.md) |
| `POST` | `/sandboxes/{id}/commands/{pid}/input` | Write text to a running command's stdin, and close it with eof | [Run commands](https://docs.styne.ai/exec.md) |
| `GET` | `/sandboxes/{id}/command-history` | List the sandbox's commands, newest first | [Run commands](https://docs.styne.ai/exec.md) |
| `GET` | `/sandboxes/{id}/command-history/{cid}` | Read one command of the history | [Run commands](https://docs.styne.ai/exec.md) |
| `GET` | `/sandboxes/{id}/command-history/{cid}/logs` | Read a command's stdout and stderr, also after it ended | [Run commands](https://docs.styne.ai/exec.md) |
| `POST` | `/sandboxes/{id}/code` | Run code in a kernel context; answers its output, results and error | [Run commands](https://docs.styne.ai/exec.md) |
| `GET` | `/sandboxes/{id}/files` | Read a file: the bytes of the file at the path query | [Files](https://docs.styne.ai/files.md) |
| `PUT` | `/sandboxes/{id}/files` | Write a file: the request body is the content; folders on the way are created | [Files](https://docs.styne.ai/files.md) |
| `DELETE` | `/sandboxes/{id}/files` | Delete a file or folder; answers 204 | [Files](https://docs.styne.ai/files.md) |
| `GET` | `/sandboxes/{id}/files/list` | List a directory | [Files](https://docs.styne.ai/files.md) |
| `POST` | `/sandboxes/{id}/files/search` | Find files by name under a path | [Files](https://docs.styne.ai/files.md) |
| `POST` | `/sandboxes/{id}/files/find` | Find text in the files under a path | [Files](https://docs.styne.ai/files.md) |
| `POST` | `/sandboxes/{id}/files/replace` | Replace text across files | [Files](https://docs.styne.ai/files.md) |
| `POST` | `/sandboxes/{id}/files/permissions` | Set mode, owner and group of a path | [Files](https://docs.styne.ai/files.md) |
| `POST` | `/sandboxes/{id}/files/signed-url` | Make a short-lived upload or download URL for one file | [Files](https://docs.styne.ai/files.md) |
| `POST` | `/sandboxes/{id}/fork` | Fork a running sandbox into copies | [Fork](https://docs.styne.ai/fork.md) |
| `POST` | `/sandboxes/{id}/snapshots` | Save a sandbox as a named snapshot | [Snapshots](https://docs.styne.ai/snapshots.md) |
| `GET` | `/sandboxes/{id}/snapshots` | List the snapshots taken of one sandbox | [Snapshots](https://docs.styne.ai/snapshots.md) |
| `GET` | `/sandboxes/{id}/logs` | Read the output of a sandbox's commands | [Logs and metrics](https://docs.styne.ai/observability.md) |
| `GET` | `/sandboxes/{id}/metrics` | Read a sandbox's CPU, memory and disk over time | [Logs and metrics](https://docs.styne.ai/observability.md) |
| `POST` | `/sandboxes/{id}/pause` | Pause a sandbox at a tier | [Timeouts, pause and resume](https://docs.styne.ai/pause-tiers.md) |
| `POST` | `/sandboxes/{id}/resume` | Resume a paused sandbox | [Timeouts, pause and resume](https://docs.styne.ai/pause-tiers.md) |
| `POST` | `/sandboxes/{id}/connect` | Return a sandbox and resume it if it is paused | [Timeouts, pause and resume](https://docs.styne.ai/pause-tiers.md) |
| `POST` | `/sandboxes/{id}/timeout` | Set a new lifetime for a running sandbox | [Timeouts, pause and resume](https://docs.styne.ai/pause-tiers.md) |
| `POST` | `/sandboxes/{id}/refreshes` | Extend the lifetime of a running sandbox | [Timeouts, pause and resume](https://docs.styne.ai/pause-tiers.md) |
| `GET` | `/sandboxes/{id}/ports` | List the ports a sandbox exposes, with URL and public flag | [Ports and preview URLs](https://docs.styne.ai/ports.md) |
| `POST` | `/sandboxes/{id}/ports` | Expose a port, public (no token) or token-gated | [Ports and preview URLs](https://docs.styne.ai/ports.md) |
| `DELETE` | `/sandboxes/{id}/ports/{port}` | Hide an exposed port again | [Ports and preview URLs](https://docs.styne.ai/ports.md) |
| `GET` | `/sandboxes/{id}/ssh-keys` | List the SSH public keys authorized on a sandbox | [SSH and port forwarding](https://docs.styne.ai/ssh.md) |
| `POST` | `/sandboxes/{id}/ssh-keys` | Authorize an OpenSSH public key and get the host, port and user to connect to | [SSH and port forwarding](https://docs.styne.ai/ssh.md) |
| `DELETE` | `/sandboxes/{id}/ssh-keys/{keyId}` | Revoke an authorized SSH public key | [SSH and port forwarding](https://docs.styne.ai/ssh.md) |
| `POST` | `/sandboxes/{id}/prompt` | Prompt a coding agent (Claude Code, Codex) in a sandbox | [Run a coding agent in a sandbox](https://docs.styne.ai/agents.md) |
| `GET` | `/sandboxes/{id}/prompts/{promptId}` | Read the status of one prompt | [Run a coding agent in a sandbox](https://docs.styne.ai/agents.md) |
| `GET` | `/sandboxes/{id}/conversations` | List the agent conversations of a sandbox | [Run a coding agent in a sandbox](https://docs.styne.ai/agents.md) |
| `GET` | `/sandboxes/{id}/conversations/{conversationId}` | Read one agent conversation | [Run a coding agent in a sandbox](https://docs.styne.ai/agents.md) |
| `GET` | `/sandboxes/{id}/events` | Read or follow the agent events of a sandbox | [Run a coding agent in a sandbox](https://docs.styne.ai/agents.md) |
| `POST` | `/sandboxes/{id}/steer` | Steer a running agent turn with a new message | [Run a coding agent in a sandbox](https://docs.styne.ai/agents.md) |
| `POST` | `/sandboxes/{id}/interrupt` | Interrupt the running agent turns of a sandbox | [Run a coding agent in a sandbox](https://docs.styne.ai/agents.md) |
| `GET` | `/sandboxes/{id}/state` | List the keys of a sandbox's own state | [State store](https://docs.styne.ai/state.md) |
| `GET` | `/sandboxes/{id}/state/{key}` | Read a value of a sandbox's own state | [State store](https://docs.styne.ai/state.md) |
| `PUT` | `/sandboxes/{id}/state/{key}` | Write a value of a sandbox's own state | [State store](https://docs.styne.ai/state.md) |
| `DELETE` | `/sandboxes/{id}/state/{key}` | Delete a value of a sandbox's own state | [State store](https://docs.styne.ai/state.md) |
| `POST` | `/sandboxes/{id}/triggers` | Add a schedule or webhook trigger to a sandbox | [Wake triggers and schedules](https://docs.styne.ai/wake-triggers.md) |
| `GET` | `/sandboxes/{id}/triggers` | List a sandbox's triggers | [Wake triggers and schedules](https://docs.styne.ai/wake-triggers.md) |
| `GET` | `/sandboxes/{id}/triggers/{trigger}` | One trigger, with next\_fire\_at for a schedule | [Wake triggers and schedules](https://docs.styne.ai/wake-triggers.md) |
| `PATCH` | `/sandboxes/{id}/triggers/{trigger}` | Enable or disable a trigger, or change its keep-awake time | [Wake triggers and schedules](https://docs.styne.ai/wake-triggers.md) |
| `DELETE` | `/sandboxes/{id}/triggers/{trigger}` | Delete a trigger | [Wake triggers and schedules](https://docs.styne.ai/wake-triggers.md) |
| `GET` | `/sandboxes/{id}/triggers/{trigger}/events` | List a trigger's events with their delivery status | [Wake triggers and schedules](https://docs.styne.ai/wake-triggers.md) |
| `POST` | `/sandboxes/{id}/triggers/{trigger}/events/{event}/retry` | Send a dead event again | [Wake triggers and schedules](https://docs.styne.ai/wake-triggers.md) |
| `POST` | `/sandboxes/{id}/triggers/{trigger}/fire` | Fire a trigger now with the request body, for testing | [Wake triggers and schedules](https://docs.styne.ai/wake-triggers.md) |
| `POST` | `/sandboxes/{id}/checkpoints` | Save a checkpoint of a sandbox as the next step of its timeline | [Checkpoints and rewind](https://docs.styne.ai/checkpoints.md) |
| `GET` | `/sandboxes/{id}/checkpoints` | List a sandbox's checkpoints, oldest first | [Checkpoints and rewind](https://docs.styne.ai/checkpoints.md) |
| `POST` | `/sandboxes/{id}/rewind` | Go back to a checkpoint or saved snapshot; the sandbox keeps its id | [Checkpoints and rewind](https://docs.styne.ai/checkpoints.md) |

### Templates

| Method | Path | What it does | Page |
| - | - | - | - |
| `GET` | `/templates` | List the templates the key can start | [Quickstart](https://docs.styne.ai/quickstart.md) |
| `GET` | `/templates/{id}` | One template by id or alias | [Quickstart](https://docs.styne.ai/quickstart.md) |
| `GET` | `/templates/aliases/{alias}` | Resolve a template alias to its template id | [Templates](https://docs.styne.ai/guide-templates.md) |
| `DELETE` | `/templates/{id}` | Delete a saved snapshot by its template id, at the path the E2B SDK uses; answers 204 | [Templates](https://docs.styne.ai/guide-templates.md) |

### Regions

| Method | Path | What it does | Page |
| - | - | - | - |
| `GET` | `/regions` | List the regions and whether a machine there takes new VMs now | [Quickstart](https://docs.styne.ai/quickstart.md) |

### Default-templates

| Method | Path | What it does | Page |
| - | - | - | - |
| `GET` | `/default-templates` | List the templates the key can start, at the path the E2B SDK reads | [Templates](https://docs.styne.ai/guide-templates.md) |

### V2

| Method | Path | What it does | Page |
| - | - | - | - |
| `GET` | `/v2/templates` | List the templates the key can start, at the E2B v2 path | [Templates](https://docs.styne.ai/guide-templates.md) |

### Snapshots

| Method | Path | What it does | Page |
| - | - | - | - |
| `GET` | `/snapshots` | List the account's saved snapshots | [Snapshots](https://docs.styne.ai/snapshots.md) |
| `GET` | `/snapshots/{name}` | Read one saved snapshot | [Snapshots](https://docs.styne.ai/snapshots.md) |
| `DELETE` | `/snapshots/{name}` | Delete a saved snapshot | [Snapshots](https://docs.styne.ai/snapshots.md) |
| `DELETE` | `/snapshots` | Delete every saved snapshot of the account | [Snapshots](https://docs.styne.ai/snapshots.md) |
| `GET` | `/snapshots/{name}/tree` | List the files inside a saved snapshot | [Snapshots](https://docs.styne.ai/snapshots.md) |
| `GET` | `/snapshots/{name}/files` | Download one file from a saved snapshot | [Snapshots](https://docs.styne.ai/snapshots.md) |
| `GET` | `/snapshots/{name}/archive` | Download a file or folder of a saved snapshot as a tar | [Snapshots](https://docs.styne.ai/snapshots.md) |

### Volumes

| Method | Path | What it does | Page |
| - | - | - | - |
| `POST` | `/volumes` | Create a volume | [Volumes](https://docs.styne.ai/volumes.md) |
| `GET` | `/volumes` | List the account's volumes | [Volumes](https://docs.styne.ai/volumes.md) |
| `GET` | `/volumes/{id}` | Read one volume by name or id | [Volumes](https://docs.styne.ai/volumes.md) |
| `DELETE` | `/volumes/{id}` | Delete a volume | [Volumes](https://docs.styne.ai/volumes.md) |

### Usage and metrics

| Method | Path | What it does | Page |
| - | - | - | - |
| `GET` | `/v1/run/usage` | Read the plan, hours used and caps of the account | [Plans and billing](https://docs.styne.ai/billing.md) |
| `GET` | `/v1/run/balance` | Read the dollar balance of the account | [Plans and billing](https://docs.styne.ai/billing.md) |
| `POST` | `/v1/agent/signup` | Create an account and a limited key without a person; returns a claim link | [Agent sign-up](https://docs.styne.ai/agent-signup.md) |
| `GET` | `/v1/agent/claim/{token}` | Read whether a claim link is open, claimed or expired | [Agent sign-up](https://docs.styne.ai/agent-signup.md) |

### Browsers

| Method | Path | What it does | Page |
| - | - | - | - |
| `POST` | `/browsers` | Start a Chromium session | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}` | Read a browser session and its CDP endpoint | [Browsers](https://docs.styne.ai/browsers.md) |
| `POST` | `/browsers/{id}/steps` | Record a step and check that the page shows what you expect | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/steps` | List the session's steps and whether the run is verified | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/steps/{n}` | Read one step with the page's HTML and the resources it loaded | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/steps/{n}/screenshot` | The step's screenshot as a JPEG | [Browsers](https://docs.styne.ai/browsers.md) |
| `POST` | `/browsers/{id}/control` | Take control of a browser as a person; the answer carries a control\_id and a cdp\_url | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/control` | Show who holds the browser and every takeover with its holder and times | [Browsers](https://docs.styne.ai/browsers.md) |
| `DELETE` | `/browsers/{id}/control` | Return control of a browser to your client | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers` | List the account's browser sessions | [Browsers](https://docs.styne.ai/browsers.md) |
| `DELETE` | `/browsers/{id}` | Stop a browser session | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/trace` | A browser session's timeline: navigations, actions, documents, failed requests, console warnings and errors | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/network` | A browser session's requests with status, type, size and duration | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/console` | A browser session's console lines and browser log entries | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/replay` | A browser session's replay frames (its screenshots, screencast frames and a paced screencast) | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/metrics` | A browser session's CPU, memory and requests in flight over time | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/unblock` | A browser session's unblock mode and what each step of the block chain did | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/{id}/captcha` | A browser session's captcha mode and what its challenge watcher did | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/browsers/concurrency` | The account's browser concurrency: limit (null when the account has no ceiling), running, queued, and creates the limit refused in the last hour | [Browsers](https://docs.styne.ai/browsers.md) |

### Profiles

| Method | Path | What it does | Page |
| - | - | - | - |
| `POST` | `/profiles` | Create a profile for an end user | [Browser profiles](https://docs.styne.ai/profiles.md) |
| `GET` | `/profiles` | List the account's profiles, optionally of one end user | [Browser profiles](https://docs.styne.ai/profiles.md) |
| `GET` | `/profiles/{id}` | Read a profile | [Browser profiles](https://docs.styne.ai/profiles.md) |
| `DELETE` | `/profiles/{id}` | Delete a profile and its saved browser | [Browser profiles](https://docs.styne.ai/profiles.md) |
| `POST` | `/profiles/{id}/save` | Save a running browser into the profile | [Browser profiles](https://docs.styne.ai/profiles.md) |
| `POST` | `/profiles/{id}/fork` | Make a new profile that starts as a copy | [Browser profiles](https://docs.styne.ai/profiles.md) |
| `POST` | `/profiles/{id}/check` | Test that the saved login still works | [Browser profiles](https://docs.styne.ai/profiles.md) |
| `PATCH` | `/profiles/{id}` | Change a profile's label or how it signs in: vault item, start page, signed-in and signed-out pages | [Login vault](https://docs.styne.ai/vault.md) |
| `POST` | `/profiles/{id}/login` | Sign a profile in with its vault item, in the background (202) | [Login vault](https://docs.styne.ai/vault.md) |
| `POST` | `/profiles/{id}/relogin` | Sign a profile in again with its vault item (202; 200 when a run is already going) | [Login vault](https://docs.styne.ai/vault.md) |

### Signin-links

| Method | Path | What it does | Page |
| - | - | - | - |
| `POST` | `/signin-links` | Create a hosted sign-in link for an end user | [Browser profiles](https://docs.styne.ai/profiles.md) |
| `GET` | `/signin-links/{id}` | Read a sign-in link: state, profile, and whether the success check passed | [Browser profiles](https://docs.styne.ai/profiles.md) |
| `DELETE` | `/signin-links/{id}` | Cancel a sign-in link and stop its browser | [Browser profiles](https://docs.styne.ai/profiles.md) |

### Vault

| Method | Path | What it does | Page |
| - | - | - | - |
| `POST` | `/vault/items` | Store a login (username, password, TOTP secret) for one or more sites | [Login vault](https://docs.styne.ai/vault.md) |
| `GET` | `/vault/items` | List the account's vault items in this region, newest first, optionally of one profile or host | [Login vault](https://docs.styne.ai/vault.md) |
| `GET` | `/vault/items/{id}` | Read a vault item (never a secret) | [Login vault](https://docs.styne.ai/vault.md) |
| `PATCH` | `/vault/items/{id}` | Change a vault item: label, login URL, linked profiles, or a new password or TOTP secret | [Login vault](https://docs.styne.ai/vault.md) |
| `DELETE` | `/vault/items/{id}` | Delete a vault item and unlink it from its profiles | [Login vault](https://docs.styne.ai/vault.md) |
| `GET` | `/vault/audit` | List what happened to the account's vault items, newest first | [Login vault](https://docs.styne.ai/vault.md) |

### Extensions

| Method | Path | What it does | Page |
| - | - | - | - |
| `POST` | `/extensions` | Upload a Chrome extension: the zip of an unpacked extension, as a form's file part or the body | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/extensions` | List the account's extensions | [Browsers](https://docs.styne.ai/browsers.md) |
| `GET` | `/extensions/{id}` | Read an extension | [Browsers](https://docs.styne.ai/browsers.md) |
| `DELETE` | `/extensions/{id}` | Delete an extension | [Browsers](https://docs.styne.ai/browsers.md) |

### CI runners

| Method | Path | What it does | Page |
| - | - | - | - |
| `POST` | `/ci/jobs` | Queue a CI job on a runner | [CI runners](https://docs.styne.ai/ci.md) |
| `GET` | `/ci/jobs/{id}` | Read a CI job from queue to finish | [CI runners](https://docs.styne.ai/ci.md) |
| `GET` | `/ci/jobs` | List the account's CI jobs, newest first | [CI runners](https://docs.styne.ai/ci.md) |
| `GET` | `/ci/jobs/{id}/steps` | Read a CI job's steps with their timings | [CI runners](https://docs.styne.ai/ci.md) |
| `GET` | `/ci/jobs/{id}/logs` | Read a CI job's log as server-sent events | [CI runners](https://docs.styne.ai/ci.md) |
| `GET` | `/ci/queue` | Read the account's CI jobs waiting for a runner | [CI runners](https://docs.styne.ai/ci.md) |

### State

| Method | Path | What it does | Page |
| - | - | - | - |
| `GET` | `/state` | The account's state usage and ceilings | [State store](https://docs.styne.ai/state.md) |
| `GET` | `/state/{ns}` | List the keys of a state namespace | [State store](https://docs.styne.ai/state.md) |
| `DELETE` | `/state/{ns}` | Delete a state namespace | [State store](https://docs.styne.ai/state.md) |
| `GET` | `/state/{ns}/{key}` | Read a state value | [State store](https://docs.styne.ai/state.md) |
| `PUT` | `/state/{ns}/{key}` | Write a state value, optionally at a version | [State store](https://docs.styne.ai/state.md) |
| `DELETE` | `/state/{ns}/{key}` | Delete a state value | [State store](https://docs.styne.ai/state.md) |

### Names

| Method | Path | What it does | Page |
| - | - | - | - |
| `GET` | `/names` | List the account's sandbox names | [Calls between sandboxes](https://docs.styne.ai/calls.md) |

### Images

| Method | Path | What it does | Page |
| - | - | - | - |
| `GET` | `/images/{digest}` | The registered image: its references, its config and the machines that hold a ready build | [Container images](https://docs.styne.ai/images.md) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.