Orqen Docs

API Reference

Model routing

Routing endpoints configure orqen/auto, expose the models available from connected providers, and show the measured routing traces Orqen uses to calibrate K.

Endpoints

GET/v1/account/routing/preferencesRead routing mode and constraints.
PUT/v1/account/routing/preferencesUpdate routing mode, allowed providers, or max cost.
GET/v1/account/routing/modelsList models available from connected providers.
GET/v1/account/routing/models/statusList available models plus enabled state and observed performance.
POST/v1/account/routing/models/toggleEnable or disable a model for automatic routing.
GET/v1/account/routing/insightsBest recall, fastest, and most-used model insights.
GET/v1/account/routing/calibrationCurrent measured K policy and recall buckets.
GET/v1/account/routing/tracesRecent routing decisions with intent, K reason, and top candidates.

Preferences

curl https://api.orqen.app/v1/account/routing/preferences \
  -H "Authorization: Bearer sk-orq-YOUR_KEY"

Models

curl https://api.orqen.app/v1/account/routing/models \
  -H "Authorization: Bearer sk-orq-YOUR_KEY"

Toggle a model

curl https://api.orqen.app/v1/account/routing/models/toggle \
  -X POST \
  -H "Authorization: Bearer sk-orq-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "openai",
    "model_id": "gpt-4o",
    "is_enabled": false
  }'

Insights

curl https://api.orqen.app/v1/account/routing/insights \
  -H "Authorization: Bearer sk-orq-YOUR_KEY"

Calibration

Calibration shows the measured K policy Orqen can apply from your shadow-routing data.

curl https://api.orqen.app/v1/account/routing/calibration \
  -H "Authorization: Bearer sk-orq-YOUR_KEY"

Routing traces

curl "https://api.orqen.app/v1/account/routing/traces?limit=20" \
  -H "Authorization: Bearer sk-orq-YOUR_KEY"