{"openapi":"3.0.3","info":{"title":"Psycholinguistic Text Analytics","description":"We aim to provide the deepest understanding of people through psychology & AI","termsOfService":"https://developers.symanto.net/terms-of-service","contact":{"name":"Symanto Support","url":"https://developers.symanto.net","email":"support@symanto.net"},"version":"1.0"},"servers":[{"url":"https://api.symanto.net"}],"security":[{"apiKeyHeader":[]}],"paths":{"/communication":{"post":{"tags":["Text Analysis"],"summary":"Communication & Tonality","description":"Identify the purpose and writing style of a written text.\n\nSupported Languages: [`ar`, `de`, `en`, `es`, `fr`, `it`, `nl`, `pt`, `ru`, `tr`, `zh`]\n\nReturned labels:\n* action-seeking\n* fact-oriented\n* information-seeking\n* self-revealing","operationId":"communication","parameters":[{"name":"all","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrors"}}}}}}},"/emotion":{"post":{"tags":["Text Analysis"],"summary":"Emotion Analysis","description":"Detect the emotions of the text.\n\nSupported Langauges: [`en`, `de`, `es`]\n\nReturned labels:\n* anger\n* joy\n* love\n* sadness\n* surprise\n* uncategorized","operationId":"emotion","parameters":[{"name":"all","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrors"}}}}}}},"/ekman-emotion":{"post":{"tags":["Text Analysis"],"summary":"Emotion Analysis","description":"Detect the emotions of the text based on Ekman.\n\nSupported Langauges: [`en`, `de`, `es`]\n\nReturned labels:\n* anger\n* disgust\n* fear\n* joy\n* sadness\n* surprise\n* no-emotion","operationId":"ekman-emotion","parameters":[{"name":"all","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrors"}}}}}}},"/personality":{"post":{"tags":["Text Analysis"],"summary":"Personality Traits","description":"Predict the personality trait of author of any written text.\n\nSupported Languages: [`ar`, `de`, `en`, `es`, `fr`, `it`, `nl`, `pt`, `ru`, `tr`, `zh`]\n\nReturned labels:\n\n* emotional\n* rational","operationId":"personality","parameters":[{"name":"all","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrors"}}}}}}},"/sentiment":{"post":{"tags":["Text Analysis"],"summary":"Sentiment Analysis","description":"Evaluate the overall tonality of the text.\n\nSupported Languages: [`ar`, `de` , `en`, `es`, `tr`, `zn`]\n\nReturned labels:\n* positive\n* negative","operationId":"sentiment","parameters":[{"name":"all","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrors"}}}}}}},"/topic-sentiment":{"post":{"tags":["Text Analysis"],"summary":"Extracts topics and sentiments and relates them.","operationId":"topic-sentiment","parameters":[{"name":"domain","in":"query","description":"Provide analysis domain for better extraction (optional)","required":false,"style":"form","explode":true,"schema":{"type":"string","enum":["Ecom","Employee","Hotel","Restaurant"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicSentimentResponse"}}}}}}},"/brand-recommendation":{"post":{"tags":["Text Analysis"],"summary":"Predicts whether a phrase is a promoter, detractor or indifferent","operationId":"Pipeline_BrandRecommendations","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"domain","in":"query","description":"(optional) Provide analysis domain for better extraction","required":false,"style":"form","explode":true,"schema":{"type":"string","enum":["Airlines","Automotive","Banking","Ecom","Employee","Gaming","Hotel","Pharma","Retail","Restaurant","ConsumerElectronics"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRecommendationResponse"}}}}}}},"/language-detection":{"post":{"tags":["Text Analysis"],"summary":"Language Detection","description":"Identifies what language a text is written in. Only languages that our API supports can be analyzed.\n\nReturned labels:\n* language_code of the detected language","operationId":"language-detection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LanguageDetectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LanguageDetectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrors"}}}}}}}},"components":{"schemas":{"PostRequest":{"title":"Posts","maxItems":32,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Post"}},"LanguageDetection":{"required":["text"],"type":"object","properties":{"id":{"type":"string","description":"id of the text."},"text":{"type":"string","description":"the text itself."}}},"Post":{"title":"Post","required":["language","text"],"type":"object","properties":{"id":{"type":"string","description":"id of the post.","example":"1"},"text":{"type":"string","description":"the text to be analysed.","example":"I love the service"},"language":{"type":"string","description":"language_code of the text.","example":"en"}}},"LanguagePredicted":{"title":"LanguagePredicted","required":["detected_language"],"type":"object","properties":{"id":{"type":"string","description":"id of the post."},"detected_language":{"type":"string","description":"the detected language_code corresponding to the input text."}}},"PostPredicted":{"title":"PostPredicted","required":["predictions"],"type":"object","properties":{"id":{"type":"string","description":"id of the post."},"predictions":{"type":"array","description":"the list of predictions.","items":{"$ref":"#/components/schemas/Prediction"}}}},"Prediction":{"title":"Prediction","required":["prediction","probability"],"type":"object","properties":{"prediction":{"title":"Prediction","type":"string","description":"the predicted label."},"probability":{"title":"Probability","type":"number","description":"the probability of the predicted label."}}},"PredictionResults":{"title":"Prediction Results","type":"array","items":{"$ref":"#/components/schemas/PostPredicted"}},"LanguageDetectionRequest":{"maxItems":64,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/LanguageDetection"}},"LanguageDetectionResponse":{"type":"array","items":{"$ref":"#/components/schemas/LanguagePredicted"}},"TopicSentimentOutput":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"language":{"type":"string"},"topicSentiments":{"type":"array","items":{"$ref":"#/components/schemas/TopicSentiment"}},"sentiments":{"type":"array","items":{"$ref":"#/components/schemas/Sentiment"}},"topics":{"type":"array","items":{"$ref":"#/components/schemas/Topic"}}}},"TopicSentiment":{"type":"object","properties":{"topic":{"$ref":"#/components/schemas/Topic"},"sentiment":{"$ref":"#/components/schemas/Sentiment"},"sentence":{"type":"string"}}},"Sentiment":{"type":"object","properties":{"start":{"type":"integer","format":"int32"},"end":{"type":"integer","format":"int32"},"text":{"type":"string"},"positive":{"type":"boolean"},"scale":{"type":"number","format":"double"},"category":{"type":"string"},"parentCategory":{"type":"string"},"negationTerm":{"type":"string"}}},"Topic":{"type":"object","properties":{"start":{"type":"integer","format":"int32"},"end":{"type":"integer","format":"int32"},"topic":{"type":"string"},"text":{"type":"string"},"category":{"type":"string"},"polarity":{"type":"number","format":"double"}}},"TopicSentimentResponse":{"type":"array","items":{"$ref":"#/components/schemas/TopicSentimentOutput"}},"BrandRecommendationResponse":{"type":"array","items":{"$ref":"#/components/schemas/OutputModel[Recommendation]"}},"TopicSentimentInput":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"language":{"type":"string"}}},"OutputModel[Recommendation]":{"type":"object","properties":{"id":{"type":"string"},"predictions":{"type":"array","items":{"$ref":"#/components/schemas/PredictedValue[Recommendation]"}}}},"PredictedValue[Recommendation]":{"type":"object","properties":{"probability":{"format":"float","type":"number"},"prediction":{"enum":["Promote","Detract","Indifferent"],"type":"string"}}},"ValidationErrors":{"title":"ValidationErrors","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}},"securitySchemes":{"apiKeyHeader":{"type":"apiKey","name":"x-api-key","in":"header"}}}}