Serverless AI Text Rephrasing
AI powered text rephrasing service that rewrites content in different tones and languages while preserving the original meaning.
Endpoint
Rephrase text in a specified tone and language
POSThttps://api.xtartapp.com/text/rephrasing
*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 be rephrased. |
| tone | string | Yes | - | The target tone for rephrasing. Supported tones: professional, casual, technical, friendly, formal, humorous, empathetic, assertive, paraphrase, creative. |
Response
| Name | Type | Description |
|---|---|---|
| data | object | The data of the text rephrasing |
| data.rephrasedText | string | The rephrased text in the specified tone |
| data.originalText | string | The original text before rephrasing |
| data.tone | string | The tone used for rephrasing |
| metadata | object | Metadata about the text rephrasing process |
| metadata.cost | number | The cost of the text rephrasing 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_REPHRASING_ERROR | Ex: could not rephrase 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. |