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