Text Classification API
POSThttps://[api_name]-[api_id].infer.visai.ai/predict
Header
X-API-Key string required
Your API key
Domain Name
api_name string required
Deployed API Name
api_id string required
Deployed API ID
Get your deployed api in Library | Console.
application/json
Request Body required
inputs object
string[]
List of sentence
Responses
- 200
application/json
Schema
Example (from schema)
object
results Array [
input string
Input sentence
prediction Array [
object
class_name string
Class name from dataset
confidence float
Probability class of sentence
]
]
{
"results": [
{
"input": "ราคาดีมีคุณภาพ",
"prediction": [
{
"class_name": "เกี่ยวกับการบริการ",
"confidence": 0.5123007644462169
},
{
"class_name": "เกี่ยวกับการขนส่ง",
"confidence": 0.475151361780465
},
{
"class_name": "เกี่ยวกับราคา",
"confidence": 1
},
{
"class_name": "เกี่ยวกับคุณภาพสินค้า",
"confidence": 0.6353219167629959
}
]
}
]
}
Loading...