上传图片自动移除背景,返回透明背景的抠图结果URL。
上传图片自动移除背景,返回透明背景的抠图结果URL。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| image | file | 是 | 需要抠图的图片文件 |
[
{
"name": "image",
"type": "file",
"required": true,
"description": "需要抠图的图片文件",
"example": ""
}
]{"openapi":"3.1.1","info":{"title":"AI抠图","description":"上传图片自动移除背景,返回透明背景的抠图结果URL。","version":"1.0.0"},"paths":{"/apis/gateway?api=aimatu":{"get":{"summary":"AI抠图","description":"上传图片自动移除背景,返回透明背景的抠图结果URL。","parameters":[{"name":"image","in":"query","required":true,"schema":{"type":"string"},"description":"需要抠图的图片文件"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"AI抠图","description":"上传图片自动移除背景,返回透明背景的抠图结果URL。","parameters":[{"name":"image","in":"query","required":true,"schema":{"type":"string"},"description":"需要抠图的图片文件"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"servers":[{"url":"https://api.souxiaocha.com","description":"当前访问入口(https)"}]}
{"success":true,"data":{"url":"https:\/\/...","format":"webp"}}https://api.souxiaocha.com/apis/gateway?api=aimatuGET https://api.souxiaocha.com/apis/gateway?api=aimatu apikey=你的API密钥&image=请填写image
GET 参数放在查询字符串中。参数值请替换为实际有效值。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
image | file | 是 | 需要抠图的图片文件 |
{"success":true,"data":{"url":"https:\/\/...","format":"webp"}}上传图片自动移除背景,返回透明背景的抠图结果URL。
https://api.souxiaocha.com/apis/gateway?api=aimatu
GET / POST(业务参数 GET 通过 URL 传递,POST 支持表单或 JSON)
调用需携带平台密钥(用户中心「令牌管理」获取,SK- 开头):
key=SK-你的密钥X-API-Key: SK-你的密钥| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| image | file | 是 | 需要抠图的图片文件 |
[
{"name": "image", "type": "file", "required": true, "description": "需要抠图的图片文件"}
]
成功返回示例:
{"success":true,"data":{"url":"https:\/\/...","format":"webp"}}
失败返回示例:
{"success":false,"error":"missing_image","message":"请上传图片文件"}
| 参数名 | 类型 | 说明 |
|---|---|---|
| success | boolean | 请求是否成功 |
| data.url | string | 抠图结果图片URL |
| data.format | string | 输出webp格式 |
| generated_at | string | 数据生成时间 |
curl "https://api.souxiaocha.com/apis/gateway?api=aimatu?key=SK-你的密钥"
上游业务级错误:
| code | msg | 描述 |
|---|---|---|
| 400 | missing_image | 缺少图片 |
| 400 | image_too_large | 图片超10M或尺寸超4096px |
| 405 | method_not_allowed | 仅支持POST |
| 500 | api_request_failed | 请求异常 |
| 502 | query_failed | 抠图失败 |
平台级错误(errcode):11001 缺少密钥 / 11002 密钥无效或已禁用 / 11005 接口禁用 / 11006 接口维护 / 11010 积分不足 / 11018 请求方式不允许。
失败时请以响应体中的 code / errcode 与 msg 判断。
2026-09-24
curl "https://api.souxiaocha.com/apis/gateway?api=aimatu?key=SK-你的密钥"
// 结果将在此处显示