Run a code snippet
Writes code to a temp file and runs it with the chosen interpreter.
Cleaner than /exec for multi-line scripts because you don’t have to
deal with shell escaping. Response shape matches /exec.
Supports the same stream: true opt-in as /exec; see that endpoint’s
description for the NDJSON frame shape.
Authorizations
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
24-char hex id of the sandbox.
^[a-f0-9]{24}$Body
python, node Snippet source. Multi-line via \n in the JSON string.
1 <= x <= 300Extra environment variables for this snippet only. Same semantics as
env on /exec, per-call override on top of the sandbox's default
environment.
{ "OPENAI_API_KEY": "sk-..." }When true, the response is NDJSON streamed as the snippet runs,
same behaviour as /exec with stream: true.