For the complete documentation index, see llms.txt. This page is also available as Markdown.

Workspace code execution policy

Get Workspace Code Execution Policy

get

Read a workspace's code-execution policy.

Takes the same role as setting it (an organization owner/admin, or an owner/admin of this workspace), because the policy describes the workspace's security and billing posture rather than one member's allowance. A workspace with no policy answers with the unconfigured one (configured: false), which is the deployment's own behavior described in the same shape rather than a 404.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
workspace_idstring · uuidRequired
Responses
200

Successful Response

application/json

A workspace's policy, or the unconfigured policy it has without one.

allowed_imagesstring[]Required
available_toolsstring[]Required
configuredbooleanRequired
created_atstring · nullableRequired
default_enabledbooleanRequired
default_purpose_hintstring · nullableRequired
enabledbooleanRequired
exec_timeout_sinteger · nullableRequired
executorstring · enum · nullableRequired

Who runs the code a request's code-execution tool asks for.

Values are read without regard to case or surrounding whitespace.

Possible values:
imagestring · nullableRequired
max_iterationsinteger · nullableRequired
sandbox_configuredbooleanRequired
toolsstring[] · nullableRequired
updated_atstring · nullableRequired
workspace_idstring · uuidRequired
get/api/v1/workspaces/{workspace_id}/code-execution-policy
GET /api/v1/workspaces/{workspace_id}/code-execution-policy HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
  "allowed_images": [
    "text"
  ],
  "available_tools": [
    "text"
  ],
  "configured": true,
  "created_at": "text",
  "default_enabled": true,
  "default_purpose_hint": "text",
  "enabled": true,
  "exec_timeout_s": 1,
  "executor": "auto",
  "image": "text",
  "max_iterations": 1,
  "sandbox_configured": true,
  "tools": [
    "text"
  ],
  "updated_at": "text",
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}

Set Workspace Code Execution Policy

put

Set a workspace's code-execution policy, replacing any existing one.

An organization owner/admin, or an owner/admin of this workspace, may write it. The policy can only narrow what the deployment permits: turning code execution off for the workspace, lowering the loop and execution ceilings, and removing tool kinds from what the sandbox backend serves. It never turns a sandbox the deployment has not configured on, and image may only name one the operator curated (allowed_images on the response reports the set); anything else is refused with 400.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
workspace_idstring · uuidRequired
Body

The policy to store for a workspace, as a whole.

PUT semantics, ported from the hosted CodeExecutionConfigUpsert: what is sent is what the workspace has afterwards, so an omitted limit is cleared rather than left as it was.

default_purpose_hintstring · max: 2048 · nullableOptional

Hint used when a request declares otari_code_execution without one of its own

enabledbooleanRequired

False refuses code execution for this workspace

exec_timeout_sinteger · max: 60 · nullableOptional

Ceiling on one execution's runtime in seconds; only ever lowers the effective limit, so at most 60

executorstring · enum · nullableOptional

Who runs a provider-native code-execution declaration for this workspace: 'auto' (the provider when it runs the tool natively for the model, else this gateway's sandbox), 'otari' or 'provider'. Pins over the deployment default and over the request's Otari-Code-Execution header; null leaves both in charge

Possible values:
imagestring · max: 255 · nullableOptional

Sandbox image this workspace's code runs in. Must be one the operator curated into sandbox_allowed_session_images (or the deployment's own sandbox_session_image); null uses the deployment's

max_iterationsinteger · max: 25 · nullableOptional

Ceiling on tool-loop iterations; only ever lowers the effective limit, so at most 25

toolsstring[] · nullableOptional

Code-execution tool kinds this workspace may use, from code_execution, bash_code_execution, text_editor_code_execution. Only ever removes one the backend serves; null exposes whatever it serves

Responses
200

Successful Response

application/json

A workspace's policy, or the unconfigured policy it has without one.

allowed_imagesstring[]Required
available_toolsstring[]Required
configuredbooleanRequired
created_atstring · nullableRequired
default_enabledbooleanRequired
default_purpose_hintstring · nullableRequired
enabledbooleanRequired
exec_timeout_sinteger · nullableRequired
executorstring · enum · nullableRequired

Who runs the code a request's code-execution tool asks for.

Values are read without regard to case or surrounding whitespace.

Possible values:
imagestring · nullableRequired
max_iterationsinteger · nullableRequired
sandbox_configuredbooleanRequired
toolsstring[] · nullableRequired
updated_atstring · nullableRequired
workspace_idstring · uuidRequired
put/api/v1/workspaces/{workspace_id}/code-execution-policy
PUT /api/v1/workspaces/{workspace_id}/code-execution-policy HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 134

{
  "default_purpose_hint": "text",
  "enabled": true,
  "exec_timeout_s": 1,
  "executor": "auto",
  "image": "text",
  "max_iterations": 1,
  "tools": [
    "text"
  ]
}
{
  "allowed_images": [
    "text"
  ],
  "available_tools": [
    "text"
  ],
  "configured": true,
  "created_at": "text",
  "default_enabled": true,
  "default_purpose_hint": "text",
  "enabled": true,
  "exec_timeout_s": 1,
  "executor": "auto",
  "image": "text",
  "max_iterations": 1,
  "sandbox_configured": true,
  "tools": [
    "text"
  ],
  "updated_at": "text",
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}

Clear Workspace Code Execution Policy

delete

Drop a workspace's policy, returning it to the deployment's behavior.

Idempotent: a workspace that has no policy is already in the state this asks for, so it answers with the unconfigured policy rather than a 404.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
workspace_idstring · uuidRequired
Responses
200

Successful Response

application/json

A workspace's policy, or the unconfigured policy it has without one.

allowed_imagesstring[]Required
available_toolsstring[]Required
configuredbooleanRequired
created_atstring · nullableRequired
default_enabledbooleanRequired
default_purpose_hintstring · nullableRequired
enabledbooleanRequired
exec_timeout_sinteger · nullableRequired
executorstring · enum · nullableRequired

Who runs the code a request's code-execution tool asks for.

Values are read without regard to case or surrounding whitespace.

Possible values:
imagestring · nullableRequired
max_iterationsinteger · nullableRequired
sandbox_configuredbooleanRequired
toolsstring[] · nullableRequired
updated_atstring · nullableRequired
workspace_idstring · uuidRequired
delete/api/v1/workspaces/{workspace_id}/code-execution-policy
DELETE /api/v1/workspaces/{workspace_id}/code-execution-policy HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
  "allowed_images": [
    "text"
  ],
  "available_tools": [
    "text"
  ],
  "configured": true,
  "created_at": "text",
  "default_enabled": true,
  "default_purpose_hint": "text",
  "enabled": true,
  "exec_timeout_s": 1,
  "executor": "auto",
  "image": "text",
  "max_iterations": 1,
  "sandbox_configured": true,
  "tools": [
    "text"
  ],
  "updated_at": "text",
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}

Last updated

Was this helpful?