Skip to main content

1. Get Your API Key

Sign up at canaryedge.com and grab your API key from the dashboard.

2. Send a Detection Request

curl -X POST https://api.canaryedge.com/anomalydetector/v1.1/timeseries/entire/detect \
  -H "Content-Type: application/json" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  -d '{
    "series": [
      {"timestamp": "2026-01-01T00:00:00Z", "value": 10.5},
      {"timestamp": "2026-01-01T01:00:00Z", "value": 11.2},
      {"timestamp": "2026-01-01T02:00:00Z", "value": 10.8},
      {"timestamp": "2026-01-01T03:00:00Z", "value": 10.1},
      {"timestamp": "2026-01-01T04:00:00Z", "value": 11.0},
      {"timestamp": "2026-01-01T05:00:00Z", "value": 10.6},
      {"timestamp": "2026-01-01T06:00:00Z", "value": 10.9},
      {"timestamp": "2026-01-01T07:00:00Z", "value": 11.1},
      {"timestamp": "2026-01-01T08:00:00Z", "value": 10.4},
      {"timestamp": "2026-01-01T09:00:00Z", "value": 10.7},
      {"timestamp": "2026-01-01T10:00:00Z", "value": 10.3},
      {"timestamp": "2026-01-01T11:00:00Z", "value": 45.0}
    ],
    "granularity": "hourly",
    "sensitivity": 85
  }'
import requests

response = requests.post(
    "https://api.canaryedge.com/anomalydetector/v1.1/timeseries/entire/detect",
    headers={
        "Content-Type": "application/json",
        "Ocp-Apim-Subscription-Key": "YOUR_API_KEY",
    },
    json={
        "series": [
            {"timestamp": "2026-01-01T00:00:00Z", "value": 10.5},
            {"timestamp": "2026-01-01T01:00:00Z", "value": 11.2},
            {"timestamp": "2026-01-01T02:00:00Z", "value": 10.8},
            {"timestamp": "2026-01-01T03:00:00Z", "value": 10.1},
            {"timestamp": "2026-01-01T04:00:00Z", "value": 11.0},
            {"timestamp": "2026-01-01T05:00:00Z", "value": 10.6},
            {"timestamp": "2026-01-01T06:00:00Z", "value": 10.9},
            {"timestamp": "2026-01-01T07:00:00Z", "value": 11.1},
            {"timestamp": "2026-01-01T08:00:00Z", "value": 10.4},
            {"timestamp": "2026-01-01T09:00:00Z", "value": 10.7},
            {"timestamp": "2026-01-01T10:00:00Z", "value": 10.3},
            {"timestamp": "2026-01-01T11:00:00Z", "value": 45.0},
        ],
        "granularity": "hourly",
        "sensitivity": 85,
    },
)

print(response.json())
const response = await fetch(
  "https://api.canaryedge.com/anomalydetector/v1.1/timeseries/entire/detect",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "Ocp-Apim-Subscription-Key": "YOUR_API_KEY",
    },
    body: JSON.stringify({
      series: [
        { timestamp: "2026-01-01T00:00:00Z", value: 10.5 },
        { timestamp: "2026-01-01T01:00:00Z", value: 11.2 },
        { timestamp: "2026-01-01T02:00:00Z", value: 10.8 },
        { timestamp: "2026-01-01T03:00:00Z", value: 10.1 },
        { timestamp: "2026-01-01T04:00:00Z", value: 11.0 },
        { timestamp: "2026-01-01T05:00:00Z", value: 10.6 },
        { timestamp: "2026-01-01T06:00:00Z", value: 10.9 },
        { timestamp: "2026-01-01T07:00:00Z", value: 11.1 },
        { timestamp: "2026-01-01T08:00:00Z", value: 10.4 },
        { timestamp: "2026-01-01T09:00:00Z", value: 10.7 },
        { timestamp: "2026-01-01T10:00:00Z", value: 10.3 },
        { timestamp: "2026-01-01T11:00:00Z", value: 45.0 },
      ],
      granularity: "hourly",
      sensitivity: 85,
    }),
  }
);

console.log(await response.json());
The series must contain at least 12 data points. Timestamps must be sorted in ascending order with no duplicates.

3. Read the Response

{
  "period": 0,
  "isAnomaly": [false, false, false, false, false, false, false, false, false, false, false, true],
  "isPositiveAnomaly": [false, false, false, false, false, false, false, false, false, false, false, true],
  "isNegativeAnomaly": [false, false, false, false, false, false, false, false, false, false, false, false],
  "expectedValues": [10.5, 10.83, 10.65, 10.48, 10.72, 10.55, 10.68, 10.77, 10.52, 10.61, 10.49, 10.55],
  "upperMargins": [2.1, 2.17, 2.13, 2.1, 2.14, 2.11, 2.14, 2.15, 2.1, 2.12, 2.1, 2.11],
  "lowerMargins": [2.1, 2.17, 2.13, 2.1, 2.14, 2.11, 2.14, 2.15, 2.1, 2.12, 2.1, 2.11],
  "severity": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.85]
}
The last point (value: 45.0) is flagged as an anomaly — the model expected ~10.55 but observed 45.0, well outside the margin.

4. Drop-in Azure SDK Replacement

If you are migrating from Azure Anomaly Detector, the endpoint paths are identical. Just change the base URL:
from azure.ai.anomalydetector import AnomalyDetectorClient
from azure.core.credentials import AzureKeyCredential

# Before: Azure
# client = AnomalyDetectorClient("https://YOUR_RESOURCE.cognitiveservices.azure.com", AzureKeyCredential("azure-key"))

# After: Canary Edge
client = AnomalyDetectorClient("https://api.canaryedge.com", AzureKeyCredential("YOUR_API_KEY"))

Next Steps

Core Concepts

Understand how Canary Edge detection works.

API Reference

Explore all available endpoints.