# carton > Create sandboxes and run commands through one CLI and HTTP API. ## Documentation - [Get started with carton](https://carton.sh/docs): Install carton, connect a sandbox provider, then use the CLI or SDK to run your code. - [Install carton](https://carton.sh/docs/installation): Install carton on macOS or Linux with the installer, Homebrew, or your preferred package manager. - [Connect your provider](https://carton.sh/docs/configuration): Choose where your sandboxes run and configure the connection before using the CLI. - [Your first sandbox](https://carton.sh/docs/quickstart): Create a sandbox, run a command, and remove it with the carton CLI. - [TypeScript SDK](https://carton.sh/docs/sdk): Preview the programmatic sandbox lifecycle planned for the carton SDK. - [Choose a provider](https://carton.sh/docs/providers): Run sandboxes at a hosted provider or on your own machine. - [Configuration concepts](https://carton.sh/docs/concepts): Understand the few configuration terms used in the provider and CLI guides. ### API - [Carton API reference](https://carton.sh/docs/api): Use the HTTP API to create sandboxes, execute commands, and transfer files. These pages are generated from Carton's Rust-authored public OpenAPI contract. #### Sandboxes - [POST /v1/resolve](https://carton.sh/docs/api/sandboxes/resolve-placement): Reference for the POST /v1/resolve endpoint in the Carton API reference. - [GET /v1/sandboxes](https://carton.sh/docs/api/sandboxes/list-sandboxes): Reference for the GET /v1/sandboxes endpoint in the Carton API reference. - [POST /v1/sandboxes](https://carton.sh/docs/api/sandboxes/create-sandbox): Reference for the POST /v1/sandboxes endpoint in the Carton API reference. - [DELETE /v1/sandboxes/{id}](https://carton.sh/docs/api/sandboxes/destroy-sandbox): Reference for the DELETE /v1/sandboxes/{id} endpoint in the Carton API reference. - [GET /v1/sandboxes/{id}](https://carton.sh/docs/api/sandboxes/get-sandbox): Reference for the GET /v1/sandboxes/{id} endpoint in the Carton API reference. - [POST /v1/sandboxes/{id}/deadline](https://carton.sh/docs/api/sandboxes/set-deadline): Reference for the POST /v1/sandboxes/{id}/deadline endpoint in the Carton API reference. - [GET /v1/sandboxes/{id}/events](https://carton.sh/docs/api/sandboxes/get-sandbox-events): Reference for the GET /v1/sandboxes/{id}/events endpoint in the Carton API reference. - [PATCH /v1/sandboxes/{id}/labels](https://carton.sh/docs/api/sandboxes/set-labels): Reference for the PATCH /v1/sandboxes/{id}/labels endpoint in the Carton API reference. #### Executions - [POST /v1/sandboxes/{id}/executions](https://carton.sh/docs/api/executions/start-execution): Reference for the POST /v1/sandboxes/{id}/executions endpoint in the Carton API reference. - [GET /v1/sandboxes/{id}/executions/{execution_id}](https://carton.sh/docs/api/executions/get-execution): Reference for the GET /v1/sandboxes/{id}/executions/{execution_id} endpoint in the Carton API reference. - [POST /v1/sandboxes/{id}/executions/{execution_id}/signals](https://carton.sh/docs/api/executions/signal-execution): Reference for the POST /v1/sandboxes/{id}/executions/{execution_id}/signals endpoint in the Carton API reference. - [POST /v1/sandboxes/{id}/executions/{execution_id}/stdin](https://carton.sh/docs/api/executions/write-execution-stdin): Reference for the POST /v1/sandboxes/{id}/executions/{execution_id}/stdin endpoint in the Carton API reference. #### Files - [DELETE /v1/sandboxes/{id}/files](https://carton.sh/docs/api/files/delete-file): Reference for the DELETE /v1/sandboxes/{id}/files endpoint in the Carton API reference. - [GET /v1/sandboxes/{id}/files](https://carton.sh/docs/api/files/read-file): Reference for the GET /v1/sandboxes/{id}/files endpoint in the Carton API reference. - [HEAD /v1/sandboxes/{id}/files](https://carton.sh/docs/api/files/stat-file): Reference for the HEAD /v1/sandboxes/{id}/files endpoint in the Carton API reference. - [PUT /v1/sandboxes/{id}/files](https://carton.sh/docs/api/files/write-file): Reference for the PUT /v1/sandboxes/{id}/files endpoint in the Carton API reference. - [GET /v1/sandboxes/{id}/files/archive](https://carton.sh/docs/api/files/read-archive): Reference for the GET /v1/sandboxes/{id}/files/archive endpoint in the Carton API reference. - [PUT /v1/sandboxes/{id}/files/archive](https://carton.sh/docs/api/files/write-archive): Reference for the PUT /v1/sandboxes/{id}/files/archive endpoint in the Carton API reference. - [GET /v1/sandboxes/{id}/files/list](https://carton.sh/docs/api/files/list-files): Reference for the GET /v1/sandboxes/{id}/files/list endpoint in the Carton API reference. #### Ports - [GET /v1/sandboxes/{id}/ports](https://carton.sh/docs/api/ports/list-ports): Reference for the GET /v1/sandboxes/{id}/ports endpoint in the Carton API reference. - [POST /v1/sandboxes/{id}/ports](https://carton.sh/docs/api/ports/expose-port): Reference for the POST /v1/sandboxes/{id}/ports endpoint in the Carton API reference. #### Environments - [HEAD /v1/blobs/{digest}](https://carton.sh/docs/api/environments/stat-blob): Reference for the HEAD /v1/blobs/{digest} endpoint in the Carton API reference. - [PUT /v1/blobs/{digest}](https://carton.sh/docs/api/environments/upload-blob): Reference for the PUT /v1/blobs/{digest} endpoint in the Carton API reference. - [GET /v1/environments](https://carton.sh/docs/api/environments/list-environments): Reference for the GET /v1/environments endpoint in the Carton API reference. - [POST /v1/environments](https://carton.sh/docs/api/environments/create-environment): Reference for the POST /v1/environments endpoint in the Carton API reference. - [GET /v1/environments/{environment_id}](https://carton.sh/docs/api/environments/get-environment): Reference for the GET /v1/environments/{environment_id} endpoint in the Carton API reference. - [GET /v1/environments/{environment_id}/revisions](https://carton.sh/docs/api/environments/list-revisions): Reference for the GET /v1/environments/{environment_id}/revisions endpoint in the Carton API reference. - [POST /v1/environments/{environment_id}/revisions](https://carton.sh/docs/api/environments/create-revision): Reference for the POST /v1/environments/{environment_id}/revisions endpoint in the Carton API reference. - [GET /v1/preparations/{prepare_id}](https://carton.sh/docs/api/environments/get-preparation): Reference for the GET /v1/preparations/{prepare_id} endpoint in the Carton API reference. - [GET /v1/revisions/{revision_id}](https://carton.sh/docs/api/environments/get-revision): Reference for the GET /v1/revisions/{revision_id} endpoint in the Carton API reference. - [POST /v1/revisions/{revision_id}/prepare](https://carton.sh/docs/api/environments/prepare-revision): Reference for the POST /v1/revisions/{revision_id}/prepare endpoint in the Carton API reference. #### Targets - [GET /v1/targets](https://carton.sh/docs/api/targets/list-targets): Reference for the GET /v1/targets endpoint in the Carton API reference. - [GET /v1/targets/{target}](https://carton.sh/docs/api/targets/get-target): Reference for the GET /v1/targets/{target} endpoint in the Carton API reference. #### Contract - [GET /openapi.json](https://carton.sh/docs/api/contract/get-open-api): Reference for the GET /openapi.json endpoint in the Carton API reference. #### Planned - [GET /v1/limits](https://carton.sh/docs/api/planned/list-limits): Planned endpoint. This operation is declared in the public contract, but the current… Reference for the GET /v1/limits endpoint in the Carton API reference. - [GET /v1/sandboxes/{id}/executions/{execution_id}/attach](https://carton.sh/docs/api/planned/attach-execution): Planned endpoint. This operation is declared… Reference for the GET /v1/sandboxes/{id}/executions/{execution_id}/attach endpoint in the Carton API reference. - [DELETE /v1/sandboxes/{id}/ports/{port}](https://carton.sh/docs/api/planned/unexpose-port): Planned endpoint. This operation is declared in the public… Reference for the DELETE /v1/sandboxes/{id}/ports/{port} endpoint in the Carton API reference. - [GET /v1/tokens](https://carton.sh/docs/api/planned/list-tokens): Planned endpoint. This operation is declared in the public contract, but the current… Reference for the GET /v1/tokens endpoint in the Carton API reference. - [POST /v1/tokens](https://carton.sh/docs/api/planned/create-token): Planned endpoint. This operation is declared in the public contract, but the current… Reference for the POST /v1/tokens endpoint in the Carton API reference. - [DELETE /v1/tokens/{token_id}](https://carton.sh/docs/api/planned/revoke-token): Planned endpoint. This operation is declared in the public contract, but… Reference for the DELETE /v1/tokens/{token_id} endpoint in the Carton API reference. ## Agent skills - [carton](https://carton.sh/.well-known/agent-skills/carton/SKILL.md): Read the carton docs instead of answering from memory. Create sandboxes and run commands through one CLI and HTTP API. Use when a task involves carton: how it works, how to set it up or configure it, or its API. ## Agent resources - [llms-full.txt](https://carton.sh/llms-full.txt): The full Markdown of every page in one file. - [Page Markdown](https://carton.sh/index.md): Append `.md` to any page URL to fetch that page as raw Markdown. - [JSON API](https://carton.sh/api/docs/pages.json): Page index of the JSON docs API; each entry links the page's JSON and Markdown forms. Described by the OpenAPI document at https://carton.sh/openapi.json. - [Agent skills](https://carton.sh/.well-known/agent-skills/index.json): Agent Skills discovery index of the skills this site publishes. - [API catalog](https://carton.sh/.well-known/api-catalog): RFC 9727 linkset of the APIs documented here. - [AI catalog](https://carton.sh/.well-known/ai-catalog.json): ARD manifest of the agent-facing resources on this site (MCP server, skills, APIs). - [agent-readability.json](https://carton.sh/agent-readability.json): Manifest of every agent-facing artifact on this site. - [Sitemap](https://carton.sh/sitemap.xml): Every indexable page URL with its last-modified date.