Base schema
OpenAPI document
Use the public OpenAPI schema as the canonical starting point for LLM session
integration.
GET /api/public/openapi.json
Returns an OpenAPI 3.1 document describing the public chat session endpoints.
Endpoint 1
Create a chat session
Start a session that an agent can later process, whether the job is simple LLM chat or
a longer execution pipeline.
curl -X POST http://localhost:3000/api/public/chat/sessions \
-H 'Content-Type: application/json' \
-H 'x-app-key: demo-app-key' \
-d '{
"model": "gemma3:4b",
"systemPrompt": "You are Robotron.",
"metadata": {"channel":"public-docs"}
}'
Endpoint 2
Append a user message
Add the next user turn to an existing session and let Robotron continue orchestration.
curl -X POST http://localhost:3000/api/public/chat/sessions/<sessionId>/messages \
-H 'Content-Type: application/json' \
-H 'x-app-key: demo-app-key' \
-d '{
"content": "Review this policy exception and summarize the approval risks."
}'
Endpoint 3
Inspect a session
Retrieve session state, metadata, and message history so your client can render the
latest status.
curl -H 'x-app-key: demo-app-key' \
http://localhost:3000/api/public/chat/sessions/<sessionId>