Overview

The Elneuro API provides programmatic access to our analytics platform, enabling you to integrate statistical analysis, machine learning, and quality control capabilities directly into your applications and workflows.

API Access Requirements

API access is available for Pro and Enterprise subscribers. Free tier users can explore the API documentation but cannot make authenticated requests.

Base URL

https://api.elneuro.com/v1

Request Format

Authentication

The Elneuro API uses JWT (JSON Web Tokens) for authentication. Include your token in the Authorization header of all requests.

Obtaining an API Token

  1. Log in to your Elneuro account
  2. Navigate to Account Settings > API Access
  3. Click "Generate API Key"
  4. Copy and securely store your token

Using Your Token

# Include in request headers Authorization: Bearer YOUR_API_TOKEN # Example with curl curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \ https://api.elneuro.com/v1/data/datasets

Security Best Practices

  • Never commit API tokens to version control
  • Use environment variables to store tokens
  • Rotate tokens periodically
  • Use separate tokens for development and production

Rate Limits

API requests are rate-limited based on your subscription tier:

Tier Requests/Minute Requests/Day
Pro6010,000
Enterprise300100,000

Rate limit information is included in response headers:

X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1640000000

Error Handling

The API uses standard HTTP status codes and returns detailed error information:

Code Description
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing token
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Error Response Format

{ "error": { "code": "invalid_parameter", "message": "The 'column' parameter must be a valid column name", "details": { "parameter": "column", "value": "nonexistent_column" } } }

Data Management

POST /data/upload

Upload a dataset for analysis. Supports CSV and Excel formats.

Request Body (multipart/form-data)
ParameterTypeDescription
file required file CSV or Excel file (max 50MB)
name string Dataset name (auto-generated if not provided)
Response
{ "dataset_id": "ds_abc123xyz", "name": "sales_data_2024", "rows": 1500, "columns": 12, "column_types": { "date": "datetime", "revenue": "numeric", "region": "categorical" }, "created_at": "2024-01-15T10:30:00Z" }
GET /data/datasets

List all datasets associated with your account.

Response
{ "datasets": [ { "dataset_id": "ds_abc123xyz", "name": "sales_data_2024", "rows": 1500, "columns": 12, "created_at": "2024-01-15T10:30:00Z" } ], "total": 1 }

Statistical Analysis

POST /analysis/descriptive

Compute descriptive statistics for specified columns.

Request Body
{ "dataset_id": "ds_abc123xyz", "columns": ["revenue", "quantity"], "statistics": ["mean", "std", "min", "max", "percentiles"] }
Response
{ "results": { "revenue": { "mean": 15234.56, "std": 4521.23, "min": 500.00, "max": 45000.00, "percentiles": { "25": 12000.00, "50": 14500.00, "75": 18000.00 } } } }
POST /analysis/hypothesis-test

Perform hypothesis tests (t-test, ANOVA, chi-square, etc.).

Request Body
{ "dataset_id": "ds_abc123xyz", "test_type": "two_sample_t", "column": "revenue", "group_column": "region", "alpha": 0.05 }

Machine Learning

POST /ml/train

Train a machine learning model on your dataset.

Request Body
{ "dataset_id": "ds_abc123xyz", "target": "revenue", "features": ["quantity", "discount", "region"], "model_type": "random_forest", "task": "regression", "test_size": 0.2 }
Supported Model Types
  • linear_regression, ridge, lasso
  • logistic_regression
  • decision_tree, random_forest, gradient_boosting
  • svm, knn
  • neural_network
POST /ml/predict

Generate predictions using a trained model.

Request Body
{ "model_id": "model_xyz789", "data": [ {"quantity": 100, "discount": 0.1, "region": "North"}, {"quantity": 250, "discount": 0.15, "region": "South"} ] }

Control Charts (SPC)

POST /spc/control-chart

Generate a control chart with calculated limits.

Request Body
{ "dataset_id": "ds_abc123xyz", "column": "measurement", "chart_type": "xbar_r", "subgroup_size": 5, "spec_limits": { "lsl": 9.5, "usl": 10.5 } }
Chart Types
  • xbar_r - X-bar and R chart
  • xbar_s - X-bar and S chart
  • i_mr - Individuals and Moving Range
  • p_chart - Proportion chart
  • np_chart - Count chart
  • c_chart - Defects chart
  • u_chart - Defects per unit
  • cusum - CUSUM chart
  • ewma - EWMA chart

Python SDK

The official Python SDK provides a convenient interface to the Elneuro API.

Installation

pip install elneuro

Quick Start

import elneuro # Initialize client client = elneuro.Client(api_key="YOUR_API_KEY") # Upload data dataset = client.data.upload("sales_data.csv") # Run descriptive statistics stats = client.analysis.descriptive( dataset_id=dataset.id, columns=["revenue", "quantity"] ) # Train a model model = client.ml.train( dataset_id=dataset.id, target="revenue", features=["quantity", "discount"], model_type="random_forest" ) # Make predictions predictions = model.predict([ {"quantity": 100, "discount": 0.1} ])

Integrations

Database Connections

Connect directly to your data sources:

BI Tool Integration

Embed Elneuro analytics in your dashboards:

Webhooks

Configure webhooks to receive notifications when analyses complete or thresholds are breached.

Webhook Payload

{ "event": "analysis.complete", "timestamp": "2024-01-15T10:35:00Z", "data": { "analysis_id": "an_xyz789", "type": "control_chart", "status": "completed", "alerts": [ { "type": "out_of_control", "point": 45, "value": 10.8, "rule": "above_ucl" } ] } }