Serverless AI Text Explanation
AI powered text explanation service that explains complex concepts clearly at different levels of complexity in multiple languages.
Endpoint
Explain text at different complexity levels
POSThttps://api.xtartapp.com/text/explanation
*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 or concept to be explained. |
complexity | string | No | - | The complexity level for the explanation. Supported levels: beginner, intermediate, advanced. Default: intermediate |
language | string | No | - | The language to explain the text in. Supported languages: en, es, fr, de, zh, ja, ko, pt, it, ru, ar, hi. Default: en |
Response
Name | Type | Description |
---|---|---|
data | object | The data of the text explanation |
data.explanations | array | An array of explanation texts at the specified complexity level |
data.text | string | The original text that was explained |
data.complexity | string | The complexity level of the explanation |
data.language | string | The language used for the explanation |
metadata | object | Metadata about the text explanation process |
metadata.cost | number | The cost of the text explanation 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_EXPLANATION_ERROR | Ex: could not explain 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. |