Serverless AI Text Enhancement

AI powered text enhancement service that improves clarity, relevance, and engagement of text content according to a specified objective, while preserving the original meaning.

Endpoint

Text enhancement with objective-based optimization

POSThttps://api.xtartapp.com/text/enhancement

*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 enhance
languagestringNo-The language of input text. If you provide wrong language, the text will not be enhanced, and the original text will be returned. Supported languages: auto, en, es, fr, de, zh, ja, ko, pt, it, ru, ar, hi
objectivestringYes200The objective for enhancing the text (e.g., make it more persuasive, educational, concise, etc.)

Response

NameTypeDescription
dataobjectThe data of the text enhancement
data.originalTextstringThe original input text
data.enhancedTextstringThe enhanced text optimized according to the objective
data.keywordsUsedarrayKey terms or phrases used in the enhancement
data.detectedLanguagestringThe detected language code of the text (only returned when language is set to 'auto')
metadataobjectMetadata about the text enhancement process
metadata.costnumberThe cost of the text enhancement request

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid.
400INVALID_REQUESTEx.: The request is invalid.
400TEXT_ENHANCEMENT_ERROREx: could not enhance the text | 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.