Skip to main content
POST https://api.prysm1.com/v1/route · Requires authentication
Preview a routing decision without generating a completion. Returns the model PRYSM would select for a prompt plus an estimated cost — perfect for testing BRAIN.md rules and showing users a price before they spend.

Authorization

Authorization
string
required
Your secret key as a bearer token: Bearer prysm_sk_...

Body

prompt
string
required
The prompt to classify and route.
routing_mode
string
Force a routing mode: quality, balanced, or agility. Omit to let PRYSM choose.
brain_config
object
An inline BRAIN.md config to apply when routing.

Response

routing
object
The routing decision.
estimated_cost
object
model_info
object
from prysm import Prysm

client = Prysm()
print(client.route("write a python function to sort a list"))
{
  "routing": {
    "mode": "balanced",
    "model": "deepseek-v3.2",
    "display": "DeepSeek V3.2",
    "provider": "deepseek",
    "why": "Code: 95% cheaper than GPT-5.2",
    "tier": "budget",
    "signals": { "code": true },
    "in_cost": 0.28,
    "out_cost": 0.42
  },
  "estimated_cost": {
    "input_per_mtok": 0.28,
    "output_per_mtok": 0.42,
    "est_1k_tokens": 0.0007
  },
  "model_info": {
    "context_window": 128000,
    "expected_latency_ms": 220,
    "strengths": ["general", "code", "multilingual", "value"]
  }
}