Skip to content

Product Description Generation

PRICING

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:

  1. Quickly generate SEO-optimized product descriptions at scale
  2. Ensure consistent brand voice and style across all your product descriptions
  3. Enhance product discovery by including relevant keywords and product attributes

This service's API has one endpoint running at this URL:

https://api.ximilar.com/product-description/v2/generate

Service is in BETA

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. Be aware that using this service requires at least a business plan.

Features of the API

  • You can provide product information, tags, seo keywords, texts and desired writing style
  • If images are provided, the service will analyze them to extract relevant features to include in the description. This is done via Fashion Tagging or our Flows systems.
  • The system for generating product descriptions can be tuned for you.

Product description generation endpoint: /v2/generate

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.

Max batch processing

Maximum number of records per request is 10.

Supported style names

Right now you can specify following style names product-short and product-medium. More styles will be available in future. If you want to have your own style, feel free to contact us at care@ximilar.com and we will create your own style which will be applied via style_id.

Parameters:

  • records: list of product records to generate descriptions for
    • product_info (required): any relevant product information in dictionary
    • product_type (required): the product type defined by customer (Fashion, Home Decor, Real Estate, ...)
    • must contain either style_name or style_id to specify the writing style
    • _url (optional) or _urls (optional) or _base64: if single image URL (str) is provided, or multiple (list)
    • tagging_type (optional): type of tagging (fashion, home-decor, gpt) for generating relevant keywords for description
    • flow_id with flow_field (optional): if specified the flow will be called and output from flow_field of the flow will be used for product description.
    • Top Category (optional) and Category: (optional) : when multiple products are visible in photos, it helps us focus on the right one (see our fashion taxonomy or home decor taxonomy for more details). In similar way you can provide Category.
    • _tags_map (optional): dictionary mapping of features and tags (usually from our tagging systems)

$ 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"
        }
    ]
}'

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:
    • status - a JSON map with a status of the method processing. It contains these subfields:
      • code - a numeric code of the operation status; it follows the concept of HTTP status codes (2XX, 4XX). Specific codes are described for each type of answer (or operation) (see below).
      • text - a text describing the status code
    • records - JSON array with the input records, each record enriched by field product_description.
CLICK TO SHOW JSON RESULT

{
    "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
    }
}