1简介
1.1服务能力简介
天幕「图像识别」专为解决图像识别痛点而生,通过AI特征识别解析技术,实现图片内容的精准识别。用户仅需输入一张图片,模型即可根据客户要求完成参考主体识别、参考姿势识别、参考边缘识别、参考景深识别。
1.2效果展示
|
输入图片 |
效果图片 |
|
|
|
2Prompt engine
不涉及
3API接入
3.1请求地址(POST 请求)
https://open-api.wondershare.cc/v1/open/capacity/application/tm_reference_img2mask
3.2请求参数
Headers
|
参数名称 |
参数值 |
是否必须 |
示例 |
备注 |
|
Content-Type |
application/json |
是 |
|
|
|
X-App-Key |
{app_key} |
是 |
xxxxxx |
分配的appkey |
|
Authorization |
Basic {access_token} |
是 |
Basic xxx |
安全验证信息,格式为:Basic {access_token},其中access_token为令牌,通过给的app_key和app_secret生产,生成方式为:base64(app_key:app_secret) |
body:
|
名称 |
类型 |
是否必须 |
默认值 |
备注 |
|
callback |
string |
非必须 |
|
算法结果回调url地址:例如 http://www.wondershare.cn |
|
params |
string |
非必须 |
|
透明参数 |
|
template_info |
object [] |
必须 |
|
|
|
|-input_params |
object |
必须 |
|
|
|
|-control_type |
string |
必须 |
|
输入控制类型。支持: 0 - 轮廓控制(边缘); 1 - 姿势控制; 2 - 角色控制(主体); 3 - 景深控制 |
|
|-init_image |
string |
必须 |
|
图像 url 地址。支持格式 jpg/png |
|
|-template_id |
string |
必须 |
|
模板。仅支持 tm_reference_img2mask_template_spatial |
3.3返回数据
|
名称 |
类型 |
是否必须 |
默认值 |
备注 |
|
code |
number |
必须 |
|
错误码 |
|
msg |
string |
必须 |
|
错误文案 |
|
data |
object |
非必须 |
|
|
3.3 请求示例
curl --location --request POST 'https://open-api.wondershare.cc/v1/open/capacity/application/tm_reference_img2mask' \
--header 'X-App-Key: XXXXXX' \
--header 'Authorization: Basic XXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
"template_info": [
{
"input_params": {
"init_image": "URL",
"control_type": "0",
"template_id": "tm_reference_img2mask_template_spatial"
}
}
]
}'
3.4 响应结果
-
创建任务接口返回结果:
{
"code": 0,
"msg": "",
"data": {
"task_id": "tm_reference_img2mask_cloud-2-2025102820520165b6a3251fdd27b204"
}
}




