Skip to main content

Text Classification - Product Review

AI categorizes text content by classifying topics or identifying responsible staff mentioned in the text.

Header Parameters
X-API-Key string REQUIRED

Your API key

Request Body REQUIRED
inputs string[]

List of sentences

Responses
200

Return the response of the text classification model API will be a list of JSON where each element is another key-value object that contains its sentence and its predicted probability of each class.

Schema
results object[]

Array of results

input string

Input sentence

prediction object[]

Array of results

class_name string

Class name about product review (เกี่ยวกับการบริการ, เกี่ยวกับการขนส่ง, เกี่ยวกับราคา, เกี่ยวกับคุณภาพสินค้า)

confidence string

Confidence value

400

inputs not founds | Incorrect request body field (inputs)

401

Unauthorized | Incorrect X-API-Key or X-API-Key not have access to this model