Manage AI Insight
Manage AI Insight
This page covers binding AI Insight packages on overseas data centers, reading and updating detection switches and device language, and maintaining the face library when face rights are enabled. See AI Insight packages for strategyId, entitlements, and cloud storage; HTTP fields are on each AI Insight API method page.
Recommended order
Check quota or inventory → bindDeviceAiInsight → queryDeviceAiInsight / queryDeviceAiInsightList → switches / activate → setDeviceAiLanguage and face APIs when needed.
Server-side responsibilities
- Packages and quota: Prepare packages, inventory, and
strategyIdin the developer console before callingbindDeviceAiInsight; do not embed package IDs in client apps. - Switches and language: Call
setDeviceAiInsightSwitchandsetDeviceAiLanguagefrom your server; effective switches come fromqueryDeviceAiInsight/queryDeviceAiInsightList. - Face library: Requires face entitlement on the package and
faceSwitchon the channel; use the face APIs in the same module; see each method page for display avatar fields.
Prerequisites
Devices are registered; enable cloud storage or smart event cloud storage when your product needs linked recordings. Obtain tokens as in First API call.
Enable a package
| Scenario | Query first | Bind |
|---|---|---|
| New bind using account quota | queryAiInsightCount — callNum > 0 | bindDeviceAiInsight with strategyId |
| Bind from account inventory | queryUnusedAiInsightList for deviceAiInsightId | bindDeviceAiInsight with deviceAiInsightId |
When the channel already has packages, use activateNow on the bind page or activateDeviceAiInsight for queue vs immediate activation.
Overseas optional fields: language and detection / face switches (shared with AI Insight cloud storage on the channel). See bind and setDeviceAiInsightSwitch.
Query
- queryDeviceAiInsight — first non-expired package by start time (includes language and switch fields); see that page for
strategyStatussemantics. - queryDeviceAiInsightList — in-use and queued packages with
useSwitch.
Switches and language
- setDeviceAiInsightSwitch —
useSwitchto enable or pause; optional detection and face switches. - setDeviceAiLanguage — change channel AI language after enablement.
Unbind
unbindDeviceAiInsight — returns the package to developer inventory.
Face library (optional)
When the plan includes face rights and the channel face switch is on, use face APIs in the same module (module index, section 2): listAiInsightFeature / listAiInsightUnknownFace, then addAiInsightFeature, etc.
