post https://api.aeronpay.in/api/serviceapi-prod/api/ai/create-response
✅ Sample API Response (Success) - Non-Stream
{
"status": "SUCCESS",
"status_code": "200",
"message": "Response generation successful.",
"response_status": "completed",
"context_token": "apay_6894836be29881a3a88ea64ae34af7fb05962d3576a10a9a",
"parent_context_token": null,
"system": {
"msg_id": "msg_6894836d11f481a3836723de2a1f6ec005962d3576a10a9a",
"text": "AeronPay is a payment processing service designed to provide fast, secure, and convenient payment solutions. It typically offers features such as online payment gateway integration, support for multiple payment methods (credit/debit cards, digital wallets, bank transfers), fraud detection, and transaction analytics. AeronPay aims to help businesses facilitate smooth and reliable financial transactions both online and offline.\n\nIf you have a specific context or product named AeronPay in mind, please provide more details!"
}
}
🔁 Note
If you want to continue the same chat or conversation, make sure to pass the samecontext_token
in your subsequent API requests.
This helps the system maintain the context and respond accordingly.
🔄 AeronPay API – Streaming Response Format
AeronPay supports streaming responses for real-time output generation.
The response is divided into multiple event
stages to reflect the progress of the chat or request.
📊 Stream Events Overview
Event | Description |
---|---|
response_initiated | Indicates that the response generation process has started. |
response_output | Represents a streamed chunk of the response content. |
response_completed | Indicates that the full response has been successfully generated. |
Field | Description |
---|---|
status | Initial state of the process (PENDING ). |
status_code | Status code 102 represents request initiation. |
context_token | Unique ID for tracking this specific response. |
event | Always response_initiated for this stage. |
system | Empty or additional data (optional). |
📤 Event: response_initiated
response_initiated
{
"status": "PENDING",
"status_code": "102",
"message": "Response generation initiated.",
"event": "response_initiated",
"response_status": "initiated",
"context_token": "apay_68946f93d7d48192a20ca597945780fd03f17a6a593fca89",
"parent_context_token": null,
"system": []
}
📤 Event: response_output
response_output
{
"status": "PROCESSING",
"status_code": "206",
"event": "response_output",
"sequence_no": 2,
"system": {
"msg_id": "msg_68946f948cdc8192bec8a22fda97dca403f17a6a593fca89",
"text_chunk": "What is AeronPay?"
}
}
Field | Description |
---|---|
status | Current progress status (PROCESSING ). |
status_code | Status code 206 for partial content (chunked). |
sequence_no | Order of the current chunk in the stream. |
system.text_chunk | A part of the response being streamed. |
msg_id | Message identifier for tracking each chunk. |
📤 Event: response_completed
response_completed
{
"status": "SUCCESS",
"status_code": "200",
"message": "Response generation successful.",
"event": "response_completed",
"response_status": "completed",
"context_token": "apay_68946f93d7d48192a20ca597945780fd03f17a6a593fca89",
"parent_context_token": null,
"system": {
"msg_id": "msg_68946f948cdc8192bec8a22fda97dca403f17a6a593fca89",
"text": "AeronPay is a payment processing service designed to provide fast, secure, and convenient payment solutions. It typically offers features such as online payment gateway integration, support for multiple payment methods (credit/debit cards, digital wallets, bank transfers), fraud detection, and transaction analytics. AeronPay aims to help businesses facilitate smooth and reliable financial transactions both online and offline.\n\nIf you have a specific context or product named AeronPay in mind, please provide more details!"
}
}
Field | Description |
---|---|
status | Final result of the request (SUCCESS ). |
status_code | HTTP-style code 200 indicates success. |
event | Indicates the stream has finished: response_completed . |
response_status | Marked as completed . |
system.text | Full compiled response text from all previous chunks. |
context_token | The same token used to identify and continue the chat. |
📝 Notes
- Stream consumers should listen for all three event types in sequence.
- Use
context_token
to continue the same chat in future API requests. - Combine all
text_chunk
values fromresponse_output
events to build the full response. - The final
response_completed
event confirms that the response is complete.