ai-model-controller
Create or update AI model (saveAiModel)
Creates or updates an AI model record.
• Create: Omit the id to create a new record. The platform assigns a UUID to the new record and returns it in the id field of the response.
• Update: Include an existing id to modify that record. If no matching record exists, the API responds with 404 Not Found.
Tenant ID for the AI model will be taken from the authenticated user making the request, regardless of any value provided in the request body.
Available for users with 'TENANT_ADMIN' authority.
post/api/ai/model
Request body
Example request
{
"tenantId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "TENANT"
},
"version": 7,
"name": "Fast and cost-efficient model",
"id": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "AI_MODEL"
},
"createdTime": 1746028547220
}Response
OK
Example response
{
"tenantId": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "TENANT"
},
"version": 7,
"name": "Fast and cost-efficient model",
"id": {
"id": "784f394c-42b6-435a-983c-b7beff2784f9",
"entityType": "AI_MODEL"
},
"createdTime": 1746028547220
}