Skip to main content
POST
Run a code snippet

Authorizations

x-brimble-key
string
header
required

Your account-level Brimble API key. Find it in the dashboard under your profile drawer → API key (click the avatar in the sidebar). Available on paid plans only.

Path Parameters

id
string
required

24-char hex id of the sandbox.

Pattern: ^[a-f0-9]{24}$

Body

application/json
language
enum<string>
required
Available options:
python,
node
code
string
required

Snippet source. Multi-line via \n in the JSON string.

timeout_seconds
integer
Required range: 1 <= x <= 300
cwd
string
env
object

Extra environment variables for this snippet only. Same semantics as env on /exec, per-call override on top of the sandbox's default environment.

Example:
stream
boolean

When true, the response is SSE (text/event-stream) as the snippet runs, same behaviour as /exec with stream: true.

Response

Code completed.

When the request body has stream: true, the response is text/event-stream, one ExecStreamFrame per data: event.

message
string
required
Example:

"Exec completed"

data
object
required
Last modified on May 20, 2026