v26

latestOpenAPI 3.1.0raw.githubusercontent.com2026-02-081039106.2 KB
Preferences
Preferences

Create a preference ID

Create a new preference ID for personalized LLM routing.

A preference ID enables personalized routing by tracking your feedback and learning your preferences over time. Once created, you can:

  1. Use it in model_select() calls to get personalized routing decisions
  2. Train a custom router specific to your use case

Workflow:

  1. Create a preference ID (this endpoint)
  2. Use the preference_id in POST /v2/modelRouter/modelSelect requests
  3. Optionally train a custom router via POST /v2/pzn/trainCustomRouter

Benefits:

  • Personalized routing for your specific use case
  • Ability to train custom routers on your evaluation data

Note: If you don't provide a preference_id in model_select() calls, the default router will be used.

post/v2/preferences/userPreferenceCreate

Request body

namestring nullable

Optional name for the preference. If not provided, an auto-generated timestamp will be used. Use descriptive names like 'Production API' or 'Customer Support Bot' for easy identification

Example request

{
  "name": "My Production Router"
}

Response

Successfully created preference ID

preference_idstring required

Unique identifier for the newly created preference. Use this in the 'preference_id' parameter of model_select() calls to enable personalized routing

Example response

{
  "preference_id": "550e8400-e29b-41d4-a716-446655440000"
}