from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.sandbox.create(session_id="demo-python-20260316", user_id="demo-user", session_kind="standard", ttl_seconds=600, sandbox_features=[], runtime_profile="standard", queue_if_full=False, skip_llm_credential_exchange=False)
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.sandbox.create({
createSessionRequest: {
sessionId: "demo-python-20260316",
sessionKind: "standard",
sandboxFeatures: [],
runtimeProfile: "standard",
},
});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using System.Collections.Generic;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Sandbox.CreateAsync(body: new MeetKai.MKA1.Types.Components.CreateSessionRequest() {
SessionId = "demo-python-20260316",
SessionKind = SessionKind.Standard,
SandboxFeatures = new List<SandboxFeature>() {},
RuntimeProfile = SandboxRuntimeProfile.Standard,
});
// handle responsecurl --request POST \
--url https://apigw.mka1.com/api/v1/sandbox/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "demo-python-20260316",
"user_id": "demo-user",
"session_kind": "standard",
"ttl_seconds": 600,
"sandbox_features": [],
"runtime_profile": "standard",
"queue_if_full": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
session_id: 'demo-python-20260316',
user_id: 'demo-user',
session_kind: 'standard',
ttl_seconds: 600,
sandbox_features: [],
runtime_profile: 'standard',
queue_if_full: false
})
};
fetch('https://apigw.mka1.com/api/v1/sandbox/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apigw.mka1.com/api/v1/sandbox/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'session_id' => 'demo-python-20260316',
'user_id' => 'demo-user',
'session_kind' => 'standard',
'ttl_seconds' => 600,
'sandbox_features' => [
],
'runtime_profile' => 'standard',
'queue_if_full' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apigw.mka1.com/api/v1/sandbox/sessions"
payload := strings.NewReader("{\n \"session_id\": \"demo-python-20260316\",\n \"user_id\": \"demo-user\",\n \"session_kind\": \"standard\",\n \"ttl_seconds\": 600,\n \"sandbox_features\": [],\n \"runtime_profile\": \"standard\",\n \"queue_if_full\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apigw.mka1.com/api/v1/sandbox/sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"demo-python-20260316\",\n \"user_id\": \"demo-user\",\n \"session_kind\": \"standard\",\n \"ttl_seconds\": 600,\n \"sandbox_features\": [],\n \"runtime_profile\": \"standard\",\n \"queue_if_full\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/sandbox/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"session_id\": \"demo-python-20260316\",\n \"user_id\": \"demo-user\",\n \"session_kind\": \"standard\",\n \"ttl_seconds\": 600,\n \"sandbox_features\": [],\n \"runtime_profile\": \"standard\",\n \"queue_if_full\": false\n}"
response = http.request(request)
puts response.read_body{
"session": {
"session_id": "demo-python-20260316",
"user_id": "demo-user",
"status": "idle",
"session_kind": "standard",
"ttl_seconds": 600,
"workspace_expires_at": "2026-03-23T20:40:00Z",
"sandbox_features": [],
"runtime_profile": "standard",
"api_key_id": null,
"permissions": [],
"created_at": "2026-03-16T20:40:00Z",
"updated_at": "2026-03-16T20:40:02Z"
},
"session_token": "sandbox_test_20260316_4f9c2b1a",
"provider": "runner-firecracker"
}{
"session": {
"session_id": "demo-python-20260316",
"user_id": "demo-user",
"status": "queued",
"session_kind": "standard",
"ttl_seconds": 600,
"workspace_expires_at": "2026-03-23T20:40:00Z",
"sandbox_features": [],
"runtime_profile": "standard",
"api_key_id": null,
"permissions": [],
"created_at": "2026-03-16T20:40:00Z",
"updated_at": "2026-03-16T20:41:00Z"
},
"session_token": "sandbox_test_20260316_4f9c2b1a",
"provider": null
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": {
"code": "browser_sessions_not_enabled",
"message": "Browser sessions are not enabled in this environment."
}
}Create Session
Create a sandbox session and return its public session metadata, session token, and provider. Set session_kind to browser to start a browser-backed session instead of a standard command/code sandbox. Set queue_if_full to true to queue the request instead of failing when runner capacity is temporarily unavailable. It does not queue requests for session kinds the deployment does not support. Browser sessions require a Firecracker-backed deployment; standard-only deployments reject them immediately with browser_sessions_not_enabled.
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.sandbox.create(session_id="demo-python-20260316", user_id="demo-user", session_kind="standard", ttl_seconds=600, sandbox_features=[], runtime_profile="standard", queue_if_full=False, skip_llm_credential_exchange=False)
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.sandbox.create({
createSessionRequest: {
sessionId: "demo-python-20260316",
sessionKind: "standard",
sandboxFeatures: [],
runtimeProfile: "standard",
},
});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using System.Collections.Generic;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Sandbox.CreateAsync(body: new MeetKai.MKA1.Types.Components.CreateSessionRequest() {
SessionId = "demo-python-20260316",
SessionKind = SessionKind.Standard,
SandboxFeatures = new List<SandboxFeature>() {},
RuntimeProfile = SandboxRuntimeProfile.Standard,
});
// handle responsecurl --request POST \
--url https://apigw.mka1.com/api/v1/sandbox/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "demo-python-20260316",
"user_id": "demo-user",
"session_kind": "standard",
"ttl_seconds": 600,
"sandbox_features": [],
"runtime_profile": "standard",
"queue_if_full": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
session_id: 'demo-python-20260316',
user_id: 'demo-user',
session_kind: 'standard',
ttl_seconds: 600,
sandbox_features: [],
runtime_profile: 'standard',
queue_if_full: false
})
};
fetch('https://apigw.mka1.com/api/v1/sandbox/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apigw.mka1.com/api/v1/sandbox/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'session_id' => 'demo-python-20260316',
'user_id' => 'demo-user',
'session_kind' => 'standard',
'ttl_seconds' => 600,
'sandbox_features' => [
],
'runtime_profile' => 'standard',
'queue_if_full' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apigw.mka1.com/api/v1/sandbox/sessions"
payload := strings.NewReader("{\n \"session_id\": \"demo-python-20260316\",\n \"user_id\": \"demo-user\",\n \"session_kind\": \"standard\",\n \"ttl_seconds\": 600,\n \"sandbox_features\": [],\n \"runtime_profile\": \"standard\",\n \"queue_if_full\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apigw.mka1.com/api/v1/sandbox/sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"demo-python-20260316\",\n \"user_id\": \"demo-user\",\n \"session_kind\": \"standard\",\n \"ttl_seconds\": 600,\n \"sandbox_features\": [],\n \"runtime_profile\": \"standard\",\n \"queue_if_full\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/sandbox/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"session_id\": \"demo-python-20260316\",\n \"user_id\": \"demo-user\",\n \"session_kind\": \"standard\",\n \"ttl_seconds\": 600,\n \"sandbox_features\": [],\n \"runtime_profile\": \"standard\",\n \"queue_if_full\": false\n}"
response = http.request(request)
puts response.read_body{
"session": {
"session_id": "demo-python-20260316",
"user_id": "demo-user",
"status": "idle",
"session_kind": "standard",
"ttl_seconds": 600,
"workspace_expires_at": "2026-03-23T20:40:00Z",
"sandbox_features": [],
"runtime_profile": "standard",
"api_key_id": null,
"permissions": [],
"created_at": "2026-03-16T20:40:00Z",
"updated_at": "2026-03-16T20:40:02Z"
},
"session_token": "sandbox_test_20260316_4f9c2b1a",
"provider": "runner-firecracker"
}{
"session": {
"session_id": "demo-python-20260316",
"user_id": "demo-user",
"status": "queued",
"session_kind": "standard",
"ttl_seconds": 600,
"workspace_expires_at": "2026-03-23T20:40:00Z",
"sandbox_features": [],
"runtime_profile": "standard",
"api_key_id": null,
"permissions": [],
"created_at": "2026-03-16T20:40:00Z",
"updated_at": "2026-03-16T20:41:00Z"
},
"session_token": "sandbox_test_20260316_4f9c2b1a",
"provider": null
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": {
"code": "browser_sessions_not_enabled",
"message": "Browser sessions are not enabled in this environment."
}
}Authorizations
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>.
Headers
Optional external end-user identifier forwarded by the API gateway.
Body
1 - 255standard, browser x >= 1python, git, claude-code standard, eval-python Show child attributes
Show child attributes
Was this page helpful?