Routing Studio
Create Routing Preference
Author a new Routing Studio preference.
POST
Create Routing Preference
Create a new Routing Studio preference. Idempotent — the sameDocumentation Index
Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt
Use this file to discover all available pages before exploring further.
Idempotency-Key header replays the same response.
Creating a preference does not auto-bind it to a key. Use PUT /api/v1/keys//routing-preference to opt a key in, or edit rules directly on a key via PUT /api/v1/keys//routing-rules.
Authentication
Requires a Bearer token with thebilling API key scope.
Body
Preference name. 1–128 chars. May not reference upstream provider names (Claude, OpenAI, Anthropic, Gemini, fal.ai, etc.).
Free-text description. Up to 512 chars.
Up to 50 keyword/regex rules. Each rule has
pattern (ECMAScript regex source, ≤512 chars), target_mode (a Theo mode), optional target_engine (Theo-branded engine id), confidence (clamped server-side to [0.5, 0.99]), and an optional description.Up to 30 few-shot examples injected into the classifier’s system prompt. Each example has
prompt (≤1024 chars), expected_mode, and optional expected_engine.Per-mode replacements for the global
0.85 promotion floor. Values are clamped to [0.5, 0.99]."personal" (default) or "team". Team scope requires an active org and the manageWebhooks permission.Mark this preference as the default for its scope. At most one default per scope.
Request Examples
Errors
400 routing_preference_invalid— Vendor-named label or pattern, uncompilable regex, unknown engine, or rule/example cap exceeded.400 org_required—scope: "team"without an active organization.403 missing_scope— API key lacks thebillingscope.409 conflict—is_default: truealready set for this scope.
Create Routing Preference
