API reference: AI assistant
Snowtrol assistant API: POST a conversation (optionally with image attachments) to a real OpenAI-compatible model, grounded on an org-scoped infrastructure summary and RAG retrieval.
POST
/api/assistant/chatSessionSend the conversation ({ messages: [{ role, content, images? }] }; roles user/assistant, last must be user). The server grounds the model on a compact read-only summary of YOUR org's real infrastructure plus your org's most-similar prior Q&A (RAG), calls the configured OpenAI-compatible backend, and returns the answer. A user turn may carry up to 4 image attachments (png/jpeg/webp/gif, ≤5MB each, base64 + mediaType) forwarded as multimodal content — transient, never stored. Audited assistant.query.
Example request
json
{ "messages": [ { "role": "user", "content": "Which VPCs have no NAT gateway?" } ] }Example response
json
{ "text": "…", "model": "gemini-…", "usage": { "…": "…" } }Errors
| Status | When |
|---|---|
400 | Malformed conversation, an assistant turn with images, or an over-limit attachment. |
401 | Not signed in. |
429 | Per-user rate limit. |
502 | The model backend errored or is unreachable (never a fabricated answer). |
503 | No AI backend configured — { configured: false }. |