{
  "info": {
    "_postman_id": "8cf00818-0ed3-45f9-b5ad-258eb8a8c4ea",
    "name": "ThingsBoard Admin admin-controller ai-model-controller API",
    "description": "ThingsBoard Admin API \u2014 subset of the ThingsBoard REST API (open-source IoT platform). Covers: Admin, Audit Log, Event, Usage Info, Queue, Queue Stats, Mail Config Template, Qr Code Settings, Job.\n\nContact Support:\n Name: ThingsBoard team\n Email: info@thingsboard.io",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "createdAt": "2026-07-28T03:11:50.000Z",
    "updatedAt": "2026-07-28T03:11:51.000Z",
    "lastUpdatedBy": "35240",
    "uid": "35240-8cf00818-0ed3-45f9-b5ad-258eb8a8c4ea"
  },
  "item": [
    {
      "name": "api",
      "item": [
        {
          "name": "ai",
          "item": [
            {
              "name": "model",
              "item": [
                {
                  "name": "chat",
                  "item": [
                    {
                      "name": "Send Request to AI Chat Model (sendChatRequest)",
                      "id": "3e77796e-8cfc-41a0-aaf0-04e071051fbe",
                      "protocolProfileBehavior": {
                        "disableBodyPruning": true
                      },
                      "request": {
                        "method": "POST",
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"chatModelConfig\": {\n    \"modelId\": \"<string>\",\n    \"provider\": \"<string>\",\n    \"providerConfig\": {\n      \"accessKeyId\": \"<string>\",\n      \"region\": \"<string>\",\n      \"secretAccessKey\": \"<string>\"\n    },\n    \"temperature\": \"<double>\",\n    \"topP\": \"<double>\",\n    \"maxOutputTokens\": \"<integer>\",\n    \"timeoutSeconds\": \"<integer>\",\n    \"maxRetries\": \"<integer>\",\n    \"modelType\": \"CHAT\"\n  },\n  \"userMessage\": {\n    \"contents\": [\n      {\n        \"contentType\": \"<string>\",\n        \"text\": \"<string>\"\n      }\n    ]\n  },\n  \"systemMessage\": \"<string>\"\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        },
                        "url": {
                          "raw": "{{baseUrl}}/api/ai/model/chat",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "api",
                            "ai",
                            "model",
                            "chat"
                          ]
                        },
                        "description": "Submits a single prompt - made up of an optional system message and a required user message - to the specified AI chat model and returns either the generated answer or an error envelope.\n\nAvailable for users with 'TENANT_ADMIN' authority."
                      },
                      "response": [
                        {
                          "id": "9bc10fae-e0e8-4236-a1ad-3a1be7c396e8",
                          "name": "OK",
                          "originalRequest": {
                            "method": "POST",
                            "header": [
                              {
                                "key": "Content-Type",
                                "value": "application/json"
                              },
                              {
                                "key": "Accept",
                                "value": "application/json"
                              }
                            ],
                            "body": {
                              "mode": "raw",
                              "raw": "{\n  \"chatModelConfig\": {\n    \"modelId\": \"<string>\",\n    \"provider\": \"<string>\",\n    \"providerConfig\": {\n      \"accessKeyId\": \"<string>\",\n      \"region\": \"<string>\",\n      \"secretAccessKey\": \"<string>\"\n    },\n    \"temperature\": \"<double>\",\n    \"topP\": \"<double>\",\n    \"maxOutputTokens\": \"<integer>\",\n    \"timeoutSeconds\": \"<integer>\",\n    \"maxRetries\": \"<integer>\",\n    \"modelType\": \"CHAT\"\n  },\n  \"userMessage\": {\n    \"contents\": [\n      {\n        \"contentType\": \"<string>\",\n        \"text\": \"<string>\"\n      }\n    ]\n  },\n  \"systemMessage\": \"<string>\"\n}",
                              "options": {
                                "raw": {
                                  "headerFamily": "json",
                                  "language": "json"
                                }
                              }
                            },
                            "url": {
                              "raw": "{{baseUrl}}/api/ai/model/chat",
                              "host": [
                                "{{baseUrl}}"
                              ],
                              "path": [
                                "api",
                                "ai",
                                "model",
                                "chat"
                              ]
                            }
                          },
                          "status": "OK",
                          "code": 200,
                          "_postman_previewlanguage": "json",
                          "header": [
                            {
                              "key": "Content-Type",
                              "value": "application/json"
                            }
                          ],
                          "cookie": [],
                          "responseTime": null,
                          "body": "{\n  \"status\": \"<string>\",\n  \"errorDetails\": \"<string>\"\n}",
                          "createdAt": "2026-07-28T03:11:51.000Z",
                          "updatedAt": "2026-07-28T03:11:51.000Z",
                          "uid": "35240-9bc10fae-e0e8-4236-a1ad-3a1be7c396e8"
                        }
                      ],
                      "createdAt": "2026-07-28T03:11:51.000Z",
                      "updatedAt": "2026-07-28T03:11:51.000Z",
                      "uid": "35240-3e77796e-8cfc-41a0-aaf0-04e071051fbe"
                    }
                  ],
                  "id": "1b82e539-2755-4c21-be3e-d6f46fca1e45",
                  "createdAt": "2026-07-28T03:11:51.000Z",
                  "updatedAt": "2026-07-28T03:11:51.000Z",
                  "uid": "35240-1b82e539-2755-4c21-be3e-d6f46fca1e45"
                },
                {
                  "name": "{modelUuid}",
                  "item": [
                    {
                      "name": "Get AI Model by ID (getAiModelById)",
                      "id": "0b338f20-1847-4053-84ad-7f66f9a5c800",
                      "protocolProfileBehavior": {
                        "disableBodyPruning": true
                      },
                      "request": {
                        "method": "GET",
                        "header": [
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "url": {
                          "raw": "{{baseUrl}}/api/ai/model/:modelUuid",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "api",
                            "ai",
                            "model",
                            ":modelUuid"
                          ],
                          "variable": [
                            {
                              "id": "01e18da2-deec-41ca-b2a1-d3bbd8fb5b08",
                              "key": "modelUuid",
                              "value": "<uuid>",
                              "description": "(Required) ID of the AI model record"
                            }
                          ]
                        },
                        "description": "Fetches an AI model record by its `id`.\n\nAvailable for users with 'TENANT_ADMIN' authority."
                      },
                      "response": [
                        {
                          "id": "1c36255e-8035-494d-9ed9-0fb762521e15",
                          "name": "OK",
                          "originalRequest": {
                            "method": "GET",
                            "header": [
                              {
                                "key": "Accept",
                                "value": "application/json"
                              }
                            ],
                            "url": {
                              "raw": "{{baseUrl}}/api/ai/model/:modelUuid",
                              "host": [
                                "{{baseUrl}}"
                              ],
                              "path": [
                                "api",
                                "ai",
                                "model",
                                ":modelUuid"
                              ],
                              "variable": [
                                {
                                  "key": "modelUuid"
                                }
                              ]
                            }
                          },
                          "status": "OK",
                          "code": 200,
                          "_postman_previewlanguage": "json",
                          "header": [
                            {
                              "key": "Content-Type",
                              "value": "application/json"
                            }
                          ],
                          "cookie": [],
                          "responseTime": null,
                          "body": "{\n  \"name\": \"<string>\",\n  \"tenantId\": {\n    \"entityType\": \"TENANT\",\n    \"id\": \"<uuid>\"\n  },\n  \"version\": 1,\n  \"configuration\": {\n    \"modelId\": \"<string>\",\n    \"provider\": \"<string>\",\n    \"providerConfig\": {\n      \"accessKeyId\": \"<string>\",\n      \"region\": \"<string>\",\n      \"secretAccessKey\": \"<string>\"\n    },\n    \"temperature\": \"<double>\",\n    \"topP\": \"<double>\",\n    \"maxOutputTokens\": \"<integer>\",\n    \"timeoutSeconds\": \"<integer>\",\n    \"maxRetries\": \"<integer>\",\n    \"modelType\": \"CHAT\"\n  },\n  \"id\": {\n    \"entityType\": \"AI_MODEL\",\n    \"id\": \"<uuid>\"\n  },\n  \"createdTime\": \"<long>\"\n}",
                          "createdAt": "2026-07-28T03:11:51.000Z",
                          "updatedAt": "2026-07-28T03:11:51.000Z",
                          "uid": "35240-1c36255e-8035-494d-9ed9-0fb762521e15"
                        }
                      ],
                      "createdAt": "2026-07-28T03:11:51.000Z",
                      "updatedAt": "2026-07-28T03:11:51.000Z",
                      "uid": "35240-0b338f20-1847-4053-84ad-7f66f9a5c800"
                    },
                    {
                      "name": "Delete AI Model by ID (deleteAiModelById)",
                      "id": "273181dc-d5b2-4a37-8f58-505a7afac652",
                      "protocolProfileBehavior": {
                        "disableBodyPruning": true
                      },
                      "request": {
                        "method": "DELETE",
                        "header": [
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "url": {
                          "raw": "{{baseUrl}}/api/ai/model/:modelUuid",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "api",
                            "ai",
                            "model",
                            ":modelUuid"
                          ],
                          "variable": [
                            {
                              "id": "a9665a81-7d00-4c9e-b857-705047487fcc",
                              "key": "modelUuid",
                              "value": "<uuid>",
                              "description": "(Required) ID of the AI model record"
                            }
                          ]
                        },
                        "description": "Deletes the AI model record by its `id`. If a record with the specified `id` exists, the record is deleted and the endpoint returns `true`. If no such record exists, the endpoint returns `false`.\n\nAvailable for users with 'TENANT_ADMIN' authority."
                      },
                      "response": [
                        {
                          "id": "9f25c384-6d32-43d5-8ffb-d3ecbcd6bdb5",
                          "name": "OK",
                          "originalRequest": {
                            "method": "DELETE",
                            "header": [
                              {
                                "key": "Accept",
                                "value": "application/json"
                              }
                            ],
                            "url": {
                              "raw": "{{baseUrl}}/api/ai/model/:modelUuid",
                              "host": [
                                "{{baseUrl}}"
                              ],
                              "path": [
                                "api",
                                "ai",
                                "model",
                                ":modelUuid"
                              ],
                              "variable": [
                                {
                                  "key": "modelUuid"
                                }
                              ]
                            }
                          },
                          "status": "OK",
                          "code": 200,
                          "_postman_previewlanguage": "json",
                          "header": [
                            {
                              "key": "Content-Type",
                              "value": "application/json"
                            }
                          ],
                          "cookie": [],
                          "responseTime": null,
                          "body": "<boolean>",
                          "createdAt": "2026-07-28T03:11:51.000Z",
                          "updatedAt": "2026-07-28T03:11:51.000Z",
                          "uid": "35240-9f25c384-6d32-43d5-8ffb-d3ecbcd6bdb5"
                        }
                      ],
                      "createdAt": "2026-07-28T03:11:51.000Z",
                      "updatedAt": "2026-07-28T03:11:51.000Z",
                      "uid": "35240-273181dc-d5b2-4a37-8f58-505a7afac652"
                    }
                  ],
                  "id": "894452c2-6ff4-4b58-8c68-f01f6ea7eaf2",
                  "createdAt": "2026-07-28T03:11:51.000Z",
                  "updatedAt": "2026-07-28T03:11:51.000Z",
                  "uid": "35240-894452c2-6ff4-4b58-8c68-f01f6ea7eaf2"
                },
                {
                  "name": "Get AI Models (getAiModels)",
                  "id": "cb2ddcb0-7ac1-45af-9cdf-350245b2a031",
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  },
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "url": {
                      "raw": "{{baseUrl}}/api/ai/model?pageSize=<integer>&page=<integer>&textSearch=<string>&sortProperty=modelId&sortOrder=DESC",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "api",
                        "ai",
                        "model"
                      ],
                      "query": [
                        {
                          "description": "(Required) Maximum amount of entities in a one page",
                          "key": "pageSize",
                          "value": "<integer>"
                        },
                        {
                          "description": "(Required) Sequence number of page starting from 0",
                          "key": "page",
                          "value": "<integer>"
                        },
                        {
                          "description": "The case insensitive 'substring' filter based on the AI model name, provider and model ID.",
                          "key": "textSearch",
                          "value": "<string>"
                        },
                        {
                          "description": "Property of entity to sort by",
                          "key": "sortProperty",
                          "value": "modelId"
                        },
                        {
                          "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)",
                          "key": "sortOrder",
                          "value": "DESC"
                        }
                      ]
                    },
                    "description": "Returns a page of AI models. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority."
                  },
                  "response": [
                    {
                      "id": "8381bc12-57da-4425-985c-57d7ce31a48d",
                      "name": "OK",
                      "originalRequest": {
                        "method": "GET",
                        "header": [
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "url": {
                          "raw": "{{baseUrl}}/api/ai/model?pageSize=<integer>&page=<integer>&textSearch=<string>&sortProperty=modelId&sortOrder=DESC",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "api",
                            "ai",
                            "model"
                          ],
                          "query": [
                            {
                              "description": "(Required) Maximum amount of entities in a one page",
                              "key": "pageSize",
                              "value": "<integer>"
                            },
                            {
                              "description": "(Required) Sequence number of page starting from 0",
                              "key": "page",
                              "value": "<integer>"
                            },
                            {
                              "description": "The case insensitive 'substring' filter based on the AI model name, provider and model ID.",
                              "key": "textSearch",
                              "value": "<string>"
                            },
                            {
                              "description": "Property of entity to sort by",
                              "key": "sortProperty",
                              "value": "modelId"
                            },
                            {
                              "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)",
                              "key": "sortOrder",
                              "value": "DESC"
                            }
                          ]
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "_postman_previewlanguage": "json",
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "cookie": [],
                      "responseTime": null,
                      "body": "{\n  \"data\": [\n    {\n      \"name\": \"<string>\",\n      \"tenantId\": {\n        \"entityType\": \"TENANT\",\n        \"id\": \"<uuid>\"\n      },\n      \"version\": 1,\n      \"configuration\": {\n        \"modelId\": \"<string>\",\n        \"provider\": \"<string>\",\n        \"providerConfig\": {\n          \"accessKeyId\": \"<string>\",\n          \"region\": \"<string>\",\n          \"secretAccessKey\": \"<string>\"\n        },\n        \"temperature\": \"<double>\",\n        \"topP\": \"<double>\",\n        \"maxOutputTokens\": \"<integer>\",\n        \"timeoutSeconds\": \"<integer>\",\n        \"maxRetries\": \"<integer>\",\n        \"modelType\": \"CHAT\"\n      },\n      \"id\": {\n        \"entityType\": \"AI_MODEL\",\n        \"id\": \"<uuid>\"\n      },\n      \"createdTime\": \"<long>\"\n    },\n    {\n      \"name\": \"<string>\",\n      \"tenantId\": {\n        \"entityType\": \"TENANT\",\n        \"id\": \"<uuid>\"\n      },\n      \"version\": 1,\n      \"configuration\": {\n        \"modelId\": \"<string>\",\n        \"provider\": \"<string>\",\n        \"providerConfig\": {\n          \"accessKeyId\": \"<string>\",\n          \"region\": \"<string>\",\n          \"secretAccessKey\": \"<string>\"\n        },\n        \"temperature\": \"<double>\",\n        \"topP\": \"<double>\",\n        \"maxOutputTokens\": \"<integer>\",\n        \"timeoutSeconds\": \"<integer>\",\n        \"maxRetries\": \"<integer>\",\n        \"modelType\": \"CHAT\"\n      },\n      \"id\": {\n        \"entityType\": \"AI_MODEL\",\n        \"id\": \"<uuid>\"\n      },\n      \"createdTime\": \"<long>\"\n    }\n  ],\n  \"totalPages\": \"<integer>\",\n  \"totalElements\": \"<long>\",\n  \"hasNext\": \"<boolean>\"\n}",
                      "createdAt": "2026-07-28T03:11:51.000Z",
                      "updatedAt": "2026-07-28T03:11:51.000Z",
                      "uid": "35240-8381bc12-57da-4425-985c-57d7ce31a48d"
                    }
                  ],
                  "createdAt": "2026-07-28T03:11:51.000Z",
                  "updatedAt": "2026-07-28T03:11:51.000Z",
                  "uid": "35240-cb2ddcb0-7ac1-45af-9cdf-350245b2a031"
                },
                {
                  "name": "Create or Update AI Model (saveAiModel)",
                  "id": "adcd5d6b-03eb-4206-8236-ea1605880da3",
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  },
                  "request": {
                    "method": "POST",
                    "header": [
                      {
                        "key": "Content-Type",
                        "value": "application/json"
                      },
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "body": {
                      "mode": "raw",
                      "raw": "{\n  \"name\": \"<string>\",\n  \"tenantId\": {\n    \"entityType\": \"TENANT\",\n    \"id\": \"<uuid>\"\n  },\n  \"version\": 1,\n  \"configuration\": {\n    \"modelId\": \"<string>\",\n    \"provider\": \"<string>\",\n    \"providerConfig\": {\n      \"accessKeyId\": \"<string>\",\n      \"region\": \"<string>\",\n      \"secretAccessKey\": \"<string>\"\n    },\n    \"temperature\": \"<double>\",\n    \"topP\": \"<double>\",\n    \"maxOutputTokens\": \"<integer>\",\n    \"timeoutSeconds\": \"<integer>\",\n    \"maxRetries\": \"<integer>\",\n    \"modelType\": \"CHAT\"\n  },\n  \"id\": {\n    \"entityType\": \"AI_MODEL\",\n    \"id\": \"<uuid>\"\n  },\n  \"createdTime\": \"<long>\"\n}",
                      "options": {
                        "raw": {
                          "headerFamily": "json",
                          "language": "json"
                        }
                      }
                    },
                    "url": {
                      "raw": "{{baseUrl}}/api/ai/model",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "api",
                        "ai",
                        "model"
                      ]
                    },
                    "description": "Creates or updates an AI model record.\n\n\u2022 **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.\n\n\u2022 **Update:** Include an existing `id` to modify that record. If no matching record exists, the API responds with **404 Not Found**.\n\nTenant ID for the AI model will be taken from the authenticated user making the request, regardless of any value provided in the request body.\n\nAvailable for users with 'TENANT_ADMIN' authority."
                  },
                  "response": [
                    {
                      "id": "402d4e01-aa78-4830-bbb1-b36b7e4581cc",
                      "name": "OK",
                      "originalRequest": {
                        "method": "POST",
                        "header": [
                          {
                            "key": "Content-Type",
                            "value": "application/json"
                          },
                          {
                            "key": "Accept",
                            "value": "application/json"
                          }
                        ],
                        "body": {
                          "mode": "raw",
                          "raw": "{\n  \"name\": \"<string>\",\n  \"tenantId\": {\n    \"entityType\": \"TENANT\",\n    \"id\": \"<uuid>\"\n  },\n  \"version\": 1,\n  \"configuration\": {\n    \"modelId\": \"<string>\",\n    \"provider\": \"<string>\",\n    \"providerConfig\": {\n      \"accessKeyId\": \"<string>\",\n      \"region\": \"<string>\",\n      \"secretAccessKey\": \"<string>\"\n    },\n    \"temperature\": \"<double>\",\n    \"topP\": \"<double>\",\n    \"maxOutputTokens\": \"<integer>\",\n    \"timeoutSeconds\": \"<integer>\",\n    \"maxRetries\": \"<integer>\",\n    \"modelType\": \"CHAT\"\n  },\n  \"id\": {\n    \"entityType\": \"AI_MODEL\",\n    \"id\": \"<uuid>\"\n  },\n  \"createdTime\": \"<long>\"\n}",
                          "options": {
                            "raw": {
                              "headerFamily": "json",
                              "language": "json"
                            }
                          }
                        },
                        "url": {
                          "raw": "{{baseUrl}}/api/ai/model",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "api",
                            "ai",
                            "model"
                          ]
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "_postman_previewlanguage": "json",
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "cookie": [],
                      "responseTime": null,
                      "body": "{\n  \"name\": \"<string>\",\n  \"tenantId\": {\n    \"entityType\": \"TENANT\",\n    \"id\": \"<uuid>\"\n  },\n  \"version\": 1,\n  \"configuration\": {\n    \"modelId\": \"<string>\",\n    \"provider\": \"<string>\",\n    \"providerConfig\": {\n      \"accessKeyId\": \"<string>\",\n      \"region\": \"<string>\",\n      \"secretAccessKey\": \"<string>\"\n    },\n    \"temperature\": \"<double>\",\n    \"topP\": \"<double>\",\n    \"maxOutputTokens\": \"<integer>\",\n    \"timeoutSeconds\": \"<integer>\",\n    \"maxRetries\": \"<integer>\",\n    \"modelType\": \"CHAT\"\n  },\n  \"id\": {\n    \"entityType\": \"AI_MODEL\",\n    \"id\": \"<uuid>\"\n  },\n  \"createdTime\": \"<long>\"\n}",
                      "createdAt": "2026-07-28T03:11:51.000Z",
                      "updatedAt": "2026-07-28T03:11:51.000Z",
                      "uid": "35240-402d4e01-aa78-4830-bbb1-b36b7e4581cc"
                    }
                  ],
                  "createdAt": "2026-07-28T03:11:51.000Z",
                  "updatedAt": "2026-07-28T03:11:51.000Z",
                  "uid": "35240-adcd5d6b-03eb-4206-8236-ea1605880da3"
                }
              ],
              "id": "64574059-d9df-42bd-9eec-0e3db16cd4fb",
              "createdAt": "2026-07-28T03:11:51.000Z",
              "updatedAt": "2026-07-28T03:11:51.000Z",
              "uid": "35240-64574059-d9df-42bd-9eec-0e3db16cd4fb"
            }
          ],
          "id": "bfbd93e0-9d01-4068-86a1-bd0580629bff",
          "createdAt": "2026-07-28T03:11:51.000Z",
          "updatedAt": "2026-07-28T03:11:51.000Z",
          "uid": "35240-bfbd93e0-9d01-4068-86a1-bd0580629bff"
        }
      ],
      "id": "a6b5f3bf-b709-43d6-a6b4-53a1693813b0",
      "createdAt": "2026-07-28T03:11:51.000Z",
      "updatedAt": "2026-07-28T03:11:51.000Z",
      "uid": "35240-a6b5f3bf-b709-43d6-a6b4-53a1693813b0"
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://demo.thingsboard.io"
    }
  ]
}