API Reference
Integrate WealthSight's AI-powered variance analysis directly into your applications, dashboards, and workflows with our RESTful API.
Authentication
All API requests require an API key passed in the Authorization header.
Generate and manage API keys from your account Settings page. Keys are scoped to your organization and can be rotated at any time. Never share your API keys in public repositories or client-side code.
Secure by Default
All API calls require authentication via API keys. TLS 1.3 enforced.
Fast Responses
Async analysis with webhook callbacks. Real-time streaming for chat queries.
RESTful Design
Standard HTTP methods, JSON request/response bodies, predictable URLs.
Rate Limited
Generous rate limits based on your plan. Headers indicate remaining quota.
Endpoints
Base URL: https://api.wealthsight.ai/v1
/api/v1/analysisCreate Analysis
Upload a financial file and start a new variance analysis. Returns a session ID for tracking.
/api/v1/analysis/:idGet Analysis Results
Retrieve the results of a completed analysis including commentary, charts, and variance data.
/api/v1/analysis/:id/queryAsk Follow-up Question
Send a follow-up question about an existing analysis session for deeper insights.
/api/v1/sessionsList Sessions
Retrieve a list of all analysis sessions for the authenticated user.
/api/v1/reports/generateGenerate Report
Generate a downloadable report (PDF) from an analysis session.
/api/v1/reports/:id/downloadDownload Report
Get a signed URL to download a generated report file.
/api/v1/sessions/:idDelete Session
Permanently delete an analysis session and all associated data.
/api/v1/user/usageGet Usage Stats
Retrieve current usage statistics including message counts, analyses performed, and plan limits.
Response Format
{
"success": true,
"data": {
"session_id": "ses_abc123",
"status": "completed",
"analysis": {
"summary": "Revenue increased 12% YoY...",
"variances": [...],
"charts": [...]
}
},
"meta": {
"request_id": "req_xyz789",
"timestamp": "2025-02-01T12:00:00Z"
}
}{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please retry after 60 seconds.",
"retry_after": 60
}
}Rate Limits
| Plan | Requests/min | Analyses/month | Max file size |
|---|---|---|---|
| Free | 10 | 50 | 10 MB |
| Starter | 30 | 500 | 50 MB |
| Professional | 100 | Unlimited | 100 MB |
Ready to Integrate?
Get your API key and start building with WealthSight's variance analysis engine.