Appearance
Endpoint: Routing Advisory
Get routing recommendations without executing a prompt. Use this to preview which provider would be selected for a given request.
Endpoint
http
POST /api/gateway/routing-advisoryRequest Body
json
{
"input": "Your prompt text here",
"routingPolicy": {
"strategy": "LOWEST_COST"
},
"policyId": "clxyz123..."
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
input | string | Yes | The prompt text to evaluate |
routingPolicy | object | No | Inline policy configuration |
policyId | string | No | ID of a saved routing policy |
Either routingPolicy or policyId should be provided. If both are provided, policyId takes precedence.
Response
json
{
"success": true,
"recommendation": {
"primary": {
"provider": "openai",
"model": "gpt-4-turbo",
"estimatedLatency": 520,
"estimatedCost": 0.00002,
"qualityScore": 0.94,
"reasoning": "Best match for cost-optimized routing"
},
"fallbacks": [
{
"provider": "anthropic",
"model": "claude-3-haiku",
"estimatedLatency": 380,
"estimatedCost": 0.000025,
"qualityScore": 0.88
}
],
"policyApplied": "Cost Optimized Default"
}
}Example: Cost-Optimized Advisory
bash
curl https://app.veriprompt.tech/api/gateway/routing-advisory \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "Summarize this customer feedback in one sentence.",
"routingPolicy": {
"strategy": "LOWEST_COST",
"preferences": {
"weights": {
"cost": 0.6,
"latency": 0.2,
"quality": 0.2
}
}
}
}'Example: Using Saved Policy
bash
curl https://app.veriprompt.tech/api/gateway/routing-advisory \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "Process this healthcare form.",
"policyId": "clxyz123-hipaa-policy"
}'Strategy Values
| Strategy | Description |
|---|---|
BALANCED | Equal weight to all factors |
LOWEST_COST | Prioritize cheapest providers |
LOWEST_LATENCY | Prioritize fastest providers |
HIGHEST_QUALITY | Prioritize best quality |
ROUND_ROBIN | Rotate between providers |
Task-aware evidence (subscriber advisory)
The subscriber advisory endpoint /api/v1/routing-advisory (API-key authenticated, rate limited) accepts optional task fields and returns benchmark evidence per model for that task. Both fields are additive: without them the response is unchanged, and they never reorder recommendations.
http
GET /api/v1/routing-advisory?taskCodes=coding,legal
POST /api/v1/routing-advisory| Field | Where | Type | Description |
|---|---|---|---|
taskCodes | query (comma-separated) or body | string or string[] | Task codes or their aliases, for example coding, legal, translation. Unknown terms are ignored |
content | body only | string (max 20,000 characters) | Sample request text. It is classified with the rule-based classifier only; no model is called and nothing is stored. Keep personal data out of it |
The POST body also accepts regions, providerTypes, complianceFrameworks (string arrays), maxCost, minPerformance (numbers) and useCase (string), as the GET query does.
bash
curl https://app.veriprompt.tech/api/v1/routing-advisory \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskCodes": ["coding"], "regions": ["EU"] }'When taskCodes or content is sent, two top-level fields are added to the response:
json
{
"recommendations": [ "..." ],
"taskProfile": {
"codes": ["coding"],
"dimensions": ["coding"],
"confidence": 1,
"source": "EXPLICIT",
"applied": true,
"classifierVersion": "explicit"
},
"taskFit": {
"evidence": [
{
"providerId": "anthropic",
"model": "example-model",
"taskFit": {
"blendedQualityScore": 0.87,
"legacyQualityScore": 0.7,
"perDimension": { "coding": { "dimension": "coding", "score": 0.87, "source": "external" } },
"provenance": [
{
"dimension": "coding",
"score": 0.87,
"source": "external",
"asOf": "2026-09-28T00:00:00.000Z",
"benchmarks": ["livebench:coding"],
"weight": 1
}
]
},
"explanations": [
{ "key": "taskFitExplainDimExternal", "vars": { "dimension": "coding", "value": 82, "benchmarks": "livebench:coding", "asOf": "2026-09-28" } }
]
}
],
"explanations": [
{ "key": "taskFitExplainApplied", "vars": { "tasks": "coding", "confidence": 100 } }
]
}
}taskProfile.sourceis one ofEXPLICIT(you sent codes) orCLASSIFIED(detected fromcontent), orNONE.classifierVersionisexplicitor the rule-based classifier's version, never a model.taskFit.evidencelists up to ten provider models that have benchmark or own-data evidence for the task, best first. Models without evidence are left out.provenance[].sourceisexternal(third-party benchmark),internal(company evidence, never returned to API-key subscribers; only global benchmark rows are read here),manual(specialization tag) ortier(static quality tier).benchmarkslistssource:benchmarkidentifiers;asOfis the newest evidence date.explanationsare{ key, vars }pairs:keyis a stable message key andvarsits values, so a client can render its own wording. The English text of each key is shown in the product's policy preview.- An invalid
taskCodesorcontenttype returns400with anerrormessage.
