Serverless AI Smart Reply Generation
AI powered smart reply generation that creates a contextually appropriate response to messages. The service analyzes the input text and generates a natural, conversational reply that maintains the context, language, and tone of the original message.
Endpoint
Generate a smart, contextually appropriate reply to a message.
POSThttps://api.xtartapp.com/bot/smart-reply
*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 | 500 | The text message to generate a reply for |
context | string | No | 2500 | Additional context to help generate a more relevant reply (e.g., conversation history, user preferences, etc.) |
Response
Name | Type | Description |
---|---|---|
data | object | The generated reply data |
data.text | string | The generated reply text |
data.confidence | number | Confidence score for the reply (0.0 to 1.0) |
metadata | object | Metadata about the reply generation process |
metadata.cost | number | The cost of the reply generation 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 | SMART_REPLY_GENERATION_ERROR | Ex: could not generate reply for 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. |