Serverless AI Intent Validator

AI powered text intent validation. Determine if a given text matches a specified intent, such as validating if a company description aligns with its stated purpose or if content matches specific criteria.

Endpoint

Validate text against a specified intent to determine relevance and alignment.

POSThttps://api.xtartapp.com/text/intent-validator

*Authentication

You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.

Request body

NameTypeRequiredMaxDescription
textstringYes2500The text to validate against the specified intent
intentstringYes250The intent or purpose against which the input text will be validated

Response

NameTypeDescription
dataobjectThe result of the intent validation
data.isValidbooleanWhether the input text matches the specified intent
data.confidencenumberConfidence score for the validation result (0.0 to 1.0)
data.explanationstringBrief explanation of why the text does or doesn't match the intent
metadataobjectMetadata about the intent validation process
metadata.costnumberThe cost of the intent validation request

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid.
400INVALID_REQUESTEx.: The request is invalid.
400TEXT_INTENT_VALIDATION_ERROREx: could not validate the text against the intent | parsing error
400HARM_CONTENTEx.: The content is harmful and cannot be processed.
400INSUFFICIENT_BALANCEThe user has insufficient balance
401UNAUTHORIZEDEx.: The token is invalid.
429TOO_MANY_REQUESTSEx.: The request limit has been reached.