Skip to main content

Base URL

All API requests should be made to:
https://api.chicago.global

Authentication

All API endpoints require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Keep your API key secure. Do not expose it in client-side code or public repositories.

Async Job Processing

Several endpoints (like Portfolio Analysis) use async job processing for long-running operations:
  1. Submit Request - POST your data to the endpoint
  2. Receive Job ID - Get a job_id and check_url immediately
  3. Poll for Status - GET the check_url until status is completed
  4. Get Results - The completed response contains your data
// 1. Submit
const { job_id, check_url } = await fetch('/v1/portfolio/analyze', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${API_KEY}` },
  body: JSON.stringify(payload)
}).then(r => r.json());

// 2. Poll
let result;
while (!result) {
  const status = await fetch(check_url).then(r => r.json());
  if (status.status === 'completed') result = status.result;
  else await new Promise(r => setTimeout(r, 3000));
}

Response Codes

CodeDescription
200Success
401Unauthorized - Invalid or missing API key
404Not found
422Validation error - Check request body
500Server error

Rate Limits

Contact support for rate limit information based on your plan.