> For the complete documentation index, see [llms.txt](https://docs.orchard.airoverflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.orchard.airoverflow.com/api/conventions.md).

# Conventions

## Headers

| Header                           | Meaning                                                                                                                       |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `Authorization: Bearer <token>`  | Required. An API key or a JWT access token.                                                                                   |
| `X-Orchard-Org: <slug>`          | JWT callers only: which organization to act in. Defaults to the user's default org. An API key ignores it (bound to its org). |
| `X-Orchard-Workspace: <slug>`    | JWT callers only: which workspace. Defaults to the default workspace.                                                         |
| `Content-Type: application/json` | On requests with a JSON body.                                                                                                 |

## Errors

Failures return a JSON body with a `detail` string:

```json
{ "detail": "add a modal API key for this workspace first" }
```

Common statuses: `400` bad input, `401` missing or bad credentials, `403` feature or role not permitted, `404` not found, `409` conflict (for example a name already in use, or an action invalid for the current state), `507` insufficient capacity or quota.

## The sandbox shape

List and detail endpoints return sandboxes in one shape, whether the sandbox runs on a node or in a cloud. The fields that matter most:

| Field                                               | Meaning                                                                           |
| --------------------------------------------------- | --------------------------------------------------------------------------------- |
| `key`                                               | The provider-local key (uuid for node, provider ref for cloud).                   |
| `id`                                                | `"<provider>:<key>"`.                                                             |
| `record_id`                                         | Numeric id. The address for cloud sandboxes.                                      |
| `uuid`                                              | Stable uuid. The address for node sandboxes.                                      |
| `name`, `display_name`                              | Human name.                                                                       |
| `state`                                             | `running`, `booting`, `stopped`, `crashed`, ...                                   |
| `provider`                                          | `vphone`, `baguette`, `android`, `cuttlefish`, `qemu`, `modal`, `daytona`, `e2b`. |
| `location`                                          | `node` or `remote`.                                                               |
| `platform`                                          | `ios`, `android`, or `linux` (cloud).                                             |
| `hardware`                                          | `{ cpu, memory_mb, disk_bytes }`.                                                 |
| `runtime`                                           | `{ state, uptime_s, guest_ip, error, ... }`.                                      |
| `capabilities`                                      | Per-capability `{ supported, available, reason }` (node sandboxes).               |
| `can_shell`, `can_files`, `can_logs`, `can_metrics` | What a cloud sandbox supports.                                                    |
| `dashboard_url`                                     | Provider console link (cloud).                                                    |

## Addressing

* **Node sandboxes**: `uuid`. Per-sandbox endpoints are under `/sandboxes/<uuid>/...` (see [Sandboxes](/api/resources/instances.md)).
* **Cloud sandboxes**: `record_id`. Endpoints are under `/remote/<record_id>/...` (see [External sandboxes](/api/resources/remote.md)).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.orchard.airoverflow.com/api/conventions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
