Classification
Classifies a Document into labels based on its content.
Totoy API
Explanation
Knowledge Bases
- GETReturns a list of Knowledge Bases.
- POSTCreates a Knowledge Base.
- GETRetrieves a Knowledge Base.
- DELDeletes a Knowledge Base.
- PATCHModifies a Knowledge Base.
- POSTCreates a Knowledge Base Chat Response for the given Messages.
- GETReturns a list of Knowledge Base Sources.
- POSTAdds Sources to a Knowledge Base.
- GETRetrieves a Knowledge Base Source.
- DELRemoves a Knowledge Base Source from a Knowledge Base.
Sources
Projects
Organization
Classification
Classifies a Document into labels based on its content.
Classifies documents into labels based on its content. Use prebuilt models or define custom labels for a Classification
.
POST
/
classification
curl --request POST \
--url https://api.totoy.ai/v1/classification \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "rdc-de-2025-02-14",
"document": "JVBERi0xLjUNCiW1tbW1DQox..."
}'
{
"label": {
"reasoning": "Considering the title 'MR-Zuweisung' and the contents, particularly the fact that it is a referral for MRI examination due to specific clinical symptoms and conditions noted, the most appropriate classification is 'Zuweisung'. The document fits perfectly as a referral for imaging based on diagnostic requirements set by a physician.",
"prediction": "Zuweisung"
},
"review": {
"reasoning": "The document is clearly legible and formatted as a professional referral, indicating no need for further review. The content is straightforward and matches the 'Zuweisung' classification.",
"recommended": false
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
OK
The response is of type object
.
curl --request POST \
--url https://api.totoy.ai/v1/classification \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "rdc-de-2025-02-14",
"document": "JVBERi0xLjUNCiW1tbW1DQox..."
}'
{
"label": {
"reasoning": "Considering the title 'MR-Zuweisung' and the contents, particularly the fact that it is a referral for MRI examination due to specific clinical symptoms and conditions noted, the most appropriate classification is 'Zuweisung'. The document fits perfectly as a referral for imaging based on diagnostic requirements set by a physician.",
"prediction": "Zuweisung"
},
"review": {
"reasoning": "The document is clearly legible and formatted as a professional referral, indicating no need for further review. The content is straightforward and matches the 'Zuweisung' classification.",
"recommended": false
}
}