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

Tool settings

Get Tool Settings

get

Return the effective tool/guardrail settings for the dashboard.

Authentication only on the router: the role decides how much rather than whether, so this is not the deployment-wide gate require_deployment_operator names. A header master key is the deployment credential and reads everything; a session reads everything only while it operates the deployment, and otherwise gets the fields without the service endpoints in them.

Authorizations
Otari-KeystringRequired

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

Responses
200

Successful Response

application/json

The effective value of every editable tool/guardrail field.

sandbox_providerstring · enum · nullableOptional

What runs generated code: 'protocol' (a sandbox at sandbox_url) or 'e2b'. Set at startup, not editable here. Null for a reader who does not operate the deployment.

Possible values:
get/api/v1/tool-settings
GET /api/v1/tool-settings HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
200

Successful Response

{
  "fields": [
    {
      "description": "text",
      "key": "text",
      "options": [
        "text"
      ],
      "service": "web_search",
      "type": "url",
      "value": true
    }
  ],
  "sandbox_credential": {
    "env_var": "text",
    "last4": "text",
    "source": "stored"
  },
  "sandbox_provider": "protocol"
}

Update Tool Settings

patch

Persist and apply tool/guardrail setting changes.

Uses model_fields_set so an explicit null clears a field while an omitted field is left unchanged. Operator-gated.

Authorizations
Otari-KeystringRequired

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

Body

Change one or more tool settings. Omitted fields are left unchanged; an explicit null clears a field back to the configured env/YAML default.

code_execution_executorstring · nullableOptional
guardrails_urlstring · nullableOptional
sandbox_purpose_hintstring · nullableOptional
sandbox_session_imagestring · nullableOptional
sandbox_urlstring · nullableOptional
web_fetch_default_toolstring · nullableOptional

A fetch instance, or 'builtin_fetch'.

web_search_default_toolstring · nullableOptional

A search instance whose provider any-search serves, or 'none' to turn off the deployment's own in-loop search, which an organization key still serves.

web_search_enginesstring · nullableOptional
web_search_extractboolean · nullableOptional
web_search_interceptboolean · nullableOptional
web_search_max_callsinteger · min: 1 · nullableOptional
web_search_max_resultsinteger · min: 1 · nullableOptional
web_search_purpose_hintstring · nullableOptional
web_search_urlstring · nullableOptional
Responses
200

Successful Response

application/json

The effective value of every editable tool/guardrail field.

sandbox_providerstring · enum · nullableOptional

What runs generated code: 'protocol' (a sandbox at sandbox_url) or 'e2b'. Set at startup, not editable here. Null for a reader who does not operate the deployment.

Possible values:
patch/api/v1/tool-settings
PATCH /api/v1/tool-settings HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 67

{
  "web_search_max_results": 5,
  "web_search_url": "http://searxng:8080"
}
{
  "fields": [
    {
      "description": "text",
      "key": "text",
      "options": [
        "text"
      ],
      "service": "web_search",
      "type": "url",
      "value": true
    }
  ],
  "sandbox_credential": {
    "env_var": "text",
    "last4": "text",
    "source": "stored"
  },
  "sandbox_provider": "protocol"
}

List Builtin Guardrails

get

List the guardrails this gateway can run itself, for the form that defines one.

Every guardrail any_guardrail reaches over a hosted API, with the constructor and per-call arguments each one takes, so a guardrail is configured by picking it and filling typed fields. It is not the whole library: a guardrail that works by holding model weights in the process running it belongs in the guardrails service the profiles read beside this one describes, not here. A parameter names the environment variable that fills it where one exists, and requirement_groups carries the constraints satisfied by any of several parameters, which no single required flag can state. This is the counterpart of GET /api/v1/providers/catalog: the same picker, for a guardrail rather than a provider, and on the same gate that one takes.

Reaches no service, so there is no unavailable state to report: the answer is a property of the installed any_guardrail, not of any deployment's state.

On the catalog router rather than the operator one beside it, because the form this feeds belongs to an organization and is filled by an owner or admin, who reaches no operator route. So it is readable without deployment-wide standing, by a dashboard session and by any API key alike. What it publishes carries no deployment state to withhold: the same bytes on every deployment of the same build, and a parameter's environment variable is a name, never whether that name is set.

The profiles read next door takes the same gate. It differs in reach: that one dials guardrails_url, from a short cache, and this one dials nothing.

Authorizations
Otari-KeystringRequired

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

Responses
200

Successful Response

application/json

The guardrails this gateway can build and call itself.

get/api/v1/tool-settings/guardrails/catalog
GET /api/v1/tool-settings/guardrails/catalog HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
200

Successful Response

