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

# Build a template (not supported)

E2B's `POST /v3/templates` is not implemented by B3OS. It answers `501` naming the alternative, with or without credentials: custom template builds are not in the beta. Start from a built-in template (`base`, `code-interpreter`, `agent`, `browser`), install what you need, and save it with a snapshot (`POST /v1/sandboxes/{sandbox_id}/snapshot`) to create from later.

` POST /compat/e2b/v3/templates `

Build a template (not supported)

E2B's `POST /v3/templates` is not implemented by B3OS. It answers `501` naming the alternative, with or without credentials: custom template builds are not in the beta. Start from a built-in template (`base`, `code-interpreter`, `agent`, `browser`), install what you need, and save it with a snapshot (`POST /v1/sandboxes/{sandbox_id}/snapshot`) to create from later.

## Servers

- ` https://beta-api.b3os.org ` — API (API keys and CLI tokens)

- ` https://beta.b3os.org ` — Dashboard (session cookie and CSRF header; same paths)

## Request body (optional)

Content type: ` application/json `

- ` value `: type ` object ` — Ignored.

Example:

```json
{}
```

## Responses

### ` 413 ` — The body is over 1 MiB (`payload_too_large`).

Content type: ` application/json `

- ` value `: type ` object ` — E2B's error body.

  - Required fields: ` code `, ` message `

  - ` code `: type ` integer ` — The HTTP status.

  - ` message `: type ` string `

Response header ` x-request-id ` — The request ID (`req_…`). It is the `instance` of any problem and the key for `GET /v1/requests/{request_id}`.

- ` value `: type ` string `

  - pattern: ` "^req_[0-9a-hjkmnp-tv-z]{26}$" `

Response header ` Server-Timing ` — Phase durations in milliseconds (W3C Server Timing); the handler's phases break the request down. For a
response whose body size is known, `total` runs from reading the request head to writing the response head.
Streaming responses (event streams, WebSockets, chunked bodies) carry no `total` here: they report their
final phases in the terminal event (`job.succeeded`, `job.failed`, `job.canceled`) or the final job. The
time from the first request byte to the last response byte is recorded in the node's metrics and request
log (`GET /v1/requests/{request_id}`). The edge prepends `edge_auth` and `edge_upstream`.


- ` value `: type ` string `

Example:

```json
{
  "code": 413,
  "message": "Request body is 2097152 bytes; this operation accepts at most 1048576"
}
```

### ` 501 ` — Template builds are not supported (`not_implemented`); the message names the alternative.

Content type: ` application/json `

- ` value `: type ` object ` — E2B's error body.

  - Required fields: ` code `, ` message `

  - ` code `: type ` integer ` — The HTTP status.

  - ` message `: type ` string `

Response header ` x-request-id ` — The request ID (`req_…`). It is the `instance` of any problem and the key for `GET /v1/requests/{request_id}`.

- ` value `: type ` string `

  - pattern: ` "^req_[0-9a-hjkmnp-tv-z]{26}$" `

Response header ` Server-Timing ` — Phase durations in milliseconds (W3C Server Timing); the handler's phases break the request down. For a
response whose body size is known, `total` runs from reading the request head to writing the response head.
Streaming responses (event streams, WebSockets, chunked bodies) carry no `total` here: they report their
final phases in the terminal event (`job.succeeded`, `job.failed`, `job.canceled`) or the final job. The
time from the first request byte to the last response byte is recorded in the node's metrics and request
log (`GET /v1/requests/{request_id}`). The edge prepends `edge_auth` and `edge_upstream`.


- ` value `: type ` string `

Example:

```json
{
  "code": 501,
  "message": "Template builds are not supported by B3OS: start from a built-in template (base, code-interpreter, agent, browser), install what you need, and save it with a snapshot (POST /v1/sandboxes/{sandbox_id}/snapshot) to create from later."
}
```

## Request examples

### cURL

```curl
curl -X POST 'https://beta-api.b3os.org/compat/e2b/v3/templates' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

### JavaScript

```javascript
const response = await fetch('https://beta-api.b3os.org/compat/e2b/v3/templates', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({})
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://beta-api.b3os.org/compat/e2b/v3/templates', headers=headers, json={})
print(response.json())
```