import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.sandbox.runCommand({
sessionId: "demo-python-20260316",
commandRequest: {
sessionId: "demo-python-20260316",
sessionToken: "sandbox_test_20260316_4f9c2b1a",
command: "python3",
args: [
"-c",
"import math; print(math.sqrt(144))",
],
cwd: null,
env: {
},
},
});
console.log(result);
}
run();{
"session_id": "demo-python-20260316",
"command": "python3",
"args": [
"-c",
"import math; print(math.sqrt(144))"
],
"cwd": "/workspace",
"stdout": "12.0\n",
"stderr": "",
"exit_code": 0,
"files_changed": []
}import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.sandbox.runCommand({
sessionId: "demo-python-20260316",
commandRequest: {
sessionId: "demo-python-20260316",
sessionToken: "sandbox_test_20260316_4f9c2b1a",
command: "python3",
args: [
"-c",
"import math; print(math.sqrt(144))",
],
cwd: null,
env: {
},
},
});
console.log(result);
}
run();{
"session_id": "demo-python-20260316",
"command": "python3",
"args": [
"-c",
"import math; print(math.sqrt(144))"
],
"cwd": "/workspace",
"stdout": "12.0\n",
"stderr": "",
"exit_code": 0,
"files_changed": []
}Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Was this page helpful?