{
  "guardrails": [
    {
      "alternate_backends": [
        "text"
      ],
      "backend": "local_encoder",
      "categories": [
        "text"
      ],
      "create_parameters": [
        {
          "choices": [
            "text"
          ],
          "default": null,
          "description": "text",
          "env_var": "text",
          "name": "text",
          "required": true,
          "secret": false,
          "storable": true,
          "type": "string"
        }
      ],
      "default_license": "text",
      "description": "text",
      "display_name": "text",
      "guardrail_name": "text",
      "multilingual": false,
      "multimodal": false,
      "optional_validate_kwargs": [
        "text"
      ],
      "output_shapes": [
        "text"
      ],
      "primary_category": "prompt_injection",
      "required_validate_kwargs": [
        "text"
      ],
      "requirement_groups": [
        {
          "description": "text",
          "env_vars": [
            "text"
          ],
          "parameters": [
            "text"
          ]
        }
      ],
      "requires_api_key": false,
      "stages": [
        "text"
      ],
      "supports_batch": false,
      "validate_parameters": [
        {
          "choices": [
            "text"
          ],
          "default": null,
          "description": "text",
          "env_var": "text",
          "name": "text",
          "required": true,
          "secret": false,
          "storable": true,
          "type": "string"
        }
      ],
      "variant_licenses": [
        {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      ],
      "vendor": "text"
    }
  ]
}

List Guardrail Profiles

get

List the guardrail profiles this deployment's guardrails service has built.

What an organization guardrail's profile may name, with the validate_kwargs each one accepts, so the dashboard offers a picker and typed fields instead of a free-text box beside an unrendered dict. The profiles come from the service itself and the parameter schemas from the any_guardrail registry; neither is a list kept in this repository. See gateway.services.guardrail_catalog.

Reports available: false with a reason rather than an error when the service is unconfigured, unreachable, or older than its /profiles endpoint, because a guardrails outage must not also break the page that configures guardrails.

Read against guardrails_url, which is the deployment's own service. An entry that carries an endpoint of its own is not probed: that URL is caller-supplied and fetching it here would make this a way to have the gateway request an address of the caller's choosing.

On verify_catalog_reader, so any API key reads it: a caller who may send a profile name may learn which ones exist (otari#2690). The answer is cached for 30 seconds per worker, so however many reads arrive, a worker sends the deployment's guardrails service at most one request in that time.

Authorizations
Otari-KeystringRequired

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

Responses
200

Successful Response

application/json

The profiles a guardrail entry may name, or why they could not be listed.

availablebooleanRequired

Whether the guardrails service answered with its profiles

reasonstring · nullableOptional

Why the catalog is unavailable, in terms a tenant can act on

get/api/v1/tool-settings/guardrails/profiles
GET /api/v1/tool-settings/guardrails/profiles HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
200

Successful Response

{
  "available": true,
  "profiles": [
    {
      "guardrail": "text",
      "model_id": "text",
      "parameters": [
        {
          "choices": [
            "text"
          ],
          "default": null,
          "description": "text",
          "env_var": "text",
          "name": "text",
          "required": true,
          "secret": false,
          "storable": true,
          "type": "string"
        }
      ],
      "parameters_known": true,
      "profile": "text"
    }
  ],
  "reason": "text"
}

Set Sandbox Credential

put

Store the key this deployment's hosted sandbox provider leases sandboxes with.

Wins over the provider's environment variable (E2B_API_KEY), on this worker at once and on every other within 30 seconds, so a rotated key needs no redeploy. Refused for the protocol provider, which takes no key of its own. Operator-gated.

Authorizations
Otari-KeystringRequired

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

Body

The key to lease hosted sandboxes with.

api_keystring · min: 1Required
Responses
200

Successful Response

application/json

Where the key a hosted sandbox provider leases with comes from. Never the key itself.

env_varstringRequired

The environment variable a deployment that stores no key is read from.

last4string · nullableOptional

The key's last four characters, to tell keys apart.

sourcestring · enum · nullableRequired

'stored' for a key set here, which wins; 'environment' for the provider's own environment variable; null when there is neither and code execution fails until one is set.

Possible values:
put/api/v1/tool-settings/sandbox/credential
PUT /api/v1/tool-settings/sandbox/credential HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 34

{
  "api_key": "e2b_0123456789abcdef"
}
{
  "env_var": "text",
  "last4": "text",
  "source": "stored"
}

Clear Sandbox Credential

delete

Delete the stored sandbox key, so sandboxes are leased with the environment's key again.

Clearing a key that was never stored is not an error. Operator-gated.

Authorizations
Otari-KeystringRequired

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

Responses
200

Successful Response

application/json

Where the key a hosted sandbox provider leases with comes from. Never the key itself.

env_varstringRequired

The environment variable a deployment that stores no key is read from.

last4string · nullableOptional

The key's last four characters, to tell keys apart.

sourcestring · enum · nullableRequired

'stored' for a key set here, which wins; 'environment' for the provider's own environment variable; null when there is neither and code execution fails until one is set.

Possible values:
delete/api/v1/tool-settings/sandbox/credential
DELETE /api/v1/tool-settings/sandbox/credential HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
200

Successful Response

{
  "env_var": "text",
  "last4": "text",
  "source": "stored"
}

Test Service

post

Structurally validate a URL and probe it for reachability.

Tests the URL in the request body (typically unsaved), so an operator can verify before saving. The probe is a plain HTTP GET with a short timeout: any HTTP response means the host is reachable; a connection/timeout/DNS error means it is not. The operator is trusted (master key), so no SSRF deny-list applies; only the structural check (http/https + host) runs first.

Authorizations
Otari-KeystringRequired

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

Path parameters
servicestringRequired
Body

A (typically unsaved) URL to probe for reachability.

urlstringRequired
Responses
200

Successful Response

application/json
okbooleanRequired
reasonstringRequired
post/api/v1/tool-settings/{service}/test
POST /api/v1/tool-settings/{service}/test HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "url": "text"
}
{
  "ok": true,
  "reason": "text"
}

Last updated

Was this helpful?