商品图片上传 API
POST /v1/products/upload-image — 向卖场上传图片,获得 image_id 供 以图搜 复用。
请求体
| 字段 | 必填 | 说明 |
|---|---|---|
channel | Yes | 1688 | taobao |
image_base64 | One of | Base64 图片(会去掉 data-URL 前缀)。淘宝 必填。 |
image_url | 1688 only | 公网 URL;省略 base64 时由服务端拉取 |
示例
POST /v1/products/upload-image
{
"channel": "1688",
"image_base64": "/9j/4AAQSkZJRg..."
}响应
{
"channel": "1688",
"image_id": "img_1234567890",
"request_id": "req_..."
}