Write the pool policy
const url = 'https://api.katara.com/katara/v1/orgs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/plexus/policy';const options = { method: 'PUT', headers: { 'Idempotency-Key': 'example', 'X-Katara-CSRF': '1', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"expected_version":1,"mode":"strict","classifier":"hosted","pictures":true,"tier":"light","access":{"teams":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"projects":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]},"shares":[{"kind":"team","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","percent":1}],"tiers":{"light":"example","standard":"example","deep":"example"},"named_models_api":true,"show_in_chat":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.katara.com/katara/v1/orgs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/plexus/policy \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --header 'X-Katara-CSRF: 1' \ --data '{ "expected_version": 1, "mode": "strict", "classifier": "hosted", "pictures": true, "tier": "light", "access": { "teams": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "projects": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }, "shares": [ { "kind": "team", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "percent": 1 } ], "tiers": { "light": "example", "standard": "example", "deep": "example" }, "named_models_api": true, "show_in_chat": true }'Owner or admin in a signed-in session only; requires org:plexus:write. Writes the next version when expected_version is the version in force, and refuses with a conflict otherwise. Settings left out take the default for the mode; access left out opens the pool to the whole organization. A tier names a model of this environment.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Browser cookie mutations require value 1 and an allowed Origin. Session bearer clients may omit this header.
Required for cookie-authenticated changes. Use the UUID of the account that loaded the application. A different current cookie account returns account_changed before the handler runs. Session bearer and API key clients do not require this header.
Request Bodyrequired
Section titled “Request Bodyrequired”The next version of the pool policy. Conversation compaction is not a setting: it always runs on the organization’s own model.
object
The version in force, 0 before the first write.
Strict serves the organization’s requests on its own endpoints or refuses them; fallback answers on Katara’s own models when its endpoints cannot.
Hosted lets Katara’s classifier pick the tier for each request; none runs every request at the tier set here. Defaults to hosted in fallback and none in strict.
Whether pictures may be described by Katara’s own vision model. Defaults to true in fallback and false in strict.
With classifier none, the tier every request runs at. Defaults to standard.
Who the pool serves. With both lists empty, the whole organization. A member in none of the teams, and work in none of the projects, is routed as if the organization had no pool: to Katara’s own models in fallback, refused with no_capacity in strict. A service account’s key is admitted through a project only.
object
Teams whose members may use the pool.
Projects whose keys and agent runs may use the pool.
Shares add up to at most 100. With none the pool is first come, first served.
A part of the pool’s concurrent requests reserved for one team or project. A caller within its share is served first; one over it, or with none, takes only what no share reserved, so it never takes a slot reserved for another team. When none is free, a strict pool answers a retryable no_capacity and a fallback pool hands the request to Katara’s own models.
object
Whether callers bound to the organization may name its models on the API. Defaults to true.
Whether the web chat lists the organization’s models to its members. Defaults to false.
Responses
Section titled “Responses”Successful request
The pool policy in force. Version 0 is the defaults: fallback, Katara’s hosted classifier, pictures allowed.
object
Who the pool serves. With both lists empty, the whole organization. A member in none of the teams, and work in none of the projects, is routed as if the organization had no pool: to Katara’s own models in fallback, refused with no_capacity in strict. A service account’s key is admitted through a project only.
object
Teams whose members may use the pool.
Projects whose keys and agent runs may use the pool.
Shares add up to at most 100. With none the pool is first come, first served.
A part of the pool’s concurrent requests reserved for one team or project. A caller within its share is served first; one over it, or with none, takes only what no share reserved, so it never takes a slot reserved for another team. When none is free, a strict pool answers a retryable no_capacity and a fallback pool hands the request to Katara’s own models.
object
Example
{ "mode": "strict", "classifier": "hosted", "tier": "light", "shares": [ { "kind": "team" } ]}Account_changed: reload and review with the signed-in account.
default
Section titled “default”Request error
object
object
Stable; branch on it. Any operation can answer invalid_request, with param naming the refused field when there is one; human_session_required, when an API key, service account or workload calls an operation only a signed-in person may perform; reauthentication_required, when a person’s sign-in is too old for the operation; permission_denied; route_not_found and method_not_allowed, when no operation matches the path or method; and feature_unavailable, when the operation’s service is not enabled on this deployment.
The request field a refusal is about, such as the agent_id or run_id query parameter; null when the refusal is not about one field.
Example
{ "error": { "action": "sign_in" }}