> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ch88.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 商品分析与 A+ 策划

> 两个同步 AI 接口的适用场景、输入输出和串联方式

商品 AI 分析和 A+ AI 策划均为同步接口：HTTP 请求会在结果准备完成后返回，不需要查询任务状态。客户端超时时间建议设置为至少 120 秒。

## 商品 AI 分析

商品分析根据 1 至 16 张商品图片，返回结构化商品事实与内容策划依据。

```bash theme={null}
curl --request POST \
  --url 'https://api.ch88.cn/v1/open/product-analysis' \
  --header 'Authorization: Bearer <PUBLIC_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "product_name": "保湿精华液",
    "image_urls": [
      "https://api.ch88.cn/v1/linggan/media/assets/generated%2Fopen-upload%2Fexample-front.png"
    ]
  }'
```

响应包含两种使用方式：

* `analysis`：结构化 JSON，适合程序继续处理。
* `formattedText` / `output_text`：格式化文本，适合直接展示、编辑或作为后续简报。

`analysis.attributes[].evidence` 的含义：

| 值          | 含义                      |
| ---------- | ----------------------- |
| `visible`  | 从商品图片中可以直接看见。           |
| `provided` | 由客户输入明确提供。              |
| `inferred` | AI 根据现有材料合理推断，使用前应人工确认。 |

## A+ AI 策划

A+ 策划需要至少一张商品图片和至少一个模块标识。建议把商品分析结果整理成 `product_description` 传入。

```bash theme={null}
curl --request POST \
  --url 'https://api.ch88.cn/v1/open/aplus/plans' \
  --header 'Authorization: Bearer <PUBLIC_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "product_description": "一款滴管瓶装保湿精华液，主打清爽日常保湿。",
    "image_urls": [
      "https://api.ch88.cn/v1/linggan/media/assets/generated%2Fopen-upload%2Fexample-front.png"
    ],
    "modules": ["hero970", "core", "usage"],
    "platform": "Amazon",
    "market": "US",
    "language": "zh-CN"
  }'
```

策划成功后：

* 将 `modules[].recommended_prompt` 传给对应 A+ 生图请求的 `plan_prompt`。
* 将 `global_style` 传给每个 A+ 生图请求的 `series_style_guide`。
* 人工检查 `notes`，确认产品事实、平台规则和合规限制。

## 支持的 A+ 模块

| 模块标识          | 中文用途      | 默认目标尺寸   |
| ------------- | --------- | -------- |
| `hero`        | 高级首屏主视觉   | 1464×600 |
| `hero970`     | 标准首屏主视觉   | 970×600  |
| `core`        | 核心卖点图     | 970×600  |
| `usage`       | 使用场景图     | 970×600  |
| `angles`      | 多角度图      | 970×600  |
| `mood`        | 场景氛围图     | 970×600  |
| `detail`      | 商品细节图     | 970×600  |
| `brand`       | 品牌故事图     | 463×625  |
| `size`        | 尺寸/容量/尺码图 | 220×220  |
| `compare`     | 效果对比图     | 150×300  |
| `specs`       | 详细规格/参数表  | 970×600  |
| `process`     | 工艺制作图     | 970×600  |
| `accessories` | 配件/赠品图    | 970×600  |
| `series`      | 系列展示图     | 970×600  |
| `ingredients` | 商品成分图     | 970×600  |
| `care`        | 使用与保养说明   | 970×600  |
| `tips`        | 使用建议图     | 600×450  |
