Skip to main content

How to Make Your API Call

To call the Product Copy Generation API and generate product copy, you can run the following curl command through your terminal.

curl --location 'https://api.katalis.ai/service/v1/generate-copy' \
--header 'Content-Type: application/json' \
--data '{
"lang": "id", // can only accept 'id' or 'en'
"definition": "Handuk Terry Palmer Luxury Cervus",
"keywords": [
"handuk mandi",
"handuk elegan",
"handuk kekinian",
"gen z"
],
"type": "all" // only accept 'title', 'description', 'features', or 'all'
}'

This curl command is making a POST request to the Katalis AI API's generate-copy endpoint. The --location flag tells curl to follow any redirects. The --header flag sets the Content-Type of the request to application/json, indicating that the data being sent is in JSON format. The --data flag sends the specified data in a POST request to the HTTP server.

Here's a breakdown of the data being sent:

  • "lang": This specifies the language of the copy to be generated. It can only accept 'id' (Indonesian) or 'en' (English).

  • "definition": This is the definition or description of the product for which the copy is to be generated.

  • "keywords": This is an array of keywords that should be included in the generated copy. In this case, the keywords are "handuk mandi", "handuk elegan", "handuk kekinian", and "gen z".

  • "type": This specifies the type of copy to be generated. It can only accept 'title', 'description', 'features', or 'all'. In this case, 'all' means that the API will generate a title, description, and features for the product.