Skip to main content
GET
/
api
/
v1
/
keys
/
{id}
/
effective-routing
Inspect a Key's Effective Routing
curl --request GET \
  --url https://api.example.com/api/v1/keys/{id}/effective-routing

Documentation Index

Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt

Use this file to discover all available pages before exploring further.

Returns the Routing Studio snapshot that will actually drive completions for the given key, plus a source enum so the dashboard can tell the customer where it came from. The four sources mirror the resolution cascade:
  • key — per-key rules (either the hidden preference or a shared preference explicitly bound to this key).
  • org_default — no per-key binding; falling back to the active org’s default preference.
  • user_default — no per-key, no org default; falling back to the user’s personal default preference.
  • none — nothing applies; the routing engine runs unmodified.

Authentication

Requires a Bearer token with the billing API key scope and access to the key.

Request Examples

curl https://www.hitheo.ai/api/v1/keys/{id}/effective-routing \
  -H "Authorization: Bearer $THEO_API_KEY"

Response

{
  "key_id": "key_abc",
  "source": "key",
  "is_per_key": true,
  "preference_id": "1f4f2c1a-22ce-4b07-9c0b-9c4f4b9b1d2e",
  "preference_name": "This key's rules",
  "rules": [
    {
      "id": "r_a4b8c01x9y",
      "pattern": "\\b(clause|provision|indemnity|warranty)\\b",
      "target_mode": "think",
      "confidence": 0.92,
      "description": "Contract terms get the analytical engine."
    }
  ],
  "examples": [{ "prompt": "Look at this clause", "expected_mode": "think" }],
  "confidence_floor_overrides": { "think": 0.65 }
}
  • is_per_key: true — the active source is the hidden per-key preference (i.e. rules saved via /api/v1/keys/{id}/routing-rules).
  • preference_name — friendly label. Hidden per-key preferences render as "This key's rules" so the __key: marker never leaks into customer-facing surfaces.
  • When source is "none", preference_id and preference_name are null and the rule/example arrays are empty.

Errors

  • 404 not_found — Key doesn’t exist, is revoked, or isn’t accessible to the caller.