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
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.
Request Body
application/jsonobject
Responses
413
The body is over 1 MiB (`payload_too_large`).
application/jsoncode
integer
REQUIRED
The HTTP status.
message
string
REQUIRED
501
Template builds are not supported (`not_implemented`); the message names the alternative.
curl -X POST 'https://beta-api.b3os.org/compat/e2b/v3/templates' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{}'
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);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/compat/e2b/v3/templates', headers=headers, json={})print(response.json())
413
Response
{ "code": 413, "message": "Request body is 2097152 bytes; this operation accepts at most 1048576"}
API Playground
Try this endpoint
POST
/compat/e2b/v3/templates