---
title: "Create a preference ID"
method: POST
path: "/v2/preferences/userPreferenceCreate"
tags: ["Preferences", "Preferences"]
---

# Create a preference ID

`POST /v2/preferences/userPreferenceCreate`

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.

## Request body

- PreferenceCreateBase — Request model for POST /v2/preferences/userPreferenceCreate endpoint. Create a new preference ID for personalized LLM routing. A preference ID enables the system to learn your routing preferences over time based on feedback, allowing for increasingly accurate model selection tailored to your specific use case. **Use cases:** - Track feedback across multiple routing decisions - Enable personalized routing that improves with usage - Train custom routers specific to your application - Organize routing configurations by project or use case
  - `name` string, 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

## Response `200`

Successfully created preference ID

- PreferenceCreateResponse — Response model for POST /v2/preferences/userPreferenceCreate endpoint. Returns the newly created preference ID which can be used to enable personalized LLM routing. Store this ID and include it in subsequent model_select() calls to activate personalized routing based on your feedback and usage patterns. **Next steps after creation:** 1. Use the preference_id in POST /v2/modelRouter/modelSelect requests 2. Submit feedback on routing decisions to improve accuracy 3. Optionally train a custom router using your evaluation data
  - `preference_id` string, required — Unique identifier for the newly created preference. Use this in the 'preference_id' parameter of model_select() calls to enable personalized routing

## Other responses

- `401` — Authentication failed
- `404` — Not found
- `422` — Validation Error

---

[API](https://skmtc.dev/not-diamond/apis/not-diamond-api.md) · [All operations](https://skmtc.dev/not-diamond/apis/not-diamond-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/not-diamond/not-diamond-api/revisions/ea8fcb544470/schema)
