Chat
The chat answers questions about the filings, signals and companies your package covers, from RiskPilot's own data. Before every answer the server retrieves the matching signals and companies inside your scope (classes, history window, families) and gives only those to the model, so an answer can never draw on data outside your package. Each answer cites the filings it used.
The chat is not investment advice: it never recommends buying, selling or holding a security and declines questions
outside RiskPilot's data. Every status, conversation and answer carries the disclaimer text to show next to it.
The routes take a session or the live key (the sandbox key gets 403 sandbox_read_only; without paid access 402).
Check availability
Code
Code
available is false with reason not_configured (the chat is switched off on the server) or package_disabled
(not part of your package). Earlier conversations stay readable and deletable either way.
Conversations
| Route | Does |
|---|---|
GET /api/v1/customer/chat/conversations?limit&offset | Your conversations, newest first |
POST /api/v1/customer/chat/conversations | Start one (optional { "title" }); 409 chat_conversations_full at 200 |
GET /api/v1/customer/chat/conversations/{id} | One conversation with its messages |
DELETE /api/v1/customer/chat/conversations/{id} | Delete it and its messages (204) |
A message is { id, role: "user" | "assistant", content, citations, createdAt }. Another account's conversation id is
404.
Ask a question
POST /api/v1/customer/chat/conversations/{id}/messages with { "message": "What did NVDA file this week?" }.
As one JSON answer
Code
Streamed, as server-sent events
Send Accept: text/event-stream (or add ?stream=1). The answer arrives in pieces:
Code
or, when the model fails midway, event: error with { "error": "…", "code": "chat_model_failed" }. done carries
the same JSON as the non-streamed answer.
Code
Closing the request stops the model call.
Citations
The model cites accession numbers in square brackets. The server keeps only filings that were in the data the model was given, in order of first mention, and returns each as:
Code
An accession the model invents, or one outside your package, never becomes a citation. secUrl may be null.
Limits and errors
| What | Default | Answer |
|---|---|---|
| Questions per month (UTC) | per package: 100 signal, 300 desk, 1000 firm | 429 chat_quota_exceeded |
| Questions per minute | 5 | 429 chat_rate_limited |
| Question length | 2000 characters | 400 message_too_long |
| Conversations kept | 200 | 409 chat_conversations_full |
| Messages per conversation | 200 | 409 chat_conversation_full |
Other answers: 400 message_required, 403 chat_disabled (not in your package), 404 (unknown conversation),
502 chat_model_failed (the model failed; not counted against your quota), 503 chat_unavailable (switched off).
A deleted conversation still counts towards the month. The package's requests per minute apply as on every route.