{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"What this solves"}]},{"type":"text","value":": Configure channels, routing and data protection from your own product with an API key, without opening the Tare console."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A management key does one thing: change the account's configuration. It is meant for a partner product that sets up channels, routes and DLP rules for its own customers through an API. It cannot call models, read billing, look up generations or issue keys."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"What it can and cannot call"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"thead","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Management key"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/manage/providers/**"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Channels: list, add, change, delete, cost prices, test, dialect"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/manage/routers/**"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Routing: routers and the routes inside them"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/manage/dlp/**"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Data protection: account and key settings, custom rules, test scan"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Model endpoints, "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/generation"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/keys"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/integration/*"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"403"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/manage/providers/{id}/chat"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"403"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/manage/*"}]},{"type":"text","value":" paths accept "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"only"}]},{"type":"text","value":" a management key. An inference, provisioning or reconciliation key gets "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"403"}]},{"type":"text","value":" there, and so does a console session; the console keeps using the unprefixed paths ("},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/providers"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/routers"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/dlp"}]},{"type":"text","value":"). Both sets of paths run the same handlers, so request and response bodies are identical."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Channel chat is not available"}]},{"type":"text","value":" with a management key. It sends a real prompt to the upstream and spends tokens on that channel. "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Test"}]},{"type":"text","value":", "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"detect dialect"}]},{"type":"text","value":" and "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"route test"}]},{"type":"text","value":" do not send a prompt and do not spend tokens, so they are allowed. Channel evaluations also spend money and stay in the console."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Creating one"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Console → "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"API Keys"}]},{"type":"text","value":" → "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Create"}]},{"type":"text","value":" → type "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Management"}]},{"type":"text","value":". Or with a console session: "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"POST /v1/api-keys"}]},{"type":"text","value":" with "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"\"keyType\": \"management\""}]},{"type":"text","value":". The full key is shown once, at creation time."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A management key has no routes, no credit limit and no DLP settings of its own. Disabling it takes effect immediately; configuration it already wrote stays."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Every change is in the audit trail"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Every "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"POST"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"PUT"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"DELETE"}]},{"type":"text","value":" made with a management key writes a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"MANAGEMENT_API_CALL"}]},{"type":"text","value":" event to the "},{"type":"element","tagName":"a","properties":{"href":"audit-trail"},"children":[{"type":"text","value":"Audit trail"}]},{"type":"text","value":": the key's id and name, the method, the path and the response status. Changes to DLP rules additionally write "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"DLP_TENANT_POLICY_CHANGED"}]},{"type":"text","value":" with "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"viaKeyId"}]},{"type":"text","value":" set to the management key. Read-only calls ("},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET"}]},{"type":"text","value":") are not recorded."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Request and response shape"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Base URL: "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"https://tare.jamerly.ai/v1/manage"}]},{"type":"text","value":". Every response is the console's envelope:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-json"]},"children":[{"type":"text","value":"{ \"code\": 200, \"message\": \"success\", \"data\": { } }\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Validation errors return "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"400"}]},{"type":"text","value":" with the reason in "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"message"}]},{"type":"text","value":". An id that belongs to another account returns "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"404"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Channels"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"export TARE_MANAGE_KEY=ak-...\n\n# List\ncurl https://tare.jamerly.ai/v1/manage/providers \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\n\n# Add\ncurl https://tare.jamerly.ai/v1/manage/providers \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"customer-42-openai\",\"baseUrl\":\"https://api.openai.com/v1\",\"apiStyle\":\"OPENAI\",\"apiKey\":\"sk-...\"}'\n\n# Change (only the fields you send are changed; \"paused\": true takes it out of traffic)\ncurl -X PUT https://tare.jamerly.ai/v1/manage/providers/101 \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"paused\":false}'\n\n# Test address, key and dialect (no tokens spent)\ncurl -X POST https://tare.jamerly.ai/v1/manage/providers/101/test \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\n\n# Enter a cost price for one upstream model (USD per 1M tokens)\ncurl -X PUT https://tare.jamerly.ai/v1/manage/providers/101/costs \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"providerModelName\":\"gpt-4.1-mini\",\"inputPrice\":0.4,\"outputPrice\":1.6}'\n\n# Delete\ncurl -X DELETE https://tare.jamerly.ai/v1/manage/providers/101 \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The other channel endpoints follow the same pattern under "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/manage/providers/{id}"}]},{"type":"text","value":": "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET costs"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"POST costs/delete"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET missing-costs"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET upstream-models"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"POST detect-dialect"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET"}]},{"type":"text","value":"/"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"PUT dialects"}]},{"type":"text","value":". The fields are described in "},{"type":"element","tagName":"a","properties":{"href":"channels"},"children":[{"type":"text","value":"Channels"}]},{"type":"text","value":" and "},{"type":"element","tagName":"a","properties":{"href":"cost-prices"},"children":[{"type":"text","value":"Cost prices"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Routing"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A channel carries no traffic until a route points a model name at it."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"# List routers\ncurl https://tare.jamerly.ai/v1/manage/routers \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\n\n# Create a router\ncurl https://tare.jamerly.ai/v1/manage/routers \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"customer-42\",\"enablePlatformModels\":false}'\n\n# Add a route: model name callers send → channel and upstream model name\ncurl https://tare.jamerly.ai/v1/manage/routers/7/routes \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"modelName\":\"gpt-4.1-mini\",\"providerId\":101,\"providerModelName\":\"gpt-4.1-mini\",\"priority\":1,\"weight\":100}'\n\n# Change a route: priority, weight, enabled\ncurl -X PUT https://tare.jamerly.ai/v1/manage/routers/7/routes/55 \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"enabled\":false}'\n\n# Order a model's routes by measured speed (SPEED) or cost price (COST)\ncurl -X POST https://tare.jamerly.ai/v1/manage/routers/7/routes/arrange \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"modelName\":\"gpt-4.1-mini\",\"mode\":\"COST\"}'\n\n# Test a route, including whether the upstream model name exists (no tokens spent)\ncurl -X POST https://tare.jamerly.ai/v1/manage/routers/7/routes/55/test \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\n\n# Delete a route, then the router\ncurl -X DELETE https://tare.jamerly.ai/v1/manage/routers/7/routes/55 \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\ncurl -X DELETE https://tare.jamerly.ai/v1/manage/routers/7 \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Also available: "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"PUT /v1/manage/routers/{id}"}]},{"type":"text","value":" (rename, make default, platform models), "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/manage/routers/{id}/routes"}]},{"type":"text","value":", and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET"}]},{"type":"text","value":" / "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"PUT /v1/manage/routers/{id}/capabilities"}]},{"type":"text","value":" (what "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/models"}]},{"type":"text","value":" reports for a model: "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"{\"modelName\":\"my-vl\",\"inputModalities\":[\"text\",\"image\"],\"outputModalities\":[\"text\"]}"}]},{"type":"text","value":"; empty arrays go back to the upstream's). See "},{"type":"element","tagName":"a","properties":{"href":"routing"},"children":[{"type":"text","value":"Routing"}]},{"type":"text","value":" for how candidates, priority and weight work."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Data protection"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"# Account switch and per-type actions\ncurl https://tare.jamerly.ai/v1/manage/dlp/policy \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\ncurl -X PUT https://tare.jamerly.ai/v1/manage/dlp/policy \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"enabled\":true,\"types\":{\"EMAIL\":\"MASK\",\"TW_NATIONAL_ID\":\"BLOCK\"}}'\n\n# What custom rules can be built from\ncurl https://tare.jamerly.ai/v1/manage/dlp/capabilities \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\n\n# Custom rules\ncurl \"https://tare.jamerly.ai/v1/manage/dlp/rules?scope=ALL\" \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\ncurl https://tare.jamerly.ai/v1/manage/dlp/rules \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"scope\":\"TENANT\",\"name\":\"Employee ID\",\"kind\":\"FORMAT\",\"format\":{\"prefix\":\"EMP-\",\"charset\":\"DIGITS\",\"length\":{\"min\":6,\"max\":6},\"boundary\":\"WORD\"},\"action\":\"MASK\"}'\ncurl -X PUT https://tare.jamerly.ai/v1/manage/dlp/rules/12 \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"enabled\":false}'\ncurl -X DELETE https://tare.jamerly.ai/v1/manage/dlp/rules/12 \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\"\n\n# Try a draft rule on sample text before saving\ncurl -X POST https://tare.jamerly.ai/v1/manage/dlp/rules/test \\\n  -H \"Authorization: Bearer $TARE_MANAGE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\":\"Ticket from EMP-204811\",\"rule\":{\"name\":\"Employee ID\",\"kind\":\"FORMAT\",\"format\":{\"prefix\":\"EMP-\",\"charset\":\"DIGITS\",\"length\":{\"min\":6,\"max\":6},\"boundary\":\"WORD\"},\"action\":\"MASK\"}}'\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Per-key skip settings are under "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/manage/dlp/keys/{keyId}/skip"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/manage/dlp/keys/{keyId}/skip/secret"}]},{"type":"text","value":", and the recommended rules under "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/manage/dlp/pack"}]},{"type":"text","value":", with the same bodies as in "},{"type":"element","tagName":"a","properties":{"href":"security"},"children":[{"type":"text","value":"Data protection (DLP)"}]},{"type":"text","value":". The rule schema is in "},{"type":"element","tagName":"a","properties":{"href":"dlp-custom-rules"},"children":[{"type":"text","value":"Custom DLP rules"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Next steps"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Write detection rules for your own identifiers: read "},{"type":"element","tagName":"a","properties":{"href":"dlp-custom-rules"},"children":[{"type":"text","value":"Custom DLP rules"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Know which customer an alert is about: read the webhook payload in "},{"type":"element","tagName":"a","properties":{"href":"alerts"},"children":[{"type":"text","value":"Alerts"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Issue one inference key per customer: read "},{"type":"element","tagName":"a","properties":{"href":"provisioning"},"children":[{"type":"text","value":"Provisioning keys"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"}]}]}