Operations (sample payloads)
Main operationsCopy
Copy
Classify TextCopy
Copy
Classify some text based on a number of available categories
Sample Input
1{2"text": "The new iPhone 14 Pro features a 48MP camera and Dynamic Island.",3"categories": [4"Technology",5"Fashion",6"Sports",7"Politics"8],9"examples": [10{11"category": "Technology",12"text": "The latest MacBook Air comes with the M2 chip for improved performance."13},14{15"category": "Fashion",16"text": "Gucci's new collection showcases bold colors and vintage-inspired designs."17},18{19"category": "Sports",20"text": "The Golden State Warriors won the NBA championship for the fourth time in eight years."21},22{23"category": "Politics",24"text": "The upcoming election will focus on economic policies and healthcare reform."25}26]27}
Sample Output
1{2"category": "Technology"3}
Sentiment AnalysisCopy
Copy
Perform sentiment analysis on text data.
Sample Input
1{2"text": "I absolutely love this product! It's amazing and has improved my life significantly. However, the customer service could be better.",3"language": "en"4}
Sample Output
1{2"sentiment": "MIXED",3"score": {4"positive": 0.75,5"negative": 0.15,6"neutral": 0.05,7"mixed": 0.058}9}