Scene Recommendation and Query API Reference
Image Background Query
POST
/ai/image/background/generation/scene/query
We have many different styles of scenes, and users can choose their desired scenes freely. Through this API, users can get automatically recommended scenes by providing product information. Additionally, users can query pre-set scenes, and this API can return information including scene ID, name, cover image, tags, etc.
Request Parameters
productTitle
String
No
Recommended scenes based on the provided product title. Only product titles in Chinese or English are supported.
imageUrl
String
No
Recommended scenes based on the provided product image.
categoryType
String
No
Query scenes based on a specified product category. Currently, 11 product categories are supported. If not set, the default is to query scenes for all categories.
Value range:
1=General Purpose; 2=Consumer Electronics; 3=Home & Garden; 4=Automobiles, Parts & Accessories; 5=Computer & Office; 6=Sports & Entertainment; 7=Clothing; 8=Beauty & Health; 9=Tools; 10=Toys & Hobbies; 11=Phones & Telecommunications
sceneType
String
No
Query scenes based on a specified scene type. Currently, 4 types of scenes are supported. If not set, the default is to query scenes of all types.
Value range:
1=Indoor; 2=Outdoor; 3=Atmosphere; 4=Promotion
count
Number
No
The maximum number of scenes to return. If not set, the default is to return all queried amounts.
Value range: 1-100.
Sample Request
Response Parameters
resCode
Number
The returned result code, where 200 indicates success. For detailed error codes, please refer to the error code list.
requestId
String
A unique request ID used for troubleshooting.
data
Object
The returned JSON result data.
modelNum
String
The unique ID code of the scene.
coverUrl
String
The cover image corresponding to the scene.
name
String
The name of the scene.
categoryNameList
list
Scene applicable category tags. A single scene may correspond to multiple category tags.
sceneNameList
list
Scene type tags. A single scene may correspond to multiple type tags.
success
Boolean
The status of the returned request, indicating whether the request was successful.
resMessage
String
The returned request information.
Sample Response
Errors
500
system error
System error.
501
rate limit exceed
The current interface has reached the current limit. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) to increase the current limit value.
700
invalid input
The format of the input parameters does not meet the requirements, and resMessage will return detailed fields that do not meet the requirements.
801
model failed
Internal call exception, please contact us contact us via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting.
1000
content has sensitive data, please try other input
Content has sensitive data and cannot be handled now. Please try other input.
1001
content control failed, please retry
Content risk failed, please try other input.
1002
content risk filter failed, please contact us
Content risk failed, please try other input. If an error persists,please contact us via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting.
Last updated