PoseyAI
API reference

The /api/chat endpoint

OpenAPI 3.1 documentation for the PoseyAI chat endpoint — schemas, authentication, streaming semantics and a live request console you can run from this page.

post/api/chatStream an assistant replyDownload OpenAPI JSON

Sends a conversation to PoseyAI and streams the reply back as a UI message stream. When a bearer token and threadId are supplied, the user message and the assistant reply are persisted to that conversation; otherwise the call runs in guest mode with no storage.

Authentication

Optional Authorization: Bearer <JWT> header. With a valid token and a threadId, the exchange is persisted to that conversation under your account. Without either, the request runs in guest mode: fully functional, nothing stored.

Request schema

ChatRequest
messages*arrayFull conversation history in UI message format.
threadIdstringConversation to persist to. Omit for guest mode (nothing is written to the database).
UIMessage
idstring
role*string(user | assistant | system)
parts*array
MessagePart
type*string`text` for prose, `file` for image or document attachments.(text | file)
textstring
mediaTypestring
urlstringData URL or https URL of the attachment.

Responses

200Server-sent UI message stream of the assistant reply.
400Invalid request body — `messages` must be an array.
401Session expired or invalid bearer token.
404Conversation not found for this user.
500AI or backend not configured.

Example request

curl -N -X POST "$BASE_URL/api/chat" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -d '{
    "threadId": "5f9c1c1e-0a2b-4c1d-9f11-6f0d2a3b4c5d",
    "messages": [
      { "role": "user", "parts": [{ "type": "text", "text": "Hello" }] }
    ]
  }'

Try it

Response
Run a request to see the streamed response here.