All endpoints require a logged-in session.
Multipart upload field: file.
Returns a staging profile with sheets, columns, preview rows, and suggested semantic columns.
Returns the active workspace metadata for the current user, including all imported datasets and their DuckDB tables.
{
"staging_id": "...",
"sheets": ["Cases"],
"semantic_columns": {
"Cases": ["Problem Description", "Intervention Notes"]
},
"replace_existing": false
}By default this adds a dataset to the current workspace. Set replace_existing to true only when you want to clear the current workspace datasets before importing the staged file.
Importing a dataset clears the current user's conversation history.
Removes one imported dataset from the current user's workspace and deletes only that dataset's semantic-index entries.
Rebuilds the full semantic index for the active workspace. Use this maintenance endpoint when the index must be realigned with the imported datasets.
{
"question": "Which open cases look similar to motor vibration?"
}Returns an answer, route, sources, and compact debug metadata.
Recent conversation history is supplied automatically. Follow-up questions can therefore refer to the preceding exchange without resending it in the request body.
route can be count, status, sql, semantic, hybrid, multi, python, or no_dataset.
When debug metadata is present, debug.route_plan includes the primary route, ordered candidates, strategy source, confidence, and execution mode. multi uses candidates as subroutes; other routes use candidates as fallbacks.
A valid route that finds no matching rows returns an empty-result answer. Fallbacks are used for technical failures or unsupported routes, not to reinterpret a valid zero-result query.
Returns saved-history size plus an estimate of the latest LLM payload, including chars, estimated_tokens, messages, percentage, and source.
Clears the current user's conversation history and saved payload estimate. Returns:
{"ok": true}