Text generation

post /text/generate
This method processes a request for text generation for single or multiple (bulk) records based on the parameters provided. The input includes details such as the product or category type, store information, language, tones, style, audience, keywords, and other product-specific details. The generated text may include tone, semantic keywords, and attributes. The response contains a request ID that may be used to query the status of the generation on GET /text/generate/bulk/{id}.

Requirements

Authentication Required
Bearer access_token
Request Headers
Authorization: Bearer access_token
Parameter Name Type Description
type string, required Specifies the type of record the text should be generated for. Must be either "Product" or "Category."
storeId string, optional Store ID associated with the record(s).
language string, optional The language output of the generated text. In ISO 639-1 code with optional culture/country identifier (e.g. "en", "en-US").
countries string, optional List of countries that are the target audience for the generated text. In ISO 3166 alpha-2 (two letter) code (e.g. "US", "GB").
specialInstructions string, optional Additional instructions (prompt) that you may want to include. This is a premium-only feature.
ipAddress string IP address of the client/browser if you wish to record it.
recordId string, required Unique identifier of the product or category.
name string Product or Category name (maximum of 100 characters).
sku string SKU of the product.
url string, optional The public URL of the product or category page. Used for keyword analysis. If this is not supplied, keyword optimization will not start even if defined in the request.
otherDetails string, optional The product or category details (maximum of 500 characters). This is a premium-only feature.
tones string, optional Possible values: Blunt, Confident, Emotional, Formal, Friendly, Informational, Persuasive, Professional, Selling, Technical, Witty.
customTone string, optional Custom tone (maximum of 250 characters). If this is supplied, tones value will be ignored.
style string, optional Possible values: "Classical", "Corporate", "Modern", "Internet-speak".
customStyle string, optional Custom style text (maximum of 250 characters). If this is supplied, style will be ignored.
audiences string, optional Possible values: "Male", "Female", "Gen Z", "Millennial", "Baby Boomer", etc.
customAudience string, optional Custom audience (maximum of 150 characters). This will combined with the audiences.
keywords array of string, optional List of keywords to be used for generation of the product text. Pass null to use existing keywords generated from the /text/keywords or /text/keywords/optimization endpoints that have a matching language, storeId, recordId and type.
seedKeywords array of string, optional List of keywords to be used as seed keywords if starting a new keyword optimization. As a recommendation, the name of the product or category should be used as the first seed keyword.
images array of string, optional List of image IDs to be used for analysis for the generation of the text (upload via POST /text/image first).
attributes array of objects

Attributes such as price, origin, ingredients, etc. (maximum of 10 attributes): 

  • name (string): The attribute name (e.g. dimensions, price, etc.).
  • value (string): The value of the attribute.
fields array of objects Specifies the type of text to be generated and other specific generation parameters for the text type:
  • field (string): The type of text to be generated (e.g. page title, product description).
  • minWords (string): The minimum number of words targeted to be generated. Applicable for product description, category description and excerpt text types.
  • maxWords (string): The maximum number of words targeted to be generated. Applicable for product description, category description and excerpt text types.
  • currentValue (string, optional): The current text/content that is displayed on the website.
  • referenceText (string, optional): The reference text from a product or category to follow the form and structure. When this is supplied, values in tone, style and audience has no effect in generation.
  • rewriteText (string, optional): The text to rewrite.

Example API Request

Response

200
400
500
//This status is returned when the text is successfully generated.
//This status is returned if the request contains invalid parameters or is improperly formatted.
//The server encountered an error when processing the request.