Get Model Preference GET
Overview
Returns the user's preferred AI model setting.
Endpoint URL
GET /api/users/:userId/model-preference
Endpoint Data
Example Request
curl -X GET "http://localhost:3026/api/users/user-123/model-preference" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-b cookies.txt
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"userId": "user-123",
"modelId": "gpt-4"
}
}
Response Fields
| Field |
Type |
Description |
userId |
String |
User identifier |
modelId |
String |
Preferred model identifier |
Error Responses
| Status Code |
Error |
Description |
401 |
Unauthorized |
Invalid or missing session |
403 |
Forbidden |
Cannot access another user's preferences |
404 |
Not Found |
No preference set for user |