LinkfoxAI agent and documentation index

Fetch the complete documentation index at: /llms.txt

Read when and how to use LinkfoxAI at: /agent-instructions.txt

Machine-readable API description: LinkfoxAI OpenAPI specification

Use this file to discover all available pages before exploring further.

LinkfoxAI logo
开始使用
API对接文档

套图类目识别

根据 1 至 3 张商品图片自动识别套图类目。接口先创建异步任务,再通过结果接口轮询;任务执行会先分析商品图,再匹配平台类目并返回完整类目路径。

外部图片仅用于本次识别,接口不会把图片登记到用户的图片素材库。调用方应在任务执行期间保持图片地址可访问。

创建识别任务

POST/v2/process/result/suiteCategory/recognizeapplication/json

请求体

businessFuncIdinteger必填
具体业务类型:商品套图传 71,服装套图传 69;其他值会被拒绝。
imageUrlsarray[string]必填
商品图片 HTTP/HTTPS 地址,数量为 1 至 3 张。建议同时上传商品正面、侧面或细节图,以提高识别准确率。

请求示例

JSON
{
  "businessFuncId": 71,
  "imageUrls": [
    "https://example.com/product-front.jpg",
    "https://example.com/product-side.jpg"
  ]
}

提交后返回什么

data.id 是 32 位任务编号,请保存它并查询原任务。创建成功后 data.status=2 表示任务正在执行。data.type 为服务端异步任务类型,当前固定为 29(历史示例曾写作 27;27/28 已分配给视频分镜相关任务)。查询结果请使用专用 /suiteCategory/info 接口,不要按通用 /async/result/{type}/info 路径拼装。

JSON
{
  "code": 200,
  "msg": "成功",
  "data": {
    "id": "5f28a6b05db34fcf9b35a2bc7b44d4d8",
    "type": 29,
    "status": 2
  }
}

查询识别结果

POST/v2/process/result/suiteCategory/infoapplication/json

使用与创建任务相同的团队和用户身份查询,仅允许读取本团队、本用户创建的任务。请按合理间隔轮询,每次查询至少间隔 10 秒。

请求体

idstring必填
创建识别任务返回的 32 位 data.id。

请求示例

JSON
{
  "id": "5f28a6b05db34fcf9b35a2bc7b44d4d8"
}

任务状态

1integer
任务已创建。
2integer
任务执行中。
3integer
识别成功,读取 data.result.category。
4integer
识别失败,读取 data.error。常见原因包括图片不可访问、未识别到类目或算法服务暂时不可用。

返回示例

JSON
{
  "code": 200,
  "msg": "成功",
  "data": {
    "id": "5f28a6b05db34fcf9b35a2bc7b44d4d8",
    "type": 29,
    "status": 3,
    "result": {
      "category": {
        "categoryId": "16261641",
        "name": "Cell Phones & Accessories",
        "path": "Cell Phones & Accessories > Cases > Basic Cases",
        "pathKey": "......",
        "idPath": "16261631,16261641,...",
        "l1Id": "16261641",
        "l1Name": "Cell Phones & Accessories",
        "level": 3,
        "version": "ai_suite_category"
      }
    },
    "error": null
  }
}

识别结果字段

category.categoryIdstring
命中的 Amazon 类目节点 ID。可直接作为商品套图或服装套图的 categoryId。
category.namestring
命中类目名称。
category.pathstring
完整的可读类目路径,以 > 分隔。
category.pathKeystring
完整类目路径的稳定标识。同一 Amazon 节点存在多条路径时,可用它区分具体类目路径;提交套图时应传给 categoryPathKey。
category.idPathstring
从根节点到命中节点的完整 Amazon 类目 ID 路径。
category.l1Idstring
实际一级类目的 Amazon 节点 ID,不等于 XML 中的虚拟根节点 ID。
category.l1Namestring
实际一级类目名称。
category.levelinteger
业务层级,从 1 开始。
category.versionstring
类目数据版本,当前固定为 ai_suite_category。

调用说明

识别成功后,应将 category.categoryId 与 category.pathKey 一并带入套图请求的 categoryId 和 categoryPathKey,避免只依赖类目名称导致路径歧义。用户仍需可以在客户端修改识别结果。

该接口每次创建识别任务扣减 2 点,任务失败自动回补;查询识别结果不额外扣点。仍受开放平台身份、套餐状态及接口限流校验。