Serverless AI Data Analysis
AI powered data analysis service that provides insights, suggestions, anomaly detection, metrics, and chart data structures from datasets in multiple languages.
Endpoint
Analyze datasets and generate insights, suggestions, anomalies, metrics, and visualizations.
POSThttps://api.xtartapp.com/data/analysis
*Authentication
You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.
Request body
Name | Type | Required | Max | Description |
---|---|---|---|---|
dataset | array | Yes | 2000 | Array of data objects to analyze (max 2 000 items) or (characters of the dataset must be less than 60 000). Provide only concise data objects, not full data with multiple fields. |
objective | array | Yes | 5 | Array of analysis objectives/questions (max 5 items, each max 250 characters) |
language | string | Yes | - | The language for analysis output. Supported: auto, en, es, fr, de, zh, ja, ko, pt, it, ru, ar, hi |
Response
Name | Type | Description |
---|---|---|
insights | array | Array of insights discovered in the data (max 25 items, can be empty) |
insights[].category | string | The category of the insight (trend, distribution, correlation, outliers, patterns) |
insights[].description | string | The description of the insight |
insights[].confidence | number | The confidence level of the insight (0-1) |
suggestions | array | Array of suggested actions or improvements, each with priority and impact (max 25 items, can be empty) |
suggestions[].task | string | The task to be performed |
suggestions[].priority | string | The priority of the suggestion (high, medium, low) |
anomalies | array | Array of detected anomalies or outliers (max 25 items, can be empty) |
anomalies[].field | string | The field that has the anomaly |
anomalies[].value | string | The value of the anomaly |
anomalies[].reason | string | The reason for the anomaly |
charts | array | Array of chart data structures for visualization (max 5 items, can be empty) |
charts[].chartType | string | The type of chart (line, bar, pie, etc.) |
charts[].title | string | The title of the chart |
charts[].labels | array | The labels of the chart |
charts[].values | array | The values of the chart |
charts[].description | string | The description of the chart |
metrics | array | Array of calculated metrics (sum, average, count, min, max) with field, value, and description (max 25 items, can be empty) |
metrics[].field | string | The field that the metric is calculated from |
metrics[].type | string | The type of metric (sum, average, count, min, max) |
metrics[].value | number | The value of the metric |
metrics[].description | string | The description of the metric |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | Ex.: The request is invalid. |
400 | DATA_ANALYSIS_ERROR | Ex: could not analyze data | parsing error |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
401 | UNAUTHORIZED | Ex.: The token is invalid. |
429 | TOO_MANY_REQUESTS | Ex.: The request limit has been reached. |