Classify a given text array input using the LLM classifier
POST
/classify/unstructured-textIn your request headers, pass authorization: Bearer <<token>>.
If you're self-hosting Sombra, also add the request header x-sombra-authorization: Bearer <<sombraInternalKey>>. You can read more about request authorization here.
authorizationstringAn API key generated from the Transcend dashboard: https://app.transcend.io/infrastructure/api-keys. |
x-sombra-authorizationstringThe Sombra internal key. This header is only needed for self-hosted Sombra gateways. See https://docs.transcend.io/docs/dsr-automation/api-integration/authentication#authenticating-to-sombra |
content-typestringSpecify content-type: application/json for a JSON response from the Transcend API. |
application/json
inputListarray<string>(required)List of inputs to classify |
labelsarray<string>(required)The list of labels to classify against |
Request Body Example
Basic Example:
{
"inputList": [
"\"userId\":\"05179687877722385190\"",
"Medical ID: 15179687877722385199",
"transcend user ID"
],
"labels": [
"Personal Identifier",
"Medical",
"Generic Personal Information"
]
}
200 (OK)
application/jsonInput was classified successfully. Responds with the classification result from the NER classifier for each input.
The list of classifications for each input
Response Body Example
The result of passing in two inputs for classification:
[
[
{
"type": "Personal Identifier",
"confidence": 0.99,
"classifierVersion": "3.3.2",
"classificationMethod": "TRANSCEND_LLM_CLASSIFY",
"value": "05179687877722385190",
"snippet": "\"userId\":\"05179687877722385190\""
}
],
[
{
"type": "Medical",
"confidence": 0.96,
"classifierVersion": "3.3.2",
"classificationMethod": "TRANSCEND_LLM_CLASSIFY",
"value": "15179687877722385199",
"snippet": "Medical ID: 15179687877722385199"
},
{
"type": "Personal Identifier - User ID",
"confidence": 0.97,
"classifierVersion": "3.3.2",
"classificationMethod": "TRANSCEND_LLM_CLASSIFY",
"value": "15179687877722385199",
"snippet": "Medical ID: 15179687877722385199"
},
{
"type": "Not Personal Data",
"confidence": 0.8,
"classifierVersion": "3.3.2",
"classificationMethod": "TRANSCEND_LLM_CLASSIFY",
"value": "15179687877722385199",
"snippet": "Medical ID: 15179687877722385199"
}
]
]
400 (Bad Request)
application/jsonWhile this request passed authentication, the input is malformed. Please double-check that your code conforms to our API specification.
401 (Unauthorized)
application/jsonThere was a problem authenticating your request. This may be an issue with the Transcend API key ("authorization" header), or the Sombra API key ("x-sombra-authorization" header used for self-hosted gateways only).
413 (Request Entity Too Large)
application/jsonThe request body is too large. JSON and raw bodies must be less than 50MB. URL encoded bodies must be less than 30MB.
429 (Too Many Requests)
application/jsonYou are sending requests too quickly and have hit our rate limit. If you hit this, you'll need to throttle your request velocity or try again later.
Response Headers
Retry-Afterinteger |
X-RateLimit-Limitinteger |
X-RateLimit-Remaininginteger |
X-RateLimit-Resetinteger |
500 (Internal Server Error)
application/jsonA 5xx error means there is either an issue with your self-hosted gateway, or a Transcend server is having issues. You check our system status at status.transcend.io. Please reach out to Transcend support if you're experiencing this error.
502 (Bad Gateway)
application/jsonAn upstream service on Transcend's side is having issues. You check our system status at status.transcend.io. Please reach out to Transcend support if you're experiencing this error.