Product Description Generation
In order to get access to the Product Description Generation service, please register at https://app.ximilar.com and then contact us at tech@ximilar.com. This service is available only in Business and Professional pricing plans.
This page describes the API for automatically generating product descriptions based on product information and optional product images. The API follows the general rules of the Ximilar API as described in the section First steps.
This service can automatically generate compelling product descriptions for e-commerce based on product information and optional product images. Some example use cases:
- Quickly generate SEO-optimized product descriptions at scale
- Ensure consistent brand voice and style across all your product descriptions
- Enhance product discovery by including relevant keywords and product attributes
If you are looking for a more detailed analysis of product descriptions, e.g.:
- you want to customize the writing style for your brand
- you need specific features or attributes in your descriptions
- you want to integrate with other Ximilar services
Then please contact us at care@ximilar.com and we can create a customized solution for you.
Endpoints
This service API has one endpoint running at this URL:
https://api.ximilar.com/product-description/v2/generate
Generate Product Description
Given a list of product records containing product information and optional image URLs, this method generates unique product descriptions for each record. If image URLs are provided and a tagging_type
is specified, it first analyzes the product images using Ximilar's product tagging models to extract relevant attributes to include in the description. It then generates descriptions incorporating the product info and any extracted image tags, written in the specified style.
Maximum number of records per request is 10.
Required attributes
- Name
records
- Type
- array
- Description
List of product records to generate descriptions for
- Name
product_info
- Type
- object
- Description
Any relevant product information in dictionary
- Name
product_type
- Type
- string
- Description
The product type defined by customer (Fashion, Home Decor, Real Estate, ...)
- Name
style_name
- Type
- string
- Description
Writing style name (e.g. 'product-short', 'product-medium')
Optional attributes
- Name
_url
- Type
- string
- Description
Single image URL
- Name
_urls
- Type
- array
- Description
Multiple image URLs
- Name
_base64
- Type
- string
- Description
Base64 encoded image
- Name
tagging_type
- Type
- string
- Description
Type of tagging ('fashion', 'home-decor', 'gpt') for generating relevant keywords for description
- Name
flow_id
- Type
- string
- Description
If specified the flow will be called and output from flow_field of the flow will be used for product description
- Name
flow_field
- Type
- string
- Description
Field from flow output to use for product description
- Name
Top Category
- Type
- string
- Description
When multiple products are visible in photos, it helps us focus on the right one
- Name
Category
- Type
- string
- Description
Category of the product
- Name
_tags_map
- Type
- object
- Description
Dictionary mapping of features and tags (usually from our tagging systems)
Returns
HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed. Body of the response is a JSON object (map) with the following fields:
- Name
records
- Type
- array
- Description
JSON array with the input records, each record enriched by field
product_description
- Name
status
- Type
- object
- Description
A JSON map with a status of the method processing. It contains these subfields:
code
(numeric code of the operation status) andtext
(text describing the status code)
Request
curl https://api.ximilar.com/product-description/v2/generate -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
"records": [
{
"_url": "__IMG_URL__",
"product_type": "Fashion",
"product_info": {
"brand": "Your Brand",
"material": "100% leather",
"color": "yellow",
"size": "10",
"seo_keywords": [
"yellow pumps",
"luxury"
]
},
"style_name": "product-medium",
"tagging_type": "fashion",
"Top Category": "Footwear",
"Category": "Footwear/Pumps"
}
]
}'
Response
{
"records": [
{
"_url": "__IMG_URL__",
"product_type": "Fashion",
"product_info": {
"brand": "Your Fashion Brand",
"material": "100% leather",
"color": "yellow",
"size": "10",
"seo_keywords": [
"yellow pumps",
"luxury"
]
},
"style_name": "product-medium",
"tagging_type": "fashion",
"Top Category": "Footwear",
"Category": "Footwear/Sneakers",
"_status": {
"code": 200,
"text": "OK",
"request_id": "9ce0c2f8-7a0d-4d72-bad7-bd62cff35891"
},
"_id": "ad14e58e-9efc-4d3a-8ddf-c567f5087621",
"_tags_map": {
"Color": "yellow",
"Gender": "women",
"Material": "leather/faux leather shoes",
"Style": "elegant",
"Height": "low shoes",
"Heel shape": "stiletto",
"Heel height": "high",
"Category": "Footwear/Sneakers",
"Top Category": "Footwear"
},
"product_description": {
"title": "Yellow Stiletto Pumps",
"description": "Crafted in luxurious 100% leather, these elegant yellow stiletto pumps are designed for women with a taste for luxury. The low shoes feature a high stiletto heel, making them a stylish choice for any occasion. With a vibrant yellow hue, these pumps exude sophistication and glamour, perfect for those seeking a touch of luxury in their footwear collection. Ideal for adding a pop of color to your ensemble, these yellow pumps are a must-have for fashion-forward individuals."
}
}
],
"status": {
"code": 200,
"text": "OK",
"request_id": "9ce0c2f8-7a0d-4d72-bad7-bd62cff35891",
"proc_id": "35965f5f-4082-4e68-83ca-4c6351ea109d"
},
"statistics": {
"processing time": 3.5042316913604736
}
}