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

NameTypeRequiredMaxDescription
textstringYes500The text message to generate a reply for
contextstringNo2500Additional context to help generate a more relevant reply (e.g., conversation history, user preferences, etc.)

Response

NameTypeDescription
dataobjectThe generated reply data
data.textstringThe generated reply text
data.confidencenumberConfidence score for the reply (0.0 to 1.0)
metadataobjectMetadata about the reply generation process
metadata.costnumberThe cost of the reply generation request

Errors

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