Back to Overview

API Reference

Complete endpoint documentation and response schemas

Quick Navigation

Product Endpoints

News Intelligence

POST
/api/products/news

Request Body

{
  "symbols": ["AAPL", "MSFT"],  // 1-10 symbols
  "n": 5,                        // 1-20 news items (default: 5)
  "language": "en",              // ISO 639-1 code
  "data": {}                     // Optional custom data
}

Response

{
  "job_id": "uuid",
  "status": "completed",
  "from_cache": true,
  "news": [
    {
      "title": "string",
      "content": "string",
      "sources": ["url"],
      "further_reading": ["url"],
      "relevance_score": 0.95
    }
  ]
}

Stock Analysis

POST
/api/products/stock-report

Request Body

{
  "symbols": ["AAPL"],           // 1 for analysis, 2 for comparison
  "language": "en",              // ISO 639-1 code
  "data": {}                     // Optional financial data
}

Response

{
  "job_id": "uuid",
  "status": "completed",
  "from_cache": false,
  "detailed_analysis": [
    {
      "title": "string",
      "keyMetric": "string",
      "implications": ["string"],
      "investmentThesis": "string",
      "category": "growth|profitability|risk|valuation|competitive"
    }
  ],
  "quick_insights": ["string"]
}

Analysis Endpoints

Custom Analysis

POST
/api/analysis

Request Body

{
  "prompt": "string",                    // Required: Your analysis question
  "symbols": ["AAPL", "MSFT"],          // Optional: Stock symbols
  "portfolio_composition": [             // Optional: Portfolio weights
    {"symbol": "SPY", "percentage": 60}
  ],
  "data": {},                           // Optional: Custom data
  "output_format": {                    // Optional: Response format
    "type": "json_schema|json|markdown",
    "schema": {},                       // For json_schema type
    "stream": true                      // Enable streaming
  }
}

Response (Non-streaming)

{
  "job_id": "uuid",
  "status": "pending|completed",
  "result": {},                         // When completed
  "status_url": "/api/jobs/analysis/{job_id}/status",
  "result_url": "/api/jobs/analysis/{job_id}/result"
}

Response (Streaming)

// Server-Sent Events stream
event: synthesis_chunk
data: {"chunk": "text content..."}

event: done
data: {"job_id": "uuid", "status": "completed"}

Chat Endpoints

Interactive Chat

POST
/api/chat

Request Body

{
  "message": "string",              // User's message
  "conversation_id": "uuid|null",   // null for new conversation
  "stream": true                    // Enable streaming (default: true)
}

Streaming Events

event: token
data: {"type": "token", "content": "text..."}

event: node_start
data: {"type": "node_start", "node": "research"}

event: tool_start
data: {"type": "tool_start", "tool": "market_data"}

event: done
data: {"type": "done", "conversation_id": "uuid"}

Job Management

Check Status

GET
/api/jobs/{job_type}/{job_id}/status

Response

{
  "job_id": "uuid",
  "status": "pending|running|completed|failed",
  "progress": 75,
  "currently_working_on": "Analyzing financials..."
}

Get Result

GET
/api/jobs/{job_type}/{job_id}/result

Response

{
  "job_id": "uuid",
  "status": "completed",
  "result": {
    // Job-specific result data
  }
}

Custom Data Sources

Integrate your own data sources via the Customer Tools API. Configure external APIs that the AI can use during analysis.

List Tools

GET /api/customer-tools/

Create Tool

POST /api/customer-tools/

Update Tool

PUT /api/customer-tools/{id}

Delete Tool

DELETE /api/customer-tools/{id}

Configure tools via the web portal at /portal/tools

Response Formats

JSON Schema

Structured output with guaranteed fields

{
  "type": "json_schema",
  "schema": {
    "summary": "string",
    "risks": "array"
  }
}

JSON

Flexible JSON structure

{
  "type": "json"
}

Markdown

Formatted text output

{
  "type": "markdown"
}

Error Codes

Code Status Description
400 Bad Request Invalid request parameters
401 Unauthorized Missing or invalid API key
403 Forbidden Access denied to resource
404 Not Found Resource not found
429 Too Many Requests Rate limit exceeded
500 Internal Error Server error occurred

Error Response Format

{
  "detail": "Detailed error message",
  "status_code": 400,
  "type": "validation_error"
}

Rate Limits

Default Limits

News API 100/min
Stock Analysis 20/min
Analysis API 20/min
Chat API 10 concurrent

Response Headers

X-RateLimit-Limit

Requests allowed per window

X-RateLimit-Remaining

Requests remaining in window

X-RateLimit-Reset

Unix timestamp of window reset

Need higher limits? Contact your account manager for custom rate limits.

Need Help?

Explore our interactive API playground or contact support