---
title: "Cua Classify"
method: POST
path: "/cua/classify"
---

# Cua Classify

`POST /cua/classify`

## Request

- Base URL: `https://aihcc.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://aihcc.cloud/cua/classify`
- Auth: none declared

纯 API 动作风险分级。外部用户无需安装 cua 包即可检测自己 agent 的安全：
POST 一段动作轨迹 → 返回逐步 L0-L3 裁决 + 汇总。与运行时 ActionGate 同规则。

两种输入方式（互斥）：
1. actions 数组：直接传动作列表（JSON 数组格式）
2. trace 字符串：传原始 trace（自动识别格式），支持 json_array/jsonl/claude_code/
   langchain/react/langsmith/openai_agents/dify 格式

宽松输入：每条 action 可只给 ``{x, y}`` 坐标式点击、pyautogui 风格动作名
（press/hotkey/write/typewrite/move/doubleclick…）或 ReAct 风格 ``action_input``，
经 cua.bridge.record_from_step 归一化为内部 ActionRecord 后再分级——响应里回显
归一化后的字段，方便看出 {x,y} 被推断成了 click。

## Request body

- CuaClassifyRequest
  - `actions` CuaClassifyAction[], nullable
    - `action` string
    - `x` number, nullable
    - `y` number, nullable
    - `coordinate` integer[], nullable
    - `action_input` string
    - `text` string
    - `target_app` string
    - `app` string
    - `target_element` string
    - `element` string
    - `target_path` string
    - `path` string
    - `target_url` string
    - `url` string
    - `thought` string
    - `task_scope` object, nullable
    - `chain_id` string
    - `agent_id` string
    - `parent_agent_id` string
    - `delegation_depth` integer
  - `trace` string, nullable
  - `format` string
  - `session_id` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/aihcc/apis/hallucc-api.md) · [All operations](https://skmtc.dev/aihcc/apis/hallucc-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aihcc/apis/hallucc-api/revisions/5818dff6d4c6?raw)
