For Developers

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.

# Example request
curl -X POST https://api.wealthsight.ai/v1/analysis \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "file=@variance_data.xlsx"
API Key Management

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

POST
/api/v1/analysis

Create Analysis

Upload a financial file and start a new variance analysis. Returns a session ID for tracking.

GET
/api/v1/analysis/:id

Get Analysis Results

Retrieve the results of a completed analysis including commentary, charts, and variance data.

POST
/api/v1/analysis/:id/query

Ask Follow-up Question

Send a follow-up question about an existing analysis session for deeper insights.

GET
/api/v1/sessions

List Sessions

Retrieve a list of all analysis sessions for the authenticated user.

POST
/api/v1/reports/generate

Generate Report

Generate a downloadable report (PDF) from an analysis session.

GET
/api/v1/reports/:id/download

Download Report

Get a signed URL to download a generated report file.

DELETE
/api/v1/sessions/:id

Delete Session

Permanently delete an analysis session and all associated data.

GET
/api/v1/user/usage

Get Usage Stats

Retrieve current usage statistics including message counts, analyses performed, and plan limits.

Response Format

// Successful response
{
  "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"
  }
}
// Error response
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please retry after 60 seconds.",
    "retry_after": 60
  }
}

Rate Limits

PlanRequests/minAnalyses/monthMax file size
Free105010 MB
Starter3050050 MB
Professional100Unlimited100 MB

Ready to Integrate?

Get your API key and start building with WealthSight's variance analysis engine.