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
Name | Type | Required | Max | Description |
---|---|---|---|---|
text | string | Yes | 2500 | The text to enhance |
language | string | No | - | 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 |
objective | string | Yes | 200 | The objective for enhancing the text (e.g., make it more persuasive, educational, concise, etc.) |
Response
Name | Type | Description |
---|---|---|
data | object | The data of the text enhancement |
data.originalText | string | The original input text |
data.enhancedText | string | The enhanced text optimized according to the objective |
data.keywordsUsed | array | Key terms or phrases used in the enhancement |
data.detectedLanguage | string | The detected language code of the text (only returned when language is set to 'auto') |
metadata | object | Metadata about the text enhancement process |
metadata.cost | number | The cost of the text enhancement request |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | Ex.: The request is invalid. |
400 | TEXT_ENHANCEMENT_ERROR | Ex: could not enhance the text | parsing error |
400 | HARM_CONTENT | Ex.: The content is harmful and cannot be processed. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
401 | UNAUTHORIZED | Ex.: The token is invalid. |
429 | TOO_MANY_REQUESTS | Ex.: The request limit has been reached. |