---
title: "Text classification"
method: POST
path: "/text/classification"
tags: ["Plugin API/Model/Text"]
---

# Text classification

`POST /text/classification`

This API integrates your text classification model into BasicAI. This API only works with Text datasets.

## Headers

- `Authorization` string

## Request body

- object
  - `content` string, required — Text content

## Response `200`

Successful

- object
  - `code` string, required — Error code, OK indicates success, while others indicate failure
  - `message` string, required — Error message
  - `data` object, required — Null, if there is none
    - `classifications` TextModelClassification[], required — An array of the classifications，will be null or an empty array if there is none
      - `score` number, required — Confidence score，range [0, 1]
      - `label` string, required — Label or Class, case sensitive

---

[API](https://skmtc.dev/basic/apis/basicai-cloud-open-plugin-api.md) · [All operations](https://skmtc.dev/basic/apis/basicai-cloud-open-plugin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/basic/basicai-cloud-open-plugin-api/revisions/f6b5a226c6da/schema)
