curl --request GET \
--url https://api.yourapp.com/api/ai/user-models \
--header 'Authorization: Bearer <token>'
{
"success": true,
"ai_models": [
{
"id": "user_model_123",
"modelId": "gpt-4o",
"provider": "OpenAI",
"apiKey": "sk-...xyz",
"isDefault": true,
"createdAt": "2024-01-15T10:30:00Z"
},
{
"id": "user_model_456",
"modelId": "claude-3-5-sonnet-20241022",
"provider": "Anthropic",
"apiKey": "sk-ant-...xyz",
"isDefault": false,
"createdAt": "2024-01-14T09:20:00Z"
}
],
"embeddings": [
{
"id": "user_embed_789",
"modelId": "text-embedding-3-large",
"provider": "OpenAI",
"apiKey": "sk-...xyz",
"isDefault": true,
"createdAt": "2024-01-15T10:30:00Z"
}
]
}
AI
Get User Models
Retrieves the current user’s configured AI models and credentials
GET
/
api
/
ai
/
user-models
curl --request GET \
--url https://api.yourapp.com/api/ai/user-models \
--header 'Authorization: Bearer <token>'
{
"success": true,
"ai_models": [
{
"id": "user_model_123",
"modelId": "gpt-4o",
"provider": "OpenAI",
"apiKey": "sk-...xyz",
"isDefault": true,
"createdAt": "2024-01-15T10:30:00Z"
},
{
"id": "user_model_456",
"modelId": "claude-3-5-sonnet-20241022",
"provider": "Anthropic",
"apiKey": "sk-ant-...xyz",
"isDefault": false,
"createdAt": "2024-01-14T09:20:00Z"
}
],
"embeddings": [
{
"id": "user_embed_789",
"modelId": "text-embedding-3-large",
"provider": "OpenAI",
"apiKey": "sk-...xyz",
"isDefault": true,
"createdAt": "2024-01-15T10:30:00Z"
}
]
}
Response
Indicates if the operation was successful
Array of user’s configured language models with credentials
Array of user’s configured embedding models with credentials
curl --request GET \
--url https://api.yourapp.com/api/ai/user-models \
--header 'Authorization: Bearer <token>'
{
"success": true,
"ai_models": [
{
"id": "user_model_123",
"modelId": "gpt-4o",
"provider": "OpenAI",
"apiKey": "sk-...xyz",
"isDefault": true,
"createdAt": "2024-01-15T10:30:00Z"
},
{
"id": "user_model_456",
"modelId": "claude-3-5-sonnet-20241022",
"provider": "Anthropic",
"apiKey": "sk-ant-...xyz",
"isDefault": false,
"createdAt": "2024-01-14T09:20:00Z"
}
],
"embeddings": [
{
"id": "user_embed_789",
"modelId": "text-embedding-3-large",
"provider": "OpenAI",
"apiKey": "sk-...xyz",
"isDefault": true,
"createdAt": "2024-01-15T10:30:00Z"
}
]
}
⌘I

