AI Assistant API¶
The AI Assistant API provides a chat endpoint for AI-powered analysis of workbook data.
Overview¶
CalcBridge's AI assistant provides:
- Natural Language Chat: Ask questions about your data in plain English
- Context-Aware: Understands workbook structure and financial terminology
- PII Scrubbing: Sensitive data is sanitized before AI processing
Endpoints¶
Chat with AI Assistant¶
Send a message to the AI assistant and receive a response.
Request Body¶
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | User message (min 1 character) |
context | object | No | Additional context for the query |
Example Request¶
Response¶
{
"id": "msg_abc123",
"role": "assistant",
"content": "Based on the holdings in your CLO Portfolio Q1 2026 workbook, the total par value of CCC-rated loans is $12,500,000, representing 2.8% of total portfolio par.",
"timestamp": "2026-01-25T10:30:00Z",
"metadata": {
"workbook_id": "550e8400-e29b-41d4-a716-446655440000",
"data_points_referenced": 3
}
}
Security¶
- All user data is scrubbed of PII before being sent to the AI model
- Responses are sanitized to prevent information leakage
- Chat history is stored per-session and not shared across tenants
Limitations¶
- Maximum query length: 1000 characters
- Responses are informational and should not be used as sole decision-making input
- Complex multi-step analyses may require multiple queries
Related Documentation¶
- Insights API - AI-powered insight generation
- Insights & AI - Feature documentation