Skip to Content
SeyloDocs
API referenceAI assistant

Send a message to the AI assistant

POST
/api/v1/ai.send

Adds the person's message (to a new conversation when conversationId is left out) and starts the assistant's reply. Returns at once; the reply streams on the live topic ai:. Fails with CONFLICT while a reply is still streaming and with FORBIDDEN once the monthly budget is reached.

Any signed-in caller. Not available to MCP clients or the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
conversationId?string

Panel-issued id.

Match^[a-z0-9]{16}$
message*string
Length1 <= length <= 20000
context?
model?string|string|string

Response Body

Success.

application/json
  1. response
conversationId*string

Panel-issued id.

Match^[a-z0-9]{16}$
userMessage*
assistantMessage*
Example Request
curl -X POST 'https://example.com/api/v1/ai.send' \  -H 'Content-Type: application/json' \  -d '{  "message": "string"}'
Example Response
{  "conversationId": "string",  "userMessage": {    "id": "string",    "role": "user",    "parts": [      {        "type": "text",        "text": "string"      }    ],    "model": "haiku",    "status": "streaming",    "error": "string",    "createdAt": "2019-08-24T14:15:22Z"  },  "assistantMessage": {    "id": "string",    "role": "user",    "parts": [      {        "type": "text",        "text": "string"      }    ],    "model": "haiku",    "status": "streaming",    "error": "string",    "createdAt": "2019-08-24T14:15:22Z"  }}