For the complete documentation index, see llms.txt. This page is also available as Markdown.

API explorer (live)

Try the Algenta HTTP API live — set your key and base URL, then send real requests to every endpoint from the browser.

Every endpoint below renders live from the Algenta OpenAPI specification. Expand an operation to see parameters, request and response schemas, and example payloads, then use Test it to call the API directly from this page with your own key.

Generated from the canonical OpenAPI spec, so it always matches the deployed engine. Set your base URL (your self-hosted deployment or https://api.algenta.ai) and API key in the Test it panel. For a flat index see the endpoint reference; for prose, the API overview.

Account

GET /v1/api-keys

List active API keys

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1 · nullableOptional
limitinteger · min: 1 · max: 200 · nullableOptional
Responses
200

Successful Response

application/json
or
get/v1/api-keys
GET /v1/api-keys HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "label": "text",
    "key_prefix": "text",
    "device_limit": 1,
    "status": "text",
    "created_at": "2026-01-01T00:00:00.000Z",
    "last_used_at": "2026-01-01T00:00:00.000Z",
    "expires_at": "2026-01-01T00:00:00.000Z"
  }
]

POST /v1/api-keys

Create a new API key

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
labelstring · min: 1 · max: 255Required
expires_atstring · date-time · nullableOptional
device_limitinteger · nullableOptional
Responses
201

Successful Response

application/json

Returned once at key creation — raw key shown here only.

idstring · uuidRequired
labelstringRequired
key_prefixstringRequired
device_limitintegerRequired

Max registered devices for this key on the local runtime path. 0 preserves the plan's unlimited or no-local-runtime behavior.

raw_keystringRequired

The full API key — shown ONCE, store it securely.

created_atstring · date-timeRequired
expires_atstring · date-time · nullableOptional
post/v1/api-keys
POST /v1/api-keys HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 73

{
  "label": "text",
  "expires_at": "2026-01-01T00:00:00.000Z",
  "device_limit": 1
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "label": "text",
  "key_prefix": "text",
  "device_limit": 1,
  "raw_key": "text",
  "created_at": "2026-01-01T00:00:00.000Z",
  "expires_at": "2026-01-01T00:00:00.000Z"
}

DELETE /v1/api-keys/{key_id}

Revoke an API key

delete
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
key_idstring · uuidRequired
Responses
204

Successful Response

No content

delete/v1/api-keys/{key_id}
DELETE /v1/api-keys/{key_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

GET /v1/distributions

List supported distribution types

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1 · nullableOptional
limitinteger · min: 1 · max: 200 · nullableOptional
Responses
200

Successful Response

application/json
or
get/v1/distributions
GET /v1/distributions HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "name": "text",
    "description": "text",
    "required_params": [
      "text"
    ],
    "optional_params": [
      "text"
    ],
    "example": {}
  }
]

GET /v1/limits

Get execution policy and request safety bounds

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
planstringRequired
max_simulations_per_monthintegerRequired
max_runs_per_simulationintegerRequired
max_batch_itemsintegerRequired
rate_limit_per_minuteintegerRequired
async_jobs_enabledbooleanRequired
webhooks_enabledbooleanRequired
get/v1/limits
GET /v1/limits HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "plan": "text",
  "max_simulations_per_month": 1,
  "max_runs_per_simulation": 1,
  "max_batch_items": 1,
  "rate_limit_per_minute": 1,
  "async_jobs_enabled": true,
  "webhooks_enabled": true
}

GET /v1/me

Get current user and org info

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
get/v1/me
GET /v1/me HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "user": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "email": "text",
    "name": "text",
    "role": "text",
    "email_verified": true,
    "created_at": "2026-01-01T00:00:00.000Z"
  },
  "org": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "slug": "text",
    "plan": "text",
    "status": "text",
    "created_at": "2026-01-01T00:00:00.000Z"
  }
}

PATCH /v1/me

Update current user and/or org name

patch
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
namestring · min: 1 · max: 255 · nullableOptional
org_namestring · min: 1 · max: 255 · nullableOptional
Responses
200

Successful Response

application/json
patch/v1/me
PATCH /v1/me HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "name": "text",
  "org_name": "text"
}
{
  "user": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "email": "text",
    "name": "text",
    "role": "text",
    "email_verified": true,
    "created_at": "2026-01-01T00:00:00.000Z"
  },
  "org": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "slug": "text",
    "plan": "text",
    "status": "text",
    "created_at": "2026-01-01T00:00:00.000Z"
  }
}

POST /v1/products/{product}/onboard

GET /v1/products/{product}/whoami

GET /v1/provider-keys

POST /v1/provider-keys

DELETE /v1/provider-keys/{backend}

POST /v1/telys/onboard

GET /v1/templates

List built-in simulation templates

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1 · nullableOptional
limitinteger · min: 1 · max: 200 · nullableOptional
Responses
200

Successful Response

application/json
or
get/v1/templates
GET /v1/templates HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": "text",
    "name": "text",
    "description": "text",
    "category": "text",
    "example_request": {}
  }
]

GET /v1/usage

Get usage summary for current billing period

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
org_idstring · uuidRequired
billing_periodstringRequired
simulations_runintegerRequired
api_callsintegerRequired
quota_limitintegerRequired
quota_used_pctnumberRequired
get/v1/usage
GET /v1/usage HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "org_id": "123e4567-e89b-12d3-a456-426614174000",
  "billing_period": "text",
  "simulations_run": 1,
  "api_calls": 1,
  "quota_limit": 1,
  "quota_used_pct": 1
}

Agent Runtime

POST /v1/agent/runs

GET /v1/agent/runs

GET /v1/agent/runs/checkpoints

GET /v1/agent/runs/mission-events

GET /v1/agent/runs/telemetry

GET /v1/agent/runs/{run_id}

POST /v1/agent/runs/{run_id}/approve

POST /v1/agent/runs/{run_id}/cancel

GET /v1/agent/runs/{run_id}/checkpoints

GET /v1/agent/runs/{run_id}/events

POST /v1/agent/runs/{run_id}/fork

GET /v1/agent/runs/{run_id}/mission-events

POST /v1/agent/runs/{run_id}/replay

POST /v1/agent/runs/{run_id}/resume

GET /v1/agent/runs/{run_id}/telemetry

Async Jobs

POST /v1/jobs

Submit an async simulation job

post

Submit a large simulation to run asynchronously. Returns a job_id immediately. Poll /v1/jobs/{job_id} for status. Provide a callback_url to receive a webhook when complete.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Request to submit an async simulation job.

requestone ofRequired
or
callback_urlstring · nullableOptional

URL to POST when the job completes. Must be HTTPS in production.

Responses
202

Successful Response

application/json

Returned immediately on job submission.

job_idstring · uuidRequired
run_idstring · uuidRequired
statusstringRequired
poll_urlstringRequired
messagestringOptionalDefault: Job queued. Poll the poll_url for status updates.
post/v1/jobs
POST /v1/jobs HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 260

{
  "request": {
    "mode": "auto",
    "runs": 10000,
    "scenario": {
      "name": "Product launch decision",
      "objective": "maximize_net_value",
      "variables": {
        "cost": {
          "high": 90000,
          "low": 40000
        },
        "revenue": {
          "high": 200000,
          "low": 80000
        }
      }
    },
    "simulation_model": "monte_carlo"
  },
  "callback_url": "text"
}
{
  "job_id": "123e4567-e89b-12d3-a456-426614174000",
  "run_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "text",
  "poll_url": "text",
  "message": "Job queued. Poll the poll_url for status updates."
}

GET /v1/jobs/list

List async jobs for this org

get

Paginated list of all jobs for the authenticated org.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1OptionalDefault: 1
limitinteger · min: 1 · max: 200OptionalDefault: 25
statusstring · nullableOptional
Responses
200

Successful Response

application/json
object · Response List Jobs V1 Jobs List GetOptional
get/v1/jobs/list
GET /v1/jobs/list HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

GET /v1/jobs/{job_id}

Poll job status

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
job_idstring · uuidRequired
Responses
200

Successful Response

application/json

Job status returned by poll endpoint.

job_idstring · uuidRequired
run_idstring · uuidRequired
org_idstring · uuidRequired
statusstringRequired
queue_namestringRequired
retry_countintegerRequired
callback_urlstring · nullableRequired
callback_statusstringRequired
error_messagestring · nullableRequired
created_atstring · date-timeRequired
started_atstring · date-time · nullableRequired
completed_atstring · date-time · nullableRequired
ttl_expires_atstring · date-time · nullableRequired
poll_urlstringRequired
get/v1/jobs/{job_id}
GET /v1/jobs/{job_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "job_id": "123e4567-e89b-12d3-a456-426614174000",
  "run_id": "123e4567-e89b-12d3-a456-426614174000",
  "org_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "text",
  "queue_name": "text",
  "retry_count": 1,
  "callback_url": "text",
  "callback_status": "text",
  "error_message": "text",
  "created_at": "2026-01-01T00:00:00.000Z",
  "started_at": "2026-01-01T00:00:00.000Z",
  "completed_at": "2026-01-01T00:00:00.000Z",
  "ttl_expires_at": "2026-01-01T00:00:00.000Z",
  "poll_url": "text"
}

POST /v1/jobs/{job_id}/cancel

Cancel a job

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
job_idstring · uuidRequired
Responses
200

Successful Response

application/json

Job status returned by poll endpoint.

job_idstring · uuidRequired
run_idstring · uuidRequired
org_idstring · uuidRequired
statusstringRequired
queue_namestringRequired
retry_countintegerRequired
callback_urlstring · nullableRequired
callback_statusstringRequired
error_messagestring · nullableRequired
created_atstring · date-timeRequired
started_atstring · date-time · nullableRequired
completed_atstring · date-time · nullableRequired
ttl_expires_atstring · date-time · nullableRequired
poll_urlstringRequired
post/v1/jobs/{job_id}/cancel
POST /v1/jobs/{job_id}/cancel HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "job_id": "123e4567-e89b-12d3-a456-426614174000",
  "run_id": "123e4567-e89b-12d3-a456-426614174000",
  "org_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "text",
  "queue_name": "text",
  "retry_count": 1,
  "callback_url": "text",
  "callback_status": "text",
  "error_message": "text",
  "created_at": "2026-01-01T00:00:00.000Z",
  "started_at": "2026-01-01T00:00:00.000Z",
  "completed_at": "2026-01-01T00:00:00.000Z",
  "ttl_expires_at": "2026-01-01T00:00:00.000Z",
  "poll_url": "text"
}

GET /v1/jobs/{job_id}/result

Fetch job result

get

Returns the full result if completed, or 202 with status if still processing.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
job_idstring · uuidRequired
Responses
200

Successful Response

application/json
object · Response Get Job Result Endpoint V1 Jobs Job Id Result GetOptional
get/v1/jobs/{job_id}/result
GET /v1/jobs/{job_id}/result HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

POST /v1/webhooks/test

Test webhook delivery

post

Send a test webhook payload to a URL and return the delivery result.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
callback_urlstringRequired

URL to send test webhook to

Responses
200

Successful Response

application/json
successbooleanRequired
status_codeintegerRequired
messagestringRequired
post/v1/webhooks/test
POST /v1/webhooks/test HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "callback_url": "text"
}
{
  "success": true,
  "status_code": 1,
  "message": "text"
}

Auth

POST /v1/auth/forgot-password

POST /v1/auth/login

POST /v1/auth/reset-password

POST /v1/auth/signup

GET /v1/auth/verify

BYOK

GET /v1/byok

POST /v1/byok

DELETE /v1/byok

Billing

POST /v1/billing/checkout

Create Stripe Checkout session

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
object · Response Checkout V1 Billing Checkout PostOptional
post/v1/billing/checkout
POST /v1/billing/checkout HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{}

GET /v1/billing/info

Get current billing info

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
object · Response Billing Info V1 Billing Info GetOptional
get/v1/billing/info
GET /v1/billing/info HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{}

GET /v1/billing/plans

POST /v1/billing/portal

Create Stripe Billing Portal session

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
object · Response Portal V1 Billing Portal PostOptional
post/v1/billing/portal
POST /v1/billing/portal HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{}

Calibration

GET /v1/calibration

Get confidence calibration status

get

Returns the org's historical prediction accuracy metrics computed from all recorded outcomes (PATCH /v1/decisions/{id}/outcome). The confidence_multiplier is applied automatically to every simulation and recommendation once n_samples >= 5.

Key fields

  • bias: mean relative error — negative means over-optimistic

  • hit_rate: fraction of predictions within ±20% of actual

  • confidence_multiplier: factor currently applied to raw simulation confidence

  • is_reliable: false until 5+ outcomes are recorded

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json

Org-level confidence calibration state.

org_idstringRequired
is_reliablebooleanRequired
n_samplesintegerRequired
biasnumber · nullableRequired
rmse_pctnumber · nullableRequired
hit_ratenumber · nullableRequired
directionstringRequired
confidence_multipliernumberRequired
summarystringRequired
last_updatedstring · nullableRequired
get/v1/calibration
GET /v1/calibration HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "org_id": "text",
  "is_reliable": true,
  "n_samples": 1,
  "bias": 1,
  "rmse_pct": 1,
  "hit_rate": 1,
  "direction": "text",
  "confidence_multiplier": 1,
  "summary": "text",
  "last_updated": "text"
}

Capability Plane

GET /v1/capabilities

POST /v1/capabilities/execute

POST /v1/capabilities/outcomes

POST /v1/capabilities/route

GET /v1/capabilities/{capability_id}

GET /v1/capability-bindings

POST /v1/capability-bindings

POST /v1/capability-bindings/discover

POST /v1/capability-bindings/test

GET /v1/capability-bindings/{binding_id}

PATCH /v1/capability-bindings/{binding_id}

DELETE /v1/capability-bindings/{binding_id}

POST /v1/capability-bindings/{binding_id}/authorize/complete

POST /v1/capability-bindings/{binding_id}/authorize/start

POST /v1/capability-bindings/{binding_id}/discover

POST /v1/capability-bindings/{binding_id}/test

POST /v1/capability-executions/{plan_id}/approve

GET /v1/capability-providers

GET /v1/capability-providers/{provider_id}

Data

GET /v1/data

List visible datasets for the caller.

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1OptionalDefault: 1
limitinteger · min: 1 · max: 200 · nullableOptional
searchstring · nullableOptional
statusstring · nullableOptional
source_namestring · nullableOptional
compactbooleanOptionalDefault: false
Responses
200

Successful Response

application/json
object · Response List Data V1 Data GetOptional
get/v1/data
GET /v1/data HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

POST /v1/data/connect

Connect data, pick a dataset, and make it queryable.

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
connection_typestring · nullableOptional

database | api | object_storage | file_upload

dataset_namestringRequired

Public dataset name.

providerstring · nullableOptional

Specific provider such as postgres, snowflake, s3, rest.

connectorobject · Connector · nullableOptional

Canonical connector envelope with type/location/auth/options. Preferred for cross-SDK and MCP compatibility.

connection_idstring · nullableOptional

Reuse an existing saved connection.

connection_namestring · nullableOptional

Optional saved connection label.

connection_configobject · Connection Config · nullableOptional

Connector credentials/config.

selectionobject · Selection · nullableOptional

Chosen table/query/path.

descriptionstring · nullableOptional
visibilitystring · nullableOptional

private | shared

recordsobject[] · nullableOptional
csvstring · nullableOptional
json_strstring · nullableOptional
urlstring · nullableOptional
excel_b64string · nullableOptional
parquet_b64string · nullableOptional
Responses
200

Successful Response

application/json
object · Response Connect Dataset V1 Data Connect PostOptional
post/v1/data/connect
POST /v1/data/connect HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 307

{
  "connection_type": "text",
  "dataset_name": "text",
  "provider": "text",
  "connector": {},
  "connection_id": "text",
  "connection_name": "text",
  "connection_config": {},
  "selection": {},
  "description": "text",
  "visibility": "text",
  "records": [
    {}
  ],
  "csv": "text",
  "json_str": "text",
  "url": "text",
  "excel_b64": "text",
  "parquet_b64": "text"
}
{}

GET /v1/data/{dataset_id}

Get one dataset plus its schema.

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
dataset_idstringRequired
Responses
200

Successful Response

application/json
object · Response Get Data V1 Data Dataset Id GetOptional
get/v1/data/{dataset_id}
GET /v1/data/{dataset_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

DELETE /v1/data/{dataset_id}

Disconnect data by deleting the dataset.

delete
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
dataset_idstringRequired
Responses
200

Successful Response

application/json
object · Response Disconnect Data V1 Data Dataset Id DeleteOptional
delete/v1/data/{dataset_id}
DELETE /v1/data/{dataset_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

POST /v1/data/{dataset_id}/refresh

Refresh a dataset from its saved origin.

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
dataset_idstringRequired
Responses
200

Successful Response

application/json
object · Response Refresh Data V1 Data Dataset Id Refresh PostOptional
post/v1/data/{dataset_id}/refresh
POST /v1/data/{dataset_id}/refresh HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

GET /v1/data/{dataset_id}/summary

Get low-token discovery summary for one dataset.

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
dataset_idstringRequired
Responses
200

Successful Response

application/json
object · Response Get Data Summary V1 Data Dataset Id Summary GetOptional
get/v1/data/{dataset_id}/summary
GET /v1/data/{dataset_id}/summary HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

Data Connectors

GET /v1/connectors

List data connectors

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1 · nullableOptional
limitinteger · min: 1 · max: 200 · nullableOptional
Responses
200

Successful Response

application/json
or
get/v1/connectors
GET /v1/connectors HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": "text",
    "name": "text",
    "description": "text",
    "connector_type": "text",
    "status": "text",
    "visibility": "text",
    "last_tested_at": "2026-01-01T00:00:00.000Z",
    "error_message": "text",
    "created_at": "2026-01-01T00:00:00.000Z"
  }
]

POST /v1/connectors

Create a data connector with credentials

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
namestringRequired
connector_typestringRequired
descriptionstring · nullableOptional
visibilitystring · nullableOptional
configobject · Config · nullableOptional
Responses
201

Successful Response

application/json
idstringRequired
namestringRequired
descriptionstring · nullableOptional
connector_typestringRequired
statusstringRequired
visibilitystringRequired
last_tested_atstring · date-time · nullableRequired
error_messagestring · nullableRequired
created_atstring · date-timeRequired
post/v1/connectors
POST /v1/connectors HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 92

{
  "name": "text",
  "connector_type": "text",
  "description": "text",
  "visibility": "text",
  "config": {}
}
{
  "id": "text",
  "name": "text",
  "description": "text",
  "connector_type": "text",
  "status": "text",
  "visibility": "text",
  "last_tested_at": "2026-01-01T00:00:00.000Z",
  "error_message": "text",
  "created_at": "2026-01-01T00:00:00.000Z"
}

POST /v1/connectors/browse

Browse an inline connector preview without saving it

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
connector_typestringRequired
configobject · Config · nullableOptional
Responses
200

Successful Response

application/json
connector_typestringRequired
itemsobject[]Required
totalintegerRequired
messagestringRequired
labelsobject · LabelsRequired
discoveryobject · DiscoveryRequired
post/v1/connectors/browse
POST /v1/connectors/browse HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "connector_type": "text",
  "config": {}
}
{
  "connector_type": "text",
  "items": [
    {}
  ],
  "total": 1,
  "message": "text",
  "labels": {},
  "discovery": {}
}

POST /v1/connectors/test

Test an inline connector preview without saving it

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
connector_typestringRequired
configobject · Config · nullableOptional
Responses
200

Successful Response

application/json
successbooleanRequired
messagestringRequired
latency_msinteger · nullableOptional
statusstring · nullableOptional
error_typestring · nullableOptional
recoverableboolean · nullableOptional
post/v1/connectors/test
POST /v1/connectors/test HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "connector_type": "text",
  "config": {}
}
{
  "success": true,
  "message": "text",
  "latency_ms": 1,
  "status": "text",
  "error_type": "text",
  "recoverable": true
}

GET /v1/connectors/types

List supported connector types

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
Other propertiesstring[]Optional
get/v1/connectors/types
GET /v1/connectors/types HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "ANY_ADDITIONAL_PROPERTY": [
    "text"
  ]
}

GET /v1/connectors/{connector_id}

Get one data connector

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
connector_idstring · uuidRequired
Responses
200

Successful Response

application/json
idstringRequired
namestringRequired
descriptionstring · nullableOptional
connector_typestringRequired
statusstringRequired
visibilitystringRequired
last_tested_atstring · date-time · nullableRequired
error_messagestring · nullableRequired
created_atstring · date-timeRequired
get/v1/connectors/{connector_id}
GET /v1/connectors/{connector_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "text",
  "name": "text",
  "description": "text",
  "connector_type": "text",
  "status": "text",
  "visibility": "text",
  "last_tested_at": "2026-01-01T00:00:00.000Z",
  "error_message": "text",
  "created_at": "2026-01-01T00:00:00.000Z"
}

PATCH /v1/connectors/{connector_id}

Update connector name or config

patch
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
connector_idstring · uuidRequired
Body
namestring · nullableOptional
descriptionstring · nullableOptional
visibilitystring · nullableOptional
configobject · Config · nullableOptional
Responses
200

Successful Response

application/json
idstringRequired
namestringRequired
descriptionstring · nullableOptional
connector_typestringRequired
statusstringRequired
visibilitystringRequired
last_tested_atstring · date-time · nullableRequired
error_messagestring · nullableRequired
created_atstring · date-timeRequired
patch/v1/connectors/{connector_id}
PATCH /v1/connectors/{connector_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "name": "text",
  "description": "text",
  "visibility": "text",
  "config": {}
}
{
  "id": "text",
  "name": "text",
  "description": "text",
  "connector_type": "text",
  "status": "text",
  "visibility": "text",
  "last_tested_at": "2026-01-01T00:00:00.000Z",
  "error_message": "text",
  "created_at": "2026-01-01T00:00:00.000Z"
}

DELETE /v1/connectors/{connector_id}

Delete a data connector

delete
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
connector_idstring · uuidRequired
Responses
204

Successful Response

No content

delete/v1/connectors/{connector_id}
DELETE /v1/connectors/{connector_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

GET /v1/connectors/{connector_id}/browse

Browse connector schema — list tables, files, or datasets

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
connector_idstring · uuidRequired
Responses
200

Successful Response

application/json
connector_typestringRequired
itemsobject[]Required
totalintegerRequired
messagestringRequired
labelsobject · LabelsRequired
discoveryobject · DiscoveryRequired
get/v1/connectors/{connector_id}/browse
GET /v1/connectors/{connector_id}/browse HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "connector_type": "text",
  "items": [
    {}
  ],
  "total": 1,
  "message": "text",
  "labels": {},
  "discovery": {}
}

POST /v1/connectors/{connector_id}/test

Test connector — real connection attempt

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
connector_idstring · uuidRequired
Responses
200

Successful Response

application/json
successbooleanRequired
messagestringRequired
latency_msinteger · nullableOptional
statusstring · nullableOptional
error_typestring · nullableOptional
recoverableboolean · nullableOptional
post/v1/connectors/{connector_id}/test
POST /v1/connectors/{connector_id}/test HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "success": true,
  "message": "text",
  "latency_ms": 1,
  "status": "text",
  "error_type": "text",
  "recoverable": true
}

Data Mapping

POST /v1/map

Instantly map any dataset — no schema, no ETL

post

Connect and understand any dataset instantly.

Drop in CSV files, JSON records, or table names from multiple sources. Get back a unified schema with every field mapped, explained, and ready to run decisions on.

What it detects:

  • Matching fields across sources (revenue ↔ sales, qty ↔ quantity)

  • Value distributions (lognormal for prices, triangular for ranges)

  • Polarity (cost → negative, revenue → positive)

  • Join keys between tables (background if slow)

  • Derived formulas A×B≈C (background if slow)

  • Confidence and plain-English reasoning for every mapping

Two-speed pipeline: Phase 1 (schema + column matches) returns in <300ms. Phase 2 (join detection + relation detection) is embedded in the response if it finishes within 200ms, otherwise deep_analysis_pending: true is set and results can be retrieved via GET /v1/map/{map_id}.

The data funnel: Upload → Map → Query → Decide → Optimize

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Drop in any data sources. Get back semantic field mappings and a unified schema.

No configuration required. The engine auto-detects:

  • Which fields represent the same concept across sources
  • Distribution shapes for numeric fields
  • Polarity (revenue → positive, cost → negative)
  • Primary/foreign keys for joins
  • Confidence and reasoning for every mapping
min_confidencenumber · max: 1Optional

Minimum confidence threshold for mappings (default: 0.5)

Default: 0.5
include_statisticsbooleanOptional

Include value distribution statistics in response

Default: true
Responses
200

Successful Response

application/json
map_idstringRequired
sources_analyzedintegerRequired
total_fieldsintegerRequired
join_keysobject[]Required
derived_relationshipsobject[]Required
simulation_readybooleanRequired
simulation_payloadobject · Simulation Payload · nullableRequired
deep_analysis_pendingbooleanOptionalDefault: false
latency_msnumberRequired
post/v1/map
POST /v1/map HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 245

{
  "sources": [
    {
      "name": "text",
      "dataset_id": "text",
      "source_id": "text",
      "records": [
        {}
      ],
      "csv": "text",
      "json_str": "text",
      "url": "text",
      "excel_b64": "text",
      "parquet_b64": "text",
      "connection": {},
      "table": "text"
    }
  ],
  "min_confidence": 0.5,
  "include_statistics": true
}
{
  "map_id": "text",
  "sources_analyzed": 1,
  "total_fields": 1,
  "mappings": [
    {
      "source_field": "text",
      "source": "text",
      "target_field": "text",
      "target": "text",
      "confidence": 1,
      "reason": [
        "text"
      ],
      "match_type": "text"
    }
  ],
  "unified_schema": [
    {
      "name": "text",
      "sources": [
        "text"
      ],
      "distribution": "text",
      "unit": "text",
      "polarity": 1,
      "sample_values": []
    }
  ],
  "join_keys": [
    {}
  ],
  "derived_relationships": [
    {}
  ],
  "simulation_ready": true,
  "simulation_payload": {},
  "deep_analysis_pending": false,
  "latency_ms": 1
}

GET /v1/map/{map_id}

Poll for deep analysis (join keys + derived relationships)

get

When POST /v1/map returns deep_analysis_pending: true, poll this endpoint with the map_id to retrieve join keys, derived relationships, and the simulation payload once Phase 2 analysis completes.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
map_idstringRequired
Responses
200

Successful Response

application/json
object · Response Get Deep Analysis V1 Map Map Id GetOptional
get/v1/map/{map_id}
GET /v1/map/{map_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

Datasets

GET /v1/datasets

List all datasets registered for this org

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1OptionalDefault: 1
limitinteger · min: 1 · max: 200 · nullableOptional
searchstring · nullableOptional
statusstring · nullableOptional
source_namestring · nullableOptional
compactbooleanOptionalDefault: false
Responses
200

Successful Response

application/json
object · Response List Datasets V1 Datasets GetOptional
get/v1/datasets
GET /v1/datasets HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

POST /v1/datasets/onboard

Onboard a dataset — zero-config schema profiling + auto-training

post

Drop in data → instantly queryable.

  • Accepts JSON records, inline CSV, or column names only

  • Profiles schema and role-classifies every column automatically

  • Auto-suggests domain aliases (PPA → per/person/average, etc.)

  • Fires background semantic training immediately when the training runtime is installed

  • Returns model tier — queries work immediately via base/deterministic fallback

For file uploads (CSV, Excel, Parquet, JSON) use POST /v1/datasets/onboard/file.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Register any data source for semantic querying.

Provide data via ONE of: records — list of row dicts (JSON records) csv — raw CSV text (headers in first row) columns — list of column name strings (schema-only, no samples)

For file uploads use POST /v1/datasets/onboard/file.

namestringOptional

Human-readable dataset name

Default: dataset
source_namestring · nullableOptional

Table name used in the schema

recordsobject[] · nullableOptional

JSON records (list of row dicts)

csvstring · nullableOptional

Raw CSV text with header row

columnsstring[] · nullableOptional

Column names only — no data required

async_trainbooleanOptional

Fire background semantic training immediately

Default: true
epochsinteger · min: 5 · max: 500OptionalDefault: 80
batch_sizeinteger · min: 8 · max: 256OptionalDefault: 32
Responses
200

Successful Response

application/json
dataset_idstringRequired
namestringRequired
schema_hashstringRequired
statusstringRequired
model_tierstringRequired
decision_modestringRequired
source_namesstring[]Required
column_countintegerRequired
registered_atstring · nullableRequired
updated_atstring · nullableRequired
schemaobject · SchemaRequired
latency_msnumberRequired
post/v1/datasets/onboard
POST /v1/datasets/onboard HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 187

{
  "name": "dataset",
  "source_name": "text",
  "records": [
    {}
  ],
  "csv": "text",
  "columns": [
    "text"
  ],
  "domain_aliases": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "async_train": true,
  "epochs": 80,
  "batch_size": 32
}
{
  "dataset_id": "text",
  "name": "text",
  "schema_hash": "text",
  "status": "text",
  "model_tier": "text",
  "decision_mode": "text",
  "source_names": [
    "text"
  ],
  "column_count": 1,
  "domain_aliases": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "registered_at": "text",
  "updated_at": "text",
  "schema": {},
  "suggested_aliases": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "latency_ms": 1
}

POST /v1/datasets/onboard/file

Onboard from file upload — CSV, Excel, Parquet, JSON, JSONL

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
filestring · binaryRequired
namestringOptionalDefault: dataset
source_namestring · nullableOptional
domain_aliases_jsonstring · nullableOptional
async_trainbooleanOptionalDefault: true
epochsintegerOptionalDefault: 80
batch_sizeintegerOptionalDefault: 32
Responses
200

Successful Response

application/json
dataset_idstringRequired
namestringRequired
schema_hashstringRequired
statusstringRequired
model_tierstringRequired
decision_modestringRequired
source_namesstring[]Required
column_countintegerRequired
registered_atstring · nullableRequired
updated_atstring · nullableRequired
schemaobject · SchemaRequired
latency_msnumberRequired
post/v1/datasets/onboard/file
POST /v1/datasets/onboard/file HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 131

{
  "file": "binary",
  "name": "dataset",
  "source_name": "text",
  "domain_aliases_json": "text",
  "async_train": true,
  "epochs": 80,
  "batch_size": 32
}
{
  "dataset_id": "text",
  "name": "text",
  "schema_hash": "text",
  "status": "text",
  "model_tier": "text",
  "decision_mode": "text",
  "source_names": [
    "text"
  ],
  "column_count": 1,
  "domain_aliases": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "registered_at": "text",
  "updated_at": "text",
  "schema": {},
  "suggested_aliases": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "latency_ms": 1
}

POST /v1/datasets/{dataset_id}/retrain

Re-trigger semantic training for a dataset

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
dataset_idstringRequired
Query parameters
epochsintegerOptionalDefault: 80
batch_sizeintegerOptionalDefault: 32
Responses
200

Successful Response

application/json
object · Response Retrain Dataset V1 Datasets Dataset Id Retrain PostOptional
post/v1/datasets/{dataset_id}/retrain
POST /v1/datasets/{dataset_id}/retrain HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

GET /v1/datasets/{dataset_id}/status

Live status and model tier for a dataset

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
dataset_idstringRequired
Responses
200

Successful Response

application/json
dataset_idstringRequired
namestringRequired
schema_hashstringRequired
statusstringRequired
model_tierstringRequired
decision_modestringRequired
source_namesstring[]Required
column_countintegerRequired
registered_atstring · nullableRequired
updated_atstring · nullableRequired
get/v1/datasets/{dataset_id}/status
GET /v1/datasets/{dataset_id}/status HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "dataset_id": "text",
  "name": "text",
  "schema_hash": "text",
  "status": "text",
  "model_tier": "text",
  "decision_mode": "text",
  "source_names": [
    "text"
  ],
  "column_count": 1,
  "domain_aliases": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "registered_at": "text",
  "updated_at": "text"
}

Decision

POST /v1/batch

Run multiple simulations in one request

post

Submit 1–100 simulation requests. Partial failures are allowed; failed items include an error message.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Request body for /v1/batch.

Responses
200

Successful Response

application/json

Response from /v1/batch.

totalintegerRequired
succeededintegerRequired
failedintegerRequired
post/v1/batch
POST /v1/batch HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 238

{
  "items": [
    {
      "mode": "auto",
      "runs": 10000,
      "scenario": {
        "name": "Product launch decision",
        "objective": "maximize_net_value",
        "variables": {
          "cost": {
            "high": 90000,
            "low": 40000
          },
          "revenue": {
            "high": 200000,
            "low": 80000
          }
        }
      },
      "simulation_model": "monte_carlo"
    }
  ]
}
{
  "total": 1,
  "succeeded": 1,
  "failed": 1,
  "results": [
    {
      "index": 1,
      "success": true,
      "envelope": {
        "run_id": "123e4567-e89b-12d3-a456-426614174000",
        "status": "completed",
        "engine_version": "text",
        "recommended_action": "text",
        "confidence": 1,
        "rationale": "text",
        "metrics": {
          "expected_value": 1,
          "median": 1,
          "std_deviation": 1,
          "variance": 1,
          "probability_of_loss": 1,
          "var_95": 1,
          "cvar_95": 1
        },
        "percentiles": {
          "p5": 1,
          "p10": 1,
          "p25": 1,
          "p50": 1,
          "p75": 1,
          "p90": 1,
          "p95": 1,
          "p99": 1
        },
        "scenarios_run": 1,
        "execution_ms": 1,
        "metadata": {
          "mode": "text",
          "seed": 1,
          "billing_units": 1,
          "engine_version": "text"
        },
        "simulation_model": "monte_carlo",
        "engine_type": "text",
        "simulation_class": "predictive",
        "model_revision": "text",
        "assumptions_hash": "text",
        "validated_inputs": {},
        "confidence_interval": {},
        "request_id": "text",
        "scenario_analysis": {},
        "sensitivity_analysis": {},
        "bootstrap_result": {},
        "mcmc_result": {},
        "importance_sampling_result": {},
        "scenario_ranking": [
          {}
        ],
        "sensitivity_ranking": [
          {}
        ],
        "score": 1,
        "score_breakdown": {},
        "created_at": "2026-01-01T00:00:00.000Z",
        "decision_tree_result": {},
        "time_series_result": {},
        "formatted_result": {},
        "unit_context": {},
        "unit_warnings": [
          "text"
        ],
        "charts": {},
        "histogram_data": {},
        "decision_plan": {
          "recommended_action": "text",
          "confidence": 1,
          "expected_value": 1,
          "risk": {
            "p5": 1,
            "p95": 1,
            "probability_of_loss": 1,
            "var_95": 1
          },
          "options": [
            {
              "name": "text",
              "rank": 1,
              "expected_value": 1,
              "risk": {
                "p5": 1,
                "p95": 1,
                "probability_of_loss": 1,
                "var_95": 1
              },
              "score": 1
            }
          ],
          "rationale": "text",
          "integrity": {},
          "calibration": "text"
        },
        "request_hash": "text",
        "result_hash": "text"
      },
      "error": "text"
    }
  ]
}

POST /v1/compare

Side-by-side scenario comparison

post

Run and compare 2–10 named scenarios. Returns full results with deltas versus the winning scenario.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Request body for /v1/compare.

runsinteger · min: 100 · max: 100000OptionalDefault: 10000
seedinteger · nullableOptional
Responses
200

Successful Response

application/json

Response from /v1/compare.

winnerstringRequired
post/v1/compare
POST /v1/compare HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 290

{
  "scenarios": [
    {
      "name": "text",
      "request": {
        "mode": "auto",
        "runs": 10000,
        "scenario": {
          "name": "Product launch decision",
          "objective": "maximize_net_value",
          "variables": {
            "cost": {
              "high": 90000,
              "low": 40000
            },
            "revenue": {
              "high": 200000,
              "low": 80000
            }
          }
        },
        "simulation_model": "monte_carlo"
      }
    }
  ],
  "runs": 10000,
  "seed": 1
}
{
  "winner": "text",
  "margin": {
    "expected_value_delta": 1,
    "probability_of_loss_delta": 1,
    "score_delta": 1
  },
  "scenarios": [
    {
      "name": "text",
      "envelope": {
        "run_id": "123e4567-e89b-12d3-a456-426614174000",
        "status": "completed",
        "engine_version": "text",
        "recommended_action": "text",
        "confidence": 1,
        "rationale": "text",
        "metrics": {
          "expected_value": 1,
          "median": 1,
          "std_deviation": 1,
          "variance": 1,
          "probability_of_loss": 1,
          "var_95": 1,
          "cvar_95": 1
        },
        "percentiles": {
          "p5": 1,
          "p10": 1,
          "p25": 1,
          "p50": 1,
          "p75": 1,
          "p90": 1,
          "p95": 1,
          "p99": 1
        },
        "scenarios_run": 1,
        "execution_ms": 1,
        "metadata": {
          "mode": "text",
          "seed": 1,
          "billing_units": 1,
          "engine_version": "text"
        },
        "simulation_model": "monte_carlo",
        "engine_type": "text",
        "simulation_class": "predictive",
        "model_revision": "text",
        "assumptions_hash": "text",
        "validated_inputs": {},
        "confidence_interval": {},
        "request_id": "text",
        "scenario_analysis": {},
        "sensitivity_analysis": {},
        "bootstrap_result": {},
        "mcmc_result": {},
        "importance_sampling_result": {},
        "scenario_ranking": [
          {}
        ],
        "sensitivity_ranking": [
          {}
        ],
        "score": 1,
        "score_breakdown": {},
        "created_at": "2026-01-01T00:00:00.000Z",
        "decision_tree_result": {},
        "time_series_result": {},
        "formatted_result": {},
        "unit_context": {},
        "unit_warnings": [
          "text"
        ],
        "charts": {},
        "histogram_data": {},
        "decision_plan": {
          "recommended_action": "text",
          "confidence": 1,
          "expected_value": 1,
          "risk": {
            "p5": 1,
            "p95": 1,
            "probability_of_loss": 1,
            "var_95": 1
          },
          "options": [
            {
              "name": "text",
              "rank": 1,
              "expected_value": 1,
              "risk": {
                "p5": 1,
                "p95": 1,
                "probability_of_loss": 1,
                "var_95": 1
              },
              "score": 1
            }
          ],
          "rationale": "text",
          "integrity": {},
          "calibration": "text"
        },
        "request_hash": "text",
        "result_hash": "text"
      },
      "delta_vs_best": {
        "expected_value_delta": 1,
        "probability_of_loss_delta": 1,
        "score_delta": 1
      }
    }
  ]
}

POST /v1/recommend

Compare actions and get a recommendation

post

Run simulations for 2–10 named actions and return them ranked by expected value. The top-ranked action is returned as recommended_action.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Request body for /v1/recommend — compare 2-10 named actions.

runsinteger · min: 100 · max: 100000OptionalDefault: 10000
seedinteger · nullableOptional
Responses
200

Successful Response

application/json

Response from /v1/recommend.

recommended_actionstringRequired
confidencenumber · max: 1Required
rationalestringRequired
total_actionsintegerRequired
post/v1/recommend
POST /v1/recommend HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 330

{
  "actions": [
    {
      "name": "launch_product_a",
      "request": {
        "mode": "auto",
        "scenario": {
          "objective": "maximize_net_value",
          "variables": {
            "revenue": {
              "high": 200000,
              "low": 80000
            }
          }
        }
      }
    },
    {
      "name": "launch_product_b",
      "request": {
        "mode": "auto",
        "scenario": {
          "objective": "maximize_net_value",
          "variables": {
            "revenue": {
              "high": 300000,
              "low": 50000
            }
          }
        }
      }
    }
  ],
  "runs": 10000
}
{
  "recommended_action": "text",
  "confidence": 1,
  "rationale": "text",
  "action_results": [
    {
      "name": "text",
      "rank": 1,
      "envelope": {
        "run_id": "123e4567-e89b-12d3-a456-426614174000",
        "status": "completed",
        "engine_version": "text",
        "recommended_action": "text",
        "confidence": 1,
        "rationale": "text",
        "metrics": {
          "expected_value": 1,
          "median": 1,
          "std_deviation": 1,
          "variance": 1,
          "probability_of_loss": 1,
          "var_95": 1,
          "cvar_95": 1
        },
        "percentiles": {
          "p5": 1,
          "p10": 1,
          "p25": 1,
          "p50": 1,
          "p75": 1,
          "p90": 1,
          "p95": 1,
          "p99": 1
        },
        "scenarios_run": 1,
        "execution_ms": 1,
        "metadata": {
          "mode": "text",
          "seed": 1,
          "billing_units": 1,
          "engine_version": "text"
        },
        "simulation_model": "monte_carlo",
        "engine_type": "text",
        "simulation_class": "predictive",
        "model_revision": "text",
        "assumptions_hash": "text",
        "validated_inputs": {},
        "confidence_interval": {},
        "request_id": "text",
        "scenario_analysis": {},
        "sensitivity_analysis": {},
        "bootstrap_result": {},
        "mcmc_result": {},
        "importance_sampling_result": {},
        "scenario_ranking": [
          {}
        ],
        "sensitivity_ranking": [
          {}
        ],
        "score": 1,
        "score_breakdown": {},
        "created_at": "2026-01-01T00:00:00.000Z",
        "decision_tree_result": {},
        "time_series_result": {},
        "formatted_result": {},
        "unit_context": {},
        "unit_warnings": [
          "text"
        ],
        "charts": {},
        "histogram_data": {},
        "decision_plan": {
          "recommended_action": "text",
          "confidence": 1,
          "expected_value": 1,
          "risk": {
            "p5": 1,
            "p95": 1,
            "probability_of_loss": 1,
            "var_95": 1
          },
          "options": [
            {
              "name": "text",
              "rank": 1,
              "expected_value": 1,
              "risk": {
                "p5": 1,
                "p95": 1,
                "probability_of_loss": 1,
                "var_95": 1
              },
              "score": 1
            }
          ],
          "rationale": "text",
          "integrity": {},
          "calibration": "text"
        },
        "request_hash": "text",
        "result_hash": "text"
      },
      "expected_value": 1,
      "probability_of_loss": 1,
      "score": 1
    }
  ],
  "total_actions": 1,
  "decision_plan": {
    "recommended_action": "text",
    "confidence": 1,
    "expected_value": 1,
    "risk": {
      "p5": 1,
      "p95": 1,
      "probability_of_loss": 1,
      "var_95": 1
    },
    "options": [
      {
        "name": "text",
        "rank": 1,
        "expected_value": 1,
        "risk": {
          "p5": 1,
          "p95": 1,
          "probability_of_loss": 1,
          "var_95": 1
        },
        "score": 1
      }
    ],
    "rationale": "text",
    "integrity": {},
    "calibration": "text"
  }
}

POST /v1/score

Score a simulation with custom weights

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Request body for /v1/score.

requestone ofRequired
or
Responses
200

Successful Response

application/json

Response from /v1/score — DecisionEnvelope with score breakdown.

scorenumber · max: 1Required
post/v1/score
POST /v1/score HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 286

{
  "request": {
    "mode": "auto",
    "runs": 10000,
    "scenario": {
      "name": "Product launch decision",
      "objective": "maximize_net_value",
      "variables": {
        "cost": {
          "high": 90000,
          "low": 40000
        },
        "revenue": {
          "high": 200000,
          "low": 80000
        }
      }
    },
    "simulation_model": "monte_carlo"
  },
  "scoring_weights": {
    "ANY_ADDITIONAL_PROPERTY": 1
  }
}
{
  "envelope": {
    "run_id": "123e4567-e89b-12d3-a456-426614174000",
    "status": "completed",
    "engine_version": "text",
    "recommended_action": "text",
    "confidence": 1,
    "rationale": "text",
    "metrics": {
      "expected_value": 1,
      "median": 1,
      "std_deviation": 1,
      "variance": 1,
      "probability_of_loss": 1,
      "var_95": 1,
      "cvar_95": 1
    },
    "percentiles": {
      "p5": 1,
      "p10": 1,
      "p25": 1,
      "p50": 1,
      "p75": 1,
      "p90": 1,
      "p95": 1,
      "p99": 1
    },
    "scenarios_run": 1,
    "execution_ms": 1,
    "metadata": {
      "mode": "text",
      "seed": 1,
      "billing_units": 1,
      "engine_version": "text"
    },
    "simulation_model": "monte_carlo",
    "engine_type": "text",
    "simulation_class": "predictive",
    "model_revision": "text",
    "assumptions_hash": "text",
    "validated_inputs": {},
    "confidence_interval": {},
    "request_id": "text",
    "scenario_analysis": {},
    "sensitivity_analysis": {},
    "bootstrap_result": {},
    "mcmc_result": {},
    "importance_sampling_result": {},
    "scenario_ranking": [
      {}
    ],
    "sensitivity_ranking": [
      {}
    ],
    "score": 1,
    "score_breakdown": {},
    "created_at": "2026-01-01T00:00:00.000Z",
    "decision_tree_result": {},
    "time_series_result": {},
    "formatted_result": {},
    "unit_context": {},
    "unit_warnings": [
      "text"
    ],
    "charts": {},
    "histogram_data": {},
    "decision_plan": {
      "recommended_action": "text",
      "confidence": 1,
      "expected_value": 1,
      "risk": {
        "p5": 1,
        "p95": 1,
        "probability_of_loss": 1,
        "var_95": 1
      },
      "options": [
        {
          "name": "text",
          "rank": 1,
          "expected_value": 1,
          "risk": {
            "p5": 1,
            "p95": 1,
            "probability_of_loss": 1,
            "var_95": 1
          },
          "score": 1
        }
      ],
      "rationale": "text",
      "integrity": {},
      "calibration": "text"
    },
    "request_hash": "text",
    "result_hash": "text"
  },
  "score": 1,
  "score_breakdown": {
    "ANY_ADDITIONAL_PROPERTY": 1
  }
}

Decision Memory

POST /v1/decisions

Log a decision

post

Record a decision that was made. Link it to a simulation run_id to bind the full DecisionPlan context. Call PATCH /outcome later to close the loop.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Body for POST /v1/decisions — log a decision that was made.

run_idstring · uuid · nullableOptional

ID of the simulation run that produced this decision (links DecisionPlan -> DecisionLog).

contextstring · max: 2000 · nullableOptional

Free-text description of the business situation when this decision was made.

chosen_actionstring · max: 200Required

The action that was chosen.

options_consideredstring[] · nullableOptional

All option names that were evaluated before choosing.

expected_valuenumber · nullableOptional
confidencenumber · max: 1 · nullableOptional
rationalestring · max: 2000 · nullableOptional
risk_p5number · nullableOptional
risk_p95number · nullableOptional
risk_polnumber · max: 1 · nullableOptional

Probability of loss at decision time

request_hashstring · max: 64 · nullableOptional
result_hashstring · max: 64 · nullableOptional
Responses
201

Successful Response

application/json

Single decision log entry.

idstring · uuidRequired
org_idstring · uuidRequired
run_idstring · uuid · nullableRequired
contextstring · nullableRequired
chosen_actionstringRequired
options_consideredstring[] · nullableRequired
expected_valuenumber · nullableRequired
confidencenumber · nullableRequired
rationalestring · nullableRequired
risk_p5number · nullableRequired
risk_p95number · nullableRequired
risk_polnumber · nullableRequired
request_hashstring · nullableRequired
result_hashstring · nullableRequired
actual_outcomenumber · nullableRequired
outcome_deltanumber · nullableRequired
outcome_notesstring · nullableRequired
outcome_recorded_atstring · date-time · nullableRequired
executed_atstring · date-time · nullableRequired
execution_statusstring · nullableRequired
execution_webhook_urlstring · nullableRequired
execution_response_codeinteger · nullableRequired
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
post/v1/decisions
POST /v1/decisions HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 253

{
  "run_id": "123e4567-e89b-12d3-a456-426614174000",
  "context": "text",
  "chosen_action": "text",
  "options_considered": [
    "text"
  ],
  "expected_value": 1,
  "confidence": 1,
  "rationale": "text",
  "risk_p5": 1,
  "risk_p95": 1,
  "risk_pol": 1,
  "request_hash": "text",
  "result_hash": "text"
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "org_id": "123e4567-e89b-12d3-a456-426614174000",
  "run_id": "123e4567-e89b-12d3-a456-426614174000",
  "context": "text",
  "chosen_action": "text",
  "options_considered": [
    "text"
  ],
  "expected_value": 1,
  "confidence": 1,
  "rationale": "text",
  "risk_p5": 1,
  "risk_p95": 1,
  "risk_pol": 1,
  "request_hash": "text",
  "result_hash": "text",
  "actual_outcome": 1,
  "outcome_delta": 1,
  "outcome_notes": "text",
  "outcome_recorded_at": "2026-01-01T00:00:00.000Z",
  "executed_at": "2026-01-01T00:00:00.000Z",
  "execution_status": "text",
  "execution_webhook_url": "text",
  "execution_response_code": 1,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

GET /v1/decisions

List logged decisions

get

Returns the org's decision history, most recent first. Supports pagination.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1OptionalDefault: 1
limitinteger · min: 1 · max: 200 · nullableOptional
page_sizeinteger · min: 1 · max: 200 · nullableOptional

Legacy compatibility alias for limit.

with_outcome_onlybooleanOptional

When true, return only decisions where actual_outcome has been recorded.

Default: false
Responses
200

Successful Response

application/json
totalintegerRequired
pageintegerRequired
limitintegerRequired
pagesintegerRequired
page_sizeintegerRequired
get/v1/decisions
GET /v1/decisions HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "decisions": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "org_id": "123e4567-e89b-12d3-a456-426614174000",
      "run_id": "123e4567-e89b-12d3-a456-426614174000",
      "context": "text",
      "chosen_action": "text",
      "options_considered": [
        "text"
      ],
      "expected_value": 1,
      "confidence": 1,
      "rationale": "text",
      "risk_p5": 1,
      "risk_p95": 1,
      "risk_pol": 1,
      "request_hash": "text",
      "result_hash": "text",
      "actual_outcome": 1,
      "outcome_delta": 1,
      "outcome_notes": "text",
      "outcome_recorded_at": "2026-01-01T00:00:00.000Z",
      "executed_at": "2026-01-01T00:00:00.000Z",
      "execution_status": "text",
      "execution_webhook_url": "text",
      "execution_response_code": 1,
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 1,
  "pages": 1,
  "page_size": 1
}

POST /v1/decisions/plan

GET /v1/decisions/{decision_id}

Get a single decision

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
decision_idstring · uuidRequired
Responses
200

Successful Response

application/json

Single decision log entry.

idstring · uuidRequired
org_idstring · uuidRequired
run_idstring · uuid · nullableRequired
contextstring · nullableRequired
chosen_actionstringRequired
options_consideredstring[] · nullableRequired
expected_valuenumber · nullableRequired
confidencenumber · nullableRequired
rationalestring · nullableRequired
risk_p5number · nullableRequired
risk_p95number · nullableRequired
risk_polnumber · nullableRequired
request_hashstring · nullableRequired
result_hashstring · nullableRequired
actual_outcomenumber · nullableRequired
outcome_deltanumber · nullableRequired
outcome_notesstring · nullableRequired
outcome_recorded_atstring · date-time · nullableRequired
executed_atstring · date-time · nullableRequired
execution_statusstring · nullableRequired
execution_webhook_urlstring · nullableRequired
execution_response_codeinteger · nullableRequired
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
get/v1/decisions/{decision_id}
GET /v1/decisions/{decision_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "org_id": "123e4567-e89b-12d3-a456-426614174000",
  "run_id": "123e4567-e89b-12d3-a456-426614174000",
  "context": "text",
  "chosen_action": "text",
  "options_considered": [
    "text"
  ],
  "expected_value": 1,
  "confidence": 1,
  "rationale": "text",
  "risk_p5": 1,
  "risk_p95": 1,
  "risk_pol": 1,
  "request_hash": "text",
  "result_hash": "text",
  "actual_outcome": 1,
  "outcome_delta": 1,
  "outcome_notes": "text",
  "outcome_recorded_at": "2026-01-01T00:00:00.000Z",
  "executed_at": "2026-01-01T00:00:00.000Z",
  "execution_status": "text",
  "execution_webhook_url": "text",
  "execution_response_code": 1,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

DELETE /v1/decisions/{decision_id}

Delete a decision log entry

delete
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
decision_idstring · uuidRequired
Responses
204

Successful Response

No content

delete/v1/decisions/{decision_id}
DELETE /v1/decisions/{decision_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

POST /v1/decisions/{decision_id}/execute

Execute a decision via webhook

post

Fire the decision to an external webhook URL, turning the logged decision into an automated action. The webhook receives the full decision context (chosen action, expected value, confidence, risk profile, integrity hashes). Execution status and the HTTP response code are persisted back to the decision log for full audit trail. Re-execution is allowed — each call overwrites the prior receipt.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
decision_idstring · uuidRequired
Body

Body for POST /v1/decisions/{id}/execute — fire the decision to a webhook.

webhook_urlstring · max: 2048Required

HTTPS endpoint that will receive and act on this decision.

timeout_secondsnumber · min: 1 · max: 60Optional

Webhook request timeout in seconds.

Default: 10
forcebooleanOptional

Override the idempotency gate. Pass true to re-execute a decision that was already delivered. Does NOT override confidence or risk_floor gates.

Default: false
override_safetybooleanOptional

Bypass confidence and risk_floor policy gates for this single execution. Requires explicit intent. Logs the override for audit.

Default: false
metadataobject · Metadata · nullableOptional

Optional extra key-value pairs merged into the webhook payload.

Responses
200

Successful Response

application/json

Returned by POST /v1/decisions/{id}/execute.

decision_idstring · uuidRequired
webhook_urlstringRequired
execution_statusstringRequired
response_codeinteger · nullableRequired
executed_atstring · date-timeRequired
payload_summaryobject · Payload SummaryRequired
safety_overriddenbooleanOptionalDefault: false
post/v1/decisions/{decision_id}/execute
POST /v1/decisions/{decision_id}/execute HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 95

{
  "webhook_url": "text",
  "timeout_seconds": 10,
  "force": false,
  "override_safety": false,
  "metadata": {}
}
{
  "decision_id": "123e4567-e89b-12d3-a456-426614174000",
  "webhook_url": "text",
  "execution_status": "text",
  "response_code": 1,
  "executed_at": "2026-01-01T00:00:00.000Z",
  "payload_summary": {},
  "safety_overridden": false
}

PATCH /v1/decisions/{decision_id}/outcome

Record actual outcome

patch

Close the feedback loop: record what actually happened after the decision was made. Sets actual_outcome, computes outcome_delta = actual - expected, and timestamps the recording.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
decision_idstring · uuidRequired
Body

Body for PATCH /v1/decisions/{id}/outcome — close the feedback loop.

actual_outcomenumberRequired

Observed outcome value (e.g. actual monthly revenue).

outcome_notesstring · max: 2000 · nullableOptional
Responses
200

Successful Response

application/json

Single decision log entry.

idstring · uuidRequired
org_idstring · uuidRequired
run_idstring · uuid · nullableRequired
contextstring · nullableRequired
chosen_actionstringRequired
options_consideredstring[] · nullableRequired
expected_valuenumber · nullableRequired
confidencenumber · nullableRequired
rationalestring · nullableRequired
risk_p5number · nullableRequired
risk_p95number · nullableRequired
risk_polnumber · nullableRequired
request_hashstring · nullableRequired
result_hashstring · nullableRequired
actual_outcomenumber · nullableRequired
outcome_deltanumber · nullableRequired
outcome_notesstring · nullableRequired
outcome_recorded_atstring · date-time · nullableRequired
executed_atstring · date-time · nullableRequired
execution_statusstring · nullableRequired
execution_webhook_urlstring · nullableRequired
execution_response_codeinteger · nullableRequired
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
patch/v1/decisions/{decision_id}/outcome
PATCH /v1/decisions/{decision_id}/outcome HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "actual_outcome": 1,
  "outcome_notes": "text"
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "org_id": "123e4567-e89b-12d3-a456-426614174000",
  "run_id": "123e4567-e89b-12d3-a456-426614174000",
  "context": "text",
  "chosen_action": "text",
  "options_considered": [
    "text"
  ],
  "expected_value": 1,
  "confidence": 1,
  "rationale": "text",
  "risk_p5": 1,
  "risk_p95": 1,
  "risk_pol": 1,
  "request_hash": "text",
  "result_hash": "text",
  "actual_outcome": 1,
  "outcome_delta": 1,
  "outcome_notes": "text",
  "outcome_recorded_at": "2026-01-01T00:00:00.000Z",
  "executed_at": "2026-01-01T00:00:00.000Z",
  "execution_status": "text",
  "execution_webhook_url": "text",
  "execution_response_code": 1,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Decision Workflow

GET /v1/analysis-runs/{run_id}

POST /v1/analysis-runs/{run_id}/action-plans

GET /v1/analysis-runs/{run_id}/evidence

GET /v1/analysis-runs/{run_id}/result

POST /v1/decision-cases

PUT /v1/decision-cases/{case_id}

GET /v1/decision-cases/{case_id}

POST /v1/decision-cases/{case_id}/analysis-runs

POST /v1/decision-cases/{case_id}/outcomes

POST /v1/decision-cases/{case_id}/refresh

POST /v1/decision-plans/{plan_id}/approve

POST /v1/decision-plans/{plan_id}/execute

Deployments

GET /v1/deployments

Get current org deployment

get

Return the active deployment for this org, or None if using shared pool.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
deployment_idstringRequired
org_idstringRequired
providerstringRequired
regionstringRequired
statusstringRequired
endpoint_urlstring · nullableRequired
cost_usd_monthnumberRequired
billable_cost_usd_monthnumberRequired
billing_markup_pctnumberRequired
created_atstringRequired
provisioned_atstring · nullableRequired
error_messagestring · nullableRequired
get/v1/deployments
GET /v1/deployments HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "deployment_id": "text",
  "org_id": "text",
  "provider": "text",
  "region": "text",
  "status": "text",
  "endpoint_url": "text",
  "cost_usd_month": 1,
  "billable_cost_usd_month": 1,
  "billing_markup_pct": 1,
  "created_at": "text",
  "provisioned_at": "text",
  "error_message": "text"
}

POST /v1/deployments

Request a new cloud deployment

post

Provision an isolated engine deployment on your chosen cloud provider and region. Returns 202 Accepted immediately — provisioning is async (typically 3-5 minutes). Poll GET /v1/deployments to check status. When status=active, all API calls are automatically routed to your isolated deployment. Requires owner role.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
providerstringOptional

Cloud provider: algenta_shared, aws, azure, gcp

Default: algenta_shared
regionstringOptional

Cloud region identifier. Use /v1/deployments/regions to list options.

Default: algenta-shared
configobject · Config · nullableOptional

Optional provider-specific configuration. Supported keys: instance_size (e.g. 'small'|'medium'|'large'), storage_gb, max_concurrent_runs, auto_scale_max.

billing_markup_pctnumber · max: 200Optional

Pass-through cost markup percentage. Default: 20%.

Default: 20
Responses
202

Successful Response

application/json
deployment_idstringRequired
org_idstringRequired
providerstringRequired
regionstringRequired
statusstringRequired
endpoint_urlstring · nullableRequired
cost_usd_monthnumberRequired
billable_cost_usd_monthnumberRequired
billing_markup_pctnumberRequired
created_atstringRequired
provisioned_atstring · nullableRequired
error_messagestring · nullableRequired
post/v1/deployments
POST /v1/deployments HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 91

{
  "provider": "algenta_shared",
  "region": "algenta-shared",
  "config": {},
  "billing_markup_pct": 20
}
{
  "deployment_id": "text",
  "org_id": "text",
  "provider": "text",
  "region": "text",
  "status": "text",
  "endpoint_url": "text",
  "cost_usd_month": 1,
  "billable_cost_usd_month": 1,
  "billing_markup_pct": 1,
  "created_at": "text",
  "provisioned_at": "text",
  "error_message": "text"
}

GET /v1/deployments/regions

List available cloud providers and regions

get

Returns all available cloud providers and their supported regions. Regions are fetched live from cloud SDKs when credentials are available, otherwise returns a comprehensive static fallback list. Use the region id field when creating a deployment.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
object · Response List Regions V1 Deployments Regions GetOptional
get/v1/deployments/regions
GET /v1/deployments/regions HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{}

DELETE /v1/deployments/{deployment_id}

Deprovision a deployment

delete

Tear down cloud resources for a deployment. Org will revert to shared pool. Requires owner role.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
deployment_idstring · uuidRequired
Responses
202

Successful Response

application/json
Other propertiesstringOptional
delete/v1/deployments/{deployment_id}
DELETE /v1/deployments/{deployment_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "ANY_ADDITIONAL_PROPERTY": "text"
}

GET /v1/deployments/{deployment_id}/cost

Get current month cloud cost for a deployment

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
deployment_idstring · uuidRequired
Responses
200

Successful Response

application/json
object · Response Get Deployment Cost V1 Deployments Deployment Id Cost GetOptional
get/v1/deployments/{deployment_id}/cost
GET /v1/deployments/{deployment_id}/cost HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

Engines

GET /v1/engines

List all engines

get

Return the full Algenta engine catalogue.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1OptionalDefault: 1
limitinteger · min: 1 · max: 200OptionalDefault: 25
Responses
200

Successful Response

application/json
countintegerRequired
totalintegerRequired
pageintegerRequired
limitintegerRequired
pagesintegerRequired
get/v1/engines
GET /v1/engines HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1,
  "total": 1,
  "page": 1,
  "limit": 1,
  "pages": 1,
  "engines": [
    {
      "name": "text",
      "slug": "text",
      "description": "text",
      "api_path": "text",
      "mojo_libs": [
        "text"
      ],
      "use_cases": [
        "text"
      ],
      "tier": "text"
    }
  ]
}

GET /v1/engines/tiers

Engines by tier

get

Return engines grouped by tier: core / advanced / platform.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
get/v1/engines/tiers
GET /v1/engines/tiers HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "core": [
    {
      "name": "text",
      "slug": "text",
      "description": "text",
      "api_path": "text",
      "mojo_libs": [
        "text"
      ],
      "use_cases": [
        "text"
      ],
      "tier": "text"
    }
  ],
  "advanced": [
    {
      "name": "text",
      "slug": "text",
      "description": "text",
      "api_path": "text",
      "mojo_libs": [
        "text"
      ],
      "use_cases": [
        "text"
      ],
      "tier": "text"
    }
  ],
  "platform": [
    {
      "name": "text",
      "slug": "text",
      "description": "text",
      "api_path": "text",
      "mojo_libs": [
        "text"
      ],
      "use_cases": [
        "text"
      ],
      "tier": "text"
    }
  ]
}

GET /v1/engines/{slug}

Engine detail

get

Return detail for a single engine by slug.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
slugstringRequired
Responses
200

Successful Response

application/json
namestringRequired
slugstringRequired
descriptionstringRequired
api_pathstringRequired
mojo_libsstring[]Required
use_casesstring[]Required
tierstringRequired
get/v1/engines/{slug}
GET /v1/engines/{slug} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "name": "text",
  "slug": "text",
  "description": "text",
  "api_path": "text",
  "mojo_libs": [
    "text"
  ],
  "use_cases": [
    "text"
  ],
  "tier": "text"
}

Execution Policy

GET /v1/execution/policy

Get execution policy

get

Returns the org's current autonomous execution safety policy. Gates applied to every POST /v1/decisions/{id}/execute call and trigger auto_execute:

  • min_confidence: decisions below this confidence are blocked

  • risk_floor: decisions where worst-case (p5) exceeds this loss are blocked

  • require_calibration: auto_execute waits for ≥5 recorded outcomes

  • allow_reexecution: idempotency — prevents double-actions

All gates can be bypassed individually: force=true (idempotency) or override_safety=true (confidence + risk_floor).

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json

Current execution policy for the calling org.

org_idstringRequired
min_confidencenumberRequired
risk_floornumber · nullableRequired
require_calibrationbooleanRequired
allow_reexecutionbooleanRequired
updated_atstringRequired
get/v1/execution/policy
GET /v1/execution/policy HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "org_id": "text",
  "min_confidence": 1,
  "risk_floor": 1,
  "require_calibration": true,
  "allow_reexecution": true,
  "updated_at": "text"
}

PATCH /v1/execution/policy

Update execution policy

patch

Partial update — only supplied fields are changed. Changes take effect immediately for all subsequent executions. Audit logs record every update.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Partial update — only supplied fields are changed.

min_confidencenumber · max: 1 · nullableOptional

Minimum confidence to allow execution (0–1). Default: 0.5.

risk_floornumber · nullableOptional

Maximum tolerable downside loss (absolute). If p5 < -risk_floor the execution is blocked. Set to null to disable the check.

require_calibrationboolean · nullableOptional

When true, trigger auto_execute is disabled until the org has ≥5 recorded outcomes. Manual execution is always allowed.

allow_reexecutionboolean · nullableOptional

When true, already-executed decisions can fire again without force=true.

Responses
200

Successful Response

application/json

Current execution policy for the calling org.

org_idstringRequired
min_confidencenumberRequired
risk_floornumber · nullableRequired
require_calibrationbooleanRequired
allow_reexecutionbooleanRequired
updated_atstringRequired
patch/v1/execution/policy
PATCH /v1/execution/policy HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 87

{
  "min_confidence": 1,
  "risk_floor": 1,
  "require_calibration": true,
  "allow_reexecution": true
}
{
  "org_id": "text",
  "min_confidence": 1,
  "risk_floor": 1,
  "require_calibration": true,
  "allow_reexecution": true,
  "updated_at": "text"
}

GET /v1/execution/policy/snapshots

Export

GET /v1/runs/{run_id}/export.{fmt}

Export simulation run results

get

Export a simulation run in the requested format.

Format
Content-Type
Dependency

csv

text/csv

stdlib — always available

xlsx

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

openpyxl

pdf

application/pdf

fpdf2

json

application/json

stdlib — always available

If the optional dependency is not installed the endpoint returns 503.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
run_idstring · uuidRequired

Simulation run UUID

fmtstringRequired

Export format: csv | xlsx | pdf | json

Responses
200

Export file bytes

application/json
anyOptional
get/v1/runs/{run_id}/export.{fmt}
GET /v1/runs/{run_id}/export.{fmt} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Infrastructure

GET /v1/infrastructure

Real compute infrastructure health

get

Return real engine health status and compute node information.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
deployment_modestringRequired
engine_versionstringRequired
api_versionstringRequired
probe_latency_msnumber · nullableOptional
uptime_30d_pctnumber · nullableOptional
avg_latency_msnumber · nullableOptional
p95_latency_msnumber · nullableOptional
throughput_rpmnumber · nullableOptional
last_health_checkstring · date-timeRequired
engine_modestringOptionalDefault: binary
get/v1/infrastructure
GET /v1/infrastructure HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "deployment_mode": "text",
  "engine_version": "text",
  "api_version": "text",
  "nodes": [
    {
      "node_id": "text",
      "status": "text",
      "engine_version": "text",
      "cpu_pct": 1,
      "memory_gb": 1,
      "jobs_per_sec": 1,
      "region": "text",
      "last_heartbeat": "2026-01-01T00:00:00.000Z"
    }
  ],
  "probe_latency_ms": 1,
  "uptime_30d_pct": 1,
  "avg_latency_ms": 1,
  "p95_latency_ms": 1,
  "throughput_rpm": 1,
  "last_health_check": "2026-01-01T00:00:00.000Z",
  "engine_mode": "binary"
}

POST /v1/nodes/heartbeat

Worker node heartbeat

post

Update node status and metrics. Call every 30s from worker nodes.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
node_idstringRequired
cpu_pctnumber · nullableOptional
memory_gbnumber · nullableOptional
jobs_per_secnumber · nullableOptional
statusstringOptionalDefault: live
Responses
200

Successful Response

application/json
object · Response Node Heartbeat V1 Nodes Heartbeat PostOptional
post/v1/nodes/heartbeat
POST /v1/nodes/heartbeat HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "node_id": "text",
  "cpu_pct": 1,
  "memory_gb": 1,
  "jobs_per_sec": 1,
  "status": "live"
}
{}

POST /v1/nodes/register

Register a self-hosted compute node

post

Called by self-hosted Algenta workers on startup to register with the API. The node will appear in GET /v1/infrastructure for the org.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
node_idstring · nullableOptional
regionstringOptionalDefault: local
engine_versionstring · nullableOptional
cpu_countinteger · nullableOptional
memory_gbnumber · nullableOptional
capabilitiesstring[] · nullableOptional
Responses
201

Successful Response

application/json
node_idstringRequired
registered_atstringRequired
messagestringRequired
post/v1/nodes/register
POST /v1/nodes/register HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 111

{
  "node_id": "text",
  "region": "local",
  "engine_version": "text",
  "cpu_count": 1,
  "memory_gb": 1,
  "capabilities": [
    "text"
  ]
}
{
  "node_id": "text",
  "registered_at": "text",
  "message": "text"
}

DELETE /v1/nodes/{node_id}

Deregister a node

delete

Gracefully deregister a self-hosted worker node.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
node_idstringRequired
Responses
204

Successful Response

No content

delete/v1/nodes/{node_id}
DELETE /v1/nodes/{node_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Ingest

POST /v1/ingest

Instant data ingestion — zero-config simulation from any table

post

Drop in your data. Get back a ready-to-run simulation.

  • Paste CSV text or send JSON records

  • Multiple tables: auto-detects join keys and merges

  • Auto-detects distributions, polarity, units, and objective function

  • Selects the best simulation engine for your data shape

  • Set auto_run: true to get simulation results immediately

Powered by the Algenta FieldMapper — same logic as field_mapper.mojo.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Drop in your data. Get back a ready-to-run simulation.

Supports:

  • Single table: records or CSV text
  • Multiple tables: auto-detects join keys, merges, then analyzes

No configuration required. The engine auto-detects everything.

domainstringOptional

Optional domain hint (finance, supply_chain, hr, etc.) for better field mapping

Default: ""
runsinteger · min: 1000 · max: 1000000Optional

Scenarios to evaluate

Default: 10000
auto_runbooleanOptional

If true, run the simulation immediately and return results

Default: false
Responses
200

Successful Response

application/json
ingest_idstringRequired
records_analyzedintegerRequired
fields_detectedintegerRequired
join_appliedbooleanRequired
variablesobject[]Required
objective_functionstringRequired
enginestringRequired
engine_reasonstringRequired
field_analysisobject · Field AnalysisRequired
simulation_payloadobject · Simulation PayloadRequired
simulation_resultobject · Simulation Result · nullableOptional
latency_msnumberRequired
post/v1/ingest
POST /v1/ingest HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 144

{
  "tables": [
    {
      "name": "table",
      "records": [
        {}
      ],
      "csv": "text"
    }
  ],
  "domain": "",
  "runs": 10000,
  "auto_run": false,
  "join_on": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "ingest_id": "text",
  "records_analyzed": 1,
  "fields_detected": 1,
  "join_applied": true,
  "join_key": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "variables": [
    {}
  ],
  "objective_function": "text",
  "engine": "text",
  "engine_reason": "text",
  "field_analysis": {},
  "simulation_payload": {},
  "simulation_result": {},
  "latency_ms": 1
}

LLM API

POST /v1/artifacts/resolve

POST /v1/chat/completions

POST /v1/count_tokens

POST /v1/embeddings

POST /v1/embeddings/similarity

GET /v1/models

POST /v1/rerank

POST /v1/responses

POST /v1/tokenize

Logs

GET /v1/logs

Stream structured logs via Server-Sent Events

get

SSE stream of API log events.

Query params:

  • node_id: filter by compute node ID

  • level: filter by log level (info, warning, error)

Connect with: const es = new EventSource('/v1/logs', { headers: { Authorization: 'Bearer sk_...' } })

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
node_idstring · nullableOptional
levelstring · nullableOptional
Responses
200

Successful Response

text/event-stream
get/v1/logs
GET /v1/logs HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

Playground

POST /v1/playground

Try Algenta — no API key required

post

No sign-up. No API key. Just try it.

Run a decision analysis, optimization, simulation, or forecast in one API call. Rate limited at 10 requests/minute per IP.

Upgrade at algenta.ai for:

  • 500 simulations/month free

  • Up to 1,000,000 scenarios per request

  • All 12 engines

Body

Describe what you want to analyze. No statistics knowledge required.

Modes: decision → What should I do? Returns proceed/pause/reject + why optimize → Find the best value. Returns optimal config + improvement simulate → What's the range of outcomes? Returns distribution forecast → What will happen? Returns future periods with CI

Example: { "mode": "decision", "inputs": {"revenue": 120000, "cost": 70000}, "runs": 1000 }

modestringOptional

What to run: decision, optimize, simulate, forecast

Default: decision
inputsobject · InputsOptional

Your input variables as name → value (or name → {value, low, high})

objectivestringOptional

What to optimize (for optimize mode): 'maximize profit', 'minimize cost', etc.

Default: maximize_value
runsinteger · min: 100 · max: 5000Optional

Scenarios to evaluate (playground cap: 5,000 — upgrade for 1,000,000+)

Default: 1000
historynumber[] · nullableOptional

Historical values for forecast mode (most recent last, min 3)

Responses
200

Successful Response

application/json
playground_idstringRequired
modestringRequired
actionstringRequired
valuenumberRequired
confidencenumberRequired
whystring[]Required
detailsobject · DetailsRequired
latency_msnumberRequired
upgrade_hintstringRequired
post/v1/playground
POST /v1/playground HTTP/1.1
Host: api.algenta.ai
Content-Type: application/json
Accept: */*
Content-Length: 86

{
  "mode": "decision",
  "inputs": {},
  "objective": "maximize_value",
  "runs": 1000,
  "history": [
    1
  ]
}
{
  "playground_id": "text",
  "mode": "text",
  "action": "text",
  "value": 1,
  "confidence": 1,
  "why": [
    "text"
  ],
  "details": {},
  "latency_ms": 1,
  "upgrade_hint": "text"
}

Products

POST /v1/agent/run

Run an AI agent task

post

Give the Algenta Agent Engine a task. It breaks it down, uses tools (search, simulate, optimize, calculate), and returns a structured result.

Direct replacement for LangChain and LangGraph agent pipelines.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Give Algenta a task. It plans, executes tools, and returns a structured result.

Drop-in replacement for LangChain / LangGraph agent workflows.

taskstring · min: 5Required

What should the agent do?

contextobject · Context · nullableOptional

Additional context or data

toolsstring[] · nullableOptional

Tools to make available: search, simulate, optimize, calculate, summarize

max_stepsinteger · min: 1 · max: 50Optional

Maximum execution steps

Default: 10
output_formatstringOptional

Output format: text, json, markdown

Default: text
Responses
200

Successful Response

application/json
run_idstringRequired
statusstringRequired
resultany ofRequired
stringOptional
or
objectOptional
tools_usedstring[]Required
latency_msnumberRequired
post/v1/agent/run
POST /v1/agent/run HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 83

{
  "task": "text",
  "context": {},
  "tools": [
    "text"
  ],
  "max_steps": 10,
  "output_format": "text"
}
{
  "run_id": "text",
  "status": "text",
  "result": "text",
  "steps": [
    {
      "step": 1,
      "action": "text",
      "tool": "text",
      "result": "text",
      "status": "completed"
    }
  ],
  "tools_used": [
    "text"
  ],
  "latency_ms": 1
}

POST /v1/decision

Get an optimal decision

post

Give Algenta your inputs and constraints. Get back the optimal action with confidence, risk, and plain-English reasoning.

Evaluates thousands of possible scenarios in milliseconds using the Algenta API — no statistics or simulation expertise required.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Ask Algenta: given these inputs and constraints, what should I do?

Algenta tests thousands of possible outcomes and returns the optimal action with confidence, risk, and reasoning — no statistics knowledge required.

objectivestringOptional

What to optimize: maximize_value, minimize_risk, maximize_profit, minimize_cost

Default: maximize_value
risk_tolerancestringOptional

How much risk is acceptable: low, medium, high

Default: medium
scenariosinteger · min: 1000 · max: 1000000Optional

How many scenarios to evaluate (more = higher confidence)

Default: 10000
enginestringOptional

Simulation engine. 'auto' (default) selects the best engine automatically based on your data shape. Options: monte_carlo, lhs, qmc_sobol, bootstrap, mcmc, importance_sampling, time_series, sensitivity

Default: auto
labelstring · nullableOptional

Optional label for this decision

Responses
200

Successful Response

application/json
decision_idstringRequired
actionstringRequired

Recommended action: proceed, pause, reject, or custom

confidencenumberRequired

Confidence in this recommendation (0–1)

reasoningstringRequired

Plain-English explanation

whystring[]Required

3 crisp reasons behind this recommendation

expected_outcomenumberRequired

Expected value in your input units

downside_risknumberRequired

Value at 5th percentile (worst-case)

upside_potentialnumberRequired

Value at 95th percentile (best-case)

probability_of_lossnumberRequired

Probability of negative outcome

scenarios_evaluatedintegerRequired
latency_msnumberRequired
post/v1/decision
POST /v1/decision HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 258

{
  "inputs": [
    {
      "high": 180000,
      "low": 80000,
      "name": "revenue",
      "unit": "USD",
      "value": 120000
    },
    {
      "high": 100000,
      "low": 50000,
      "name": "cost",
      "unit": "USD",
      "value": 70000
    }
  ],
  "objective": "maximize_value",
  "risk_tolerance": "medium",
  "scenarios": 10000,
  "engine": "auto",
  "label": "text"
}
{
  "decision_id": "text",
  "action": "text",
  "confidence": 1,
  "reasoning": "text",
  "why": [
    "text"
  ],
  "expected_outcome": 1,
  "downside_risk": 1,
  "upside_potential": 1,
  "probability_of_loss": 1,
  "scenarios_evaluated": 1,
  "latency_ms": 1
}

POST /v1/forecast

Forecast a business metric

post

Forecast any metric — revenue, demand, capacity — using historical data.

Combines time-series analysis with Monte Carlo uncertainty quantification. Returns point forecasts with confidence intervals for each period.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Forecast what will happen based on historical data and business drivers.

Use cases: demand forecasting, revenue projection, capacity planning.

metricstringRequired

What you're forecasting, e.g. 'monthly_revenue'

historynumber[] · min: 3 · max: 1000Required

Historical values (most recent last)

horizoninteger · min: 1 · max: 120Optional

How many periods ahead to forecast

Default: 12
seasonalitybooleanOptional

Account for seasonal patterns

Default: true
confidence_levelnumber · min: 0.5 · max: 0.99Optional

Confidence interval width

Default: 0.9
Responses
200

Successful Response

application/json
forecast_idstringRequired
metricstringRequired
baselinenumberRequired

Most recent historical value

forecast_meannumberRequired

Expected value at end of horizon

total_change_pctnumberRequired

Expected % change over horizon

scenarios_evaluatedintegerRequired
latency_msnumberRequired
post/v1/forecast
POST /v1/forecast HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 86

{
  "metric": "text",
  "history": [
    1
  ],
  "horizon": 12,
  "seasonality": true,
  "confidence_level": 0.9
}
{
  "forecast_id": "text",
  "metric": "text",
  "baseline": 1,
  "forecast_mean": 1,
  "total_change_pct": 1,
  "periods": [
    {
      "period": 1,
      "forecast": 1,
      "lower_bound": 1,
      "upper_bound": 1,
      "trend": "text"
    }
  ],
  "scenarios_evaluated": 1,
  "latency_ms": 1
}

POST /v1/optimize

Optimize a business variable

post

Find the optimal value for pricing, routing, scheduling, or resource allocation.

Describe your objective and constraints in plain English — Algenta finds the best configuration across thousands of iterations.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Find the best value given inputs, constraints, and an objective.

Use cases: pricing, routing, scheduling, resource allocation. No math required — just describe what you're optimizing.

objectivestringRequired

What to optimize, e.g. 'maximize profit', 'minimize cost', 'maximize throughput'

iterationsinteger · min: 100 · max: 100000Optional

Search iterations

Default: 1000
enginestringOptional

Simulation engine. 'auto' selects the best engine automatically. Options: lhs (recommended for optimization), monte_carlo, qmc_sobol

Default: auto
Responses
200

Successful Response

application/json
optimization_idstringRequired
statusstringRequired
objective_valuenumberRequired
improvement_vs_midpointnumberRequired

% improvement vs naive midpoint solution

constraints_satisfiedbooleanRequired
iterations_runintegerRequired
latency_msnumberRequired
post/v1/optimize
POST /v1/optimize HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 177

{
  "objective": "text",
  "variables": [
    {
      "name": "text",
      "min": 1,
      "max": 1,
      "step": 1,
      "unit": "text"
    }
  ],
  "constraints": [
    {
      "expression": "text",
      "required": true
    }
  ],
  "iterations": 1000,
  "engine": "auto"
}
{
  "optimization_id": "text",
  "status": "text",
  "optimal_values": {
    "ANY_ADDITIONAL_PROPERTY": 1
  },
  "objective_value": 1,
  "improvement_vs_midpoint": 1,
  "constraints_satisfied": true,
  "iterations_run": 1,
  "latency_ms": 1
}

POST /v1/retrieve

Search a knowledge base

post

Search documents or a connected data source and get ranked, relevant results.

Combines BM25 keyword search, dense vector similarity, and cross-encoder reranking for enterprise-grade accuracy. No setup required — pass documents inline or connect a data source.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Search your knowledge base and get ranked, relevant results.

Plug-and-play enterprise search and RAG pipeline. Pass documents inline or reference a connected collection.

querystring · min: 3Required

What are you looking for?

collection_idstring · nullableOptional

ID of a connected data source to search

top_kinteger · min: 1 · max: 50Optional

Number of results to return

Default: 5
rerankbooleanOptional

Apply cross-encoder reranking for higher accuracy

Default: true
Responses
200

Successful Response

application/json
retrieval_idstringRequired
querystringRequired
total_searchedintegerRequired
latency_msnumberRequired
post/v1/retrieve
POST /v1/retrieve HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 122

{
  "query": "text",
  "documents": [
    {
      "id": "text",
      "content": "text",
      "metadata": {}
    }
  ],
  "collection_id": "text",
  "top_k": 5,
  "rerank": true
}
{
  "retrieval_id": "text",
  "query": "text",
  "results": [
    {
      "rank": 1,
      "document_id": "text",
      "content": "text",
      "relevance_score": 1,
      "snippet": "text"
    }
  ],
  "total_searched": 1,
  "latency_ms": 1
}

Registry

POST /v1/registry/credentials

Repository Intelligence

GET /v1/repositories/capabilities

POST /v1/repositories/{repository_id}/apply

POST /v1/repositories/{repository_id}/decision-plans

POST /v1/repositories/{repository_id}/graph-query

POST /v1/repositories/{repository_id}/pipeline

POST /v1/repositories/{repository_id}/security-analyses

POST /v1/repositories/{repository_id}/security-analyses/closure

POST /v1/repositories/{repository_id}/simulate

POST /v1/repositories/{repository_id}/simulate-patch

POST /v1/repositories/{repository_id}/snapshots

GET /v1/repositories/{repository_id}/snapshots/{snapshot_id}

POST /v1/repositories/{repository_id}/triage

Runs

GET /v1/analytics

Aggregated analytics for dashboard charts

get

Return aggregated analytics using real SQL GROUP BY — O(1) in DB, not O(n) in Python.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
daysinteger · min: 1 · max: 365OptionalDefault: 30
Responses
200

Successful Response

application/json

Aggregated analytics for dashboard charts.

total_runsintegerRequired
runs_by_dayobject[]Required
avg_duration_msnumber · nullableRequired
p95_duration_msinteger · nullableRequired
get/v1/analytics
GET /v1/analytics HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "total_runs": 1,
  "runs_by_day": [
    {}
  ],
  "runs_by_status": {
    "ANY_ADDITIONAL_PROPERTY": 1
  },
  "runs_by_mode": {
    "ANY_ADDITIONAL_PROPERTY": 1
  },
  "avg_duration_ms": 1,
  "p95_duration_ms": 1
}

GET /v1/runs

List simulation runs for this org

get

Return paginated simulation run history for the authenticated org.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1OptionalDefault: 1
limitinteger · min: 1 · max: 200OptionalDefault: 20
offsetinteger · nullableOptional
statusstring · nullableOptional
modestring · nullableOptional
Responses
200

Successful Response

application/json
totalintegerRequired
pageinteger · min: 1Required
limitinteger · min: 1 · max: 200Required
pagesintegerRequired
get/v1/runs
GET /v1/runs HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "runs": [
    {
      "run_id": "text",
      "mode": "text",
      "status": "text",
      "scenarios_run": 1,
      "duration_ms": 1,
      "result_hash": "text",
      "request_hash": "text",
      "execution_type": "text",
      "created_at": "2026-01-01T00:00:00.000Z",
      "completed_at": "2026-01-01T00:00:00.000Z",
      "recommended_action": "text",
      "confidence": 1,
      "expected_value": 1,
      "probability_of_loss": 1,
      "std_deviation": 1,
      "rationale": "text"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 1,
  "pages": 1
}

GET /v1/runs/{run_id}

Get a single simulation run

get

Return details for a single simulation run (org-scoped).

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
run_idstring · uuidRequired
Responses
200

Successful Response

application/json
run_idstringRequired
modestringRequired
statusstringRequired
scenarios_runinteger · nullableOptional
duration_msinteger · nullableOptional
result_hashstring · nullableOptional
request_hashstring · nullableOptional
execution_typestringRequired
created_atstring · date-timeRequired
completed_atstring · date-time · nullableOptional
recommended_actionstring · nullableOptional
confidencenumber · nullableOptional
expected_valuenumber · nullableOptional
probability_of_lossnumber · nullableOptional
std_deviationnumber · nullableOptional
rationalestring · nullableOptional
get/v1/runs/{run_id}
GET /v1/runs/{run_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "run_id": "text",
  "mode": "text",
  "status": "text",
  "scenarios_run": 1,
  "duration_ms": 1,
  "result_hash": "text",
  "request_hash": "text",
  "execution_type": "text",
  "created_at": "2026-01-01T00:00:00.000Z",
  "completed_at": "2026-01-01T00:00:00.000Z",
  "recommended_action": "text",
  "confidence": 1,
  "expected_value": 1,
  "probability_of_loss": 1,
  "std_deviation": 1,
  "rationale": "text"
}

Runtime Libraries

GET /v1/libraries

POST /v1/libraries/execute

GET /v1/libraries/health

Semantic Query

POST /v1/query

Execute a structured query — schema-free, zero domain assumptions

post

Structured query execution engine.

This endpoint takes structured intent — produced by an LLM from the user's natural-language question. It does NOT accept raw text.

Separation of concerns:

  • LLM: language → structured intent, ambiguity resolution, user interaction

  • Algenta: schema understanding, math relationships, fast execution, correctness

Role resolution:

  1. Detect derived formulas across all numeric column triples (Mojo, ~100ms)

  2. Assign structural roles: derived_measure, base_measure, unit_measure…

  3. Match requested role → best column

  4. Execute aggregation, return result + all candidates for LLM disambiguation

Ambiguity handling: If confidence < 0.7, check candidates — multiple columns may match the role. The LLM can present options to the user or pick the most contextually appropriate one.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Structured query execution request.

═══════════════════════════════════════════════════════════ PRIMARY PATH — Exact spec (use after reading the schema) ═══════════════════════════════════════════════════════════ The correct flow:

  1. Call POST /v1/sources/register or POST /v1/sources/schema
  2. LLM reads the returned schema (column names, roles, formulas)
  3. LLM sends exact column names — Mojo validates and executes

Example (top 5 customers by revenue): { "source_name": "S0", "metric_column": "measure_total", "group_column": "dimension_label", "aggregation": "sum", "limit": 5 }

For multi-hop joins: { "source_name": "S0", "metric_column": "measure_total", "group_column": "dimension_label", "join_path": { "base_source": "S0", "group_source": "S2", "edges": [ { "left_source": "S0", "right_source": "S1", "left_key": "k01_left", "right_key": "k01_right" }, { "left_source": "S1", "right_source": "S2", "left_key": "k12_left", "right_key": "k12_right" } ] }, "aggregation": "sum" }

═══════════════════════════════════════════════════════════ FALLBACK PATH — Hint spec (when schema is not yet known) ═══════════════════════════════════════════════════════════ The engine resolves source and columns from structural role hints. Use this ONLY for exploratory queries. Always migrate to exact spec once you have the schema — it is faster and never ambiguous.

Example: { "metric": {"role": "derived_measure", "hint": "total value"}, "group_by": ["segment"], "aggregation": "sum", "limit": 5 }

dataset_idstring · nullableOptional

Public dataset ID alias for a registered source. When provided, query execution is scoped to that one registered dataset.

source_namestring · nullableOptional

EXACT source name from the registry (e.g. 'Bookings'). Bypasses source resolver entirely. Get this from POST /v1/sources/schema or the registration response.

metric_columnstring · nullableOptional

EXACT column name for the metric (e.g. 'EXT_PRICE'). Bypasses column resolver. The engine validates this column exists in source_name.

group_columnstring · nullableOptional

EXACT column name for group-by (e.g. 'CUSTOMER'). Bypasses group resolver. Can be in source_name or in the terminal source of join_path.

group_bystring[]Optional

Hint mode only: dimension words from the user's question (e.g. ['customer', 'region']). Ignored when group_column is set.

Default: []
preferred_sourcestring · nullableOptional

Hint mode only: source name the LLM believes is correct. Hard-locks the source resolver. Ignored when source_name is set.

reject_on_ambiguitybooleanOptional

Hint mode only: when True and resolver confidence < 0.40, return null result with source candidates instead of guessing.

Default: false
min_source_confidencenumber · max: 1Optional

Hint mode only: minimum resolver confidence threshold.

Default: 0
aggregationstringOptional

sum | avg | count | max | min

Default: sum
limitinteger · nullableOptional

Top-N limit

orderstringOptional

desc | asc

Default: desc
min_confidencenumber · max: 1OptionalDefault: 0.5
Responses
200

Successful Response

application/json
query_idstringRequired
resultanyRequired
result_typestringRequired
confidencenumberRequired
planstring[]Required
resolved_columnstringRequired
resolved_rolestringRequired
resolved_sourcestringRequired
row_countintegerRequired
ambiguousbooleanRequired
exact_specbooleanRequired
explanationstring[]OptionalDefault: []
latency_msnumberRequired
decision_pathstringRequired
plan_hashstringRequired
schema_revisionstring · nullableOptional
validatedbooleanRequired
deterministic_scopestringRequired
confidence_sourcestringRequired
clarification_requiredbooleanOptionalDefault: false
rejection_reasonstring · nullableOptional
request_idstring · nullableOptional
source_setstring[]OptionalDefault: []
join_pathobject[]OptionalDefault: []
planner_modestringOptionalDefault: planner_hint
post/v1/query
POST /v1/query HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1786

{
  "dataset_id": "text",
  "source_name": "text",
  "metric_column": "text",
  "group_column": "text",
  "join_path": {
    "base_source": "text",
    "group_source": "text",
    "edges": [
      {
        "left_source": "text",
        "right_source": "text",
        "left_key": "text",
        "right_key": "text",
        "join_type": "inner",
        "min_confidence": 0,
        "expected_cardinality": "text",
        "allow_many_to_many": false
      }
    ],
    "max_hops": 4,
    "min_path_confidence": 0,
    "reject_on_ambiguity": true,
    "reject_on_fanout": true
  },
  "sources": [
    {
      "name": "text",
      "dataset_id": "text",
      "source_id": "text",
      "records": [
        {}
      ],
      "csv": "text",
      "json_str": "text",
      "url": "text",
      "excel_b64": "text",
      "parquet_b64": "text",
      "connection": {},
      "table": "text"
    }
  ],
  "metric": {
    "role": "derived_measure",
    "hint": "text"
  },
  "group_by": [
    "text"
  ],
  "preferred_source": "text",
  "reject_on_ambiguity": false,
  "min_source_confidence": 0,
  "aggregation": "sum",
  "filter": {
    "time_filter": "text",
    "conditions": [
      {
        "column": "text",
        "dimension_hint": "text",
        "op": "eq",
        "value": null,
        "values": []
      }
    ]
  },
  "limit": 1,
  "order": "desc",
  "min_confidence": 0.5,
  "constraints": {
    "requires_derived": false,
    "no_cross_source": false,
    "min_column_confidence": 0,
    "max_join_hops": 4
  },
  "resolved_plan": {
    "source_name": "text",
    "metric_column": "text",
    "aggregation": "sum",
    "group_column": "text",
    "join_path": {
      "base_source": "text",
      "group_source": "text",
      "edges": [
        {
          "left_source": "text",
          "right_source": "text",
          "left_key": "text",
          "right_key": "text",
          "join_type": "inner",
          "min_confidence": 0,
          "expected_cardinality": "text",
          "allow_many_to_many": false
        }
      ],
      "max_hops": 4,
      "min_path_confidence": 0,
      "reject_on_ambiguity": true,
      "reject_on_fanout": true
    },
    "filter": {
      "time_filter": "text",
      "conditions": [
        {
          "column": "text",
          "dimension_hint": "text",
          "op": "eq",
          "value": null,
          "values": []
        }
      ]
    },
    "limit": 1,
    "order": "desc",
    "constraints": {
      "requires_derived": false,
      "no_cross_source": false,
      "min_column_confidence": 0,
      "max_join_hops": 4
    },
    "schema_revision": "text"
  }
}
{
  "query_id": "text",
  "result": null,
  "result_type": "text",
  "confidence": 1,
  "plan": [
    "text"
  ],
  "resolved_column": "text",
  "resolved_role": "text",
  "resolved_source": "text",
  "row_count": 1,
  "candidates": [
    {
      "source": "text",
      "column": "text",
      "role": "text",
      "magnitude": "text",
      "formula": "text",
      "confidence": 1,
      "score_components": {
        "ANY_ADDITIONAL_PROPERTY": 1
      },
      "notes": [
        "text"
      ]
    }
  ],
  "source_scores": {
    "ANY_ADDITIONAL_PROPERTY": 1
  },
  "ambiguous": true,
  "exact_spec": true,
  "explanation": [
    "text"
  ],
  "latency_ms": 1,
  "decision_path": "text",
  "plan_hash": "text",
  "schema_revision": "text",
  "validated": true,
  "deterministic_scope": "text",
  "confidence_source": "text",
  "clarification_required": false,
  "rejection_reason": "text",
  "request_id": "text",
  "source_set": [
    "text"
  ],
  "join_path": [
    {}
  ],
  "planner_mode": "planner_hint"
}

POST /v1/query/batch

Execute multiple governed exact queries in one request

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
Responses
200

Successful Response

application/json
request_idstring · nullableOptional
post/v1/query/batch
POST /v1/query/batch HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2007

{
  "defaults": {
    "dataset_id": "text",
    "filter": {
      "time_filter": "text",
      "conditions": [
        {
          "column": "text",
          "dimension_hint": "text",
          "op": "eq",
          "value": null,
          "values": []
        }
      ]
    },
    "limit": 1,
    "order": "text"
  },
  "queries": [
    {
      "key": "text",
      "request": {
        "dataset_id": "text",
        "source_name": "text",
        "metric_column": "text",
        "group_column": "text",
        "join_path": {
          "base_source": "text",
          "group_source": "text",
          "edges": [
            {
              "left_source": "text",
              "right_source": "text",
              "left_key": "text",
              "right_key": "text",
              "join_type": "inner",
              "min_confidence": 0,
              "expected_cardinality": "text",
              "allow_many_to_many": false
            }
          ],
          "max_hops": 4,
          "min_path_confidence": 0,
          "reject_on_ambiguity": true,
          "reject_on_fanout": true
        },
        "sources": [
          {
            "name": "text",
            "dataset_id": "text",
            "source_id": "text",
            "records": [
              {}
            ],
            "csv": "text",
            "json_str": "text",
            "url": "text",
            "excel_b64": "text",
            "parquet_b64": "text",
            "connection": {},
            "table": "text"
          }
        ],
        "metric": {
          "role": "derived_measure",
          "hint": "text"
        },
        "group_by": [
          "text"
        ],
        "preferred_source": "text",
        "reject_on_ambiguity": false,
        "min_source_confidence": 0,
        "aggregation": "sum",
        "filter": {
          "time_filter": "text",
          "conditions": [
            {
              "column": "text",
              "dimension_hint": "text",
              "op": "eq",
              "value": null,
              "values": []
            }
          ]
        },
        "limit": 1,
        "order": "desc",
        "min_confidence": 0.5,
        "constraints": {
          "requires_derived": false,
          "no_cross_source": false,
          "min_column_confidence": 0,
          "max_join_hops": 4
        },
        "resolved_plan": {
          "source_name": "text",
          "metric_column": "text",
          "aggregation": "sum",
          "group_column": "text",
          "join_path": {
            "base_source": "text",
            "group_source": "text",
            "edges": [
              {
                "left_source": "text",
                "right_source": "text",
                "left_key": "text",
                "right_key": "text",
                "join_type": "inner",
                "min_confidence": 0,
                "expected_cardinality": "text",
                "allow_many_to_many": false
              }
            ],
            "max_hops": 4,
            "min_path_confidence": 0,
            "reject_on_ambiguity": true,
            "reject_on_fanout": true
          },
          "filter": {
            "time_filter": "text",
            "conditions": [
              {
                "column": "text",
                "dimension_hint": "text",
                "op": "eq",
                "value": null,
                "values": []
              }
            ]
          },
          "limit": 1,
          "order": "desc",
          "constraints": {
            "requires_derived": false,
            "no_cross_source": false,
            "min_column_confidence": 0,
            "max_join_hops": 4
          },
          "schema_revision": "text"
        }
      }
    }
  ]
}
{
  "results": [
    {
      "key": "text",
      "data": {
        "query_id": "text",
        "result": null,
        "result_type": "text",
        "confidence": 1,
        "plan": [
          "text"
        ],
        "resolved_column": "text",
        "resolved_role": "text",
        "resolved_source": "text",
        "row_count": 1,
        "candidates": [
          {
            "source": "text",
            "column": "text",
            "role": "text",
            "magnitude": "text",
            "formula": "text",
            "confidence": 1,
            "score_components": {
              "ANY_ADDITIONAL_PROPERTY": 1
            },
            "notes": [
              "text"
            ]
          }
        ],
        "source_scores": {
          "ANY_ADDITIONAL_PROPERTY": 1
        },
        "ambiguous": true,
        "exact_spec": true,
        "explanation": [
          "text"
        ],
        "latency_ms": 1,
        "decision_path": "text",
        "plan_hash": "text",
        "schema_revision": "text",
        "validated": true,
        "deterministic_scope": "text",
        "confidence_source": "text",
        "clarification_required": false,
        "rejection_reason": "text",
        "request_id": "text",
        "source_set": [
          "text"
        ],
        "join_path": [
          {}
        ],
        "planner_mode": "planner_hint"
      },
      "metadata": {
        "request_id": "text",
        "latency_ms": 1,
        "tokens_in": 1,
        "tokens_out": 1,
        "cost_usd": 1,
        "cache_hit": true
      },
      "error": {
        "code": "text",
        "message": "text",
        "details": {}
      }
    }
  ],
  "request_id": "text"
}

POST /v1/query/sql-report

Execute a constrained read-only SQL report over authorized datasets

post
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
sqlstring · min: 1Required
max_rowsinteger · min: 1 · max: 1000 · nullableOptional
Responses
200

Successful Response

application/json
columnsstring[]Optional
rowsobject[]Optional
row_countintegerRequired
truncatedbooleanOptionalDefault: false
request_idstring · nullableOptional
latency_msnumberRequired
post/v1/query/sql-report
POST /v1/query/sql-report HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 76

{
  "sources": [
    {
      "dataset_id": "text",
      "alias": "text"
    }
  ],
  "sql": "text",
  "max_rows": 1
}
{
  "columns": [
    "text"
  ],
  "rows": [
    {}
  ],
  "row_count": 1,
  "truncated": false,
  "request_id": "text",
  "latency_ms": 1
}

POST /v1/resolve

Resolve structured intent into an exact executable plan

post

Bounded deterministic planner.

This endpoint resolves structured intent into an exact plan for POST /v1/query. It only uses registered-source metadata, join graph metadata, planner cache, and precomputed statistics. It does not scan datasets or execute queries.

Scope rules:

  • Provide dataset_id for dataset-scoped planning, or

  • set allow_org_scope=true to plan across all visible datasets.

Deterministic guarantees:

  • identical intent_signature + schema_revision + scope => identical output

  • ambiguity clarifies or rejects; it never expands search

  • no fallback to slower planning paths exists

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

Bounded planning request that returns an exact executable plan.

dataset_idstring · nullableOptional

Public dataset ID alias for a registered source. Required unless allow_org_scope=true or only one visible dataset exists.

group_bystring[]Optional
preferred_sourcestring · nullableOptional
reject_on_ambiguitybooleanOptionalDefault: false
min_source_confidencenumber · max: 1OptionalDefault: 0
aggregationstringOptional

sum | avg | count | max | min

Default: sum
limitinteger · nullableOptional

Top-N limit

orderstringOptional

desc | asc

Default: desc
raw_textstring · nullableOptional

Optional non-authoritative raw text hint. Structured intent remains the source of truth.

include_explanationbooleanOptionalDefault: false
allow_org_scopebooleanOptional

When true, resolve can consider all visible datasets in the org.

Default: false
Responses
200

Successful Response

application/json
confidencenumberRequired
planstring[]Required
explanationstring[]Optional
resolved_columnstringOptionalDefault: ""
resolved_rolestringOptionalDefault: ""
resolved_sourcestringOptionalDefault: ""
latency_msnumberRequired
decision_pathstringRequired
plan_hashstring · nullableOptional
schema_revisionstringRequired
validatedbooleanRequired
deterministic_scopestringRequired
confidence_sourcestringRequired
clarification_requiredbooleanOptionalDefault: false
rejection_reasonstring · nullableOptional
request_idstring · nullableOptional
intent_signaturestringRequired
source_setstring[]Optional
join_pathobject[]Optional
planner_modestringOptionalDefault: registry_planner
post/v1/resolve
POST /v1/resolve HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 519

{
  "dataset_id": "text",
  "metric": {
    "role": "derived_measure",
    "hint": "text"
  },
  "group_by": [
    "text"
  ],
  "preferred_source": "text",
  "reject_on_ambiguity": false,
  "min_source_confidence": 0,
  "aggregation": "sum",
  "filter": {
    "time_filter": "text",
    "conditions": [
      {
        "column": "text",
        "dimension_hint": "text",
        "op": "eq",
        "value": null,
        "values": []
      }
    ]
  },
  "limit": 1,
  "order": "desc",
  "constraints": {
    "requires_derived": false,
    "no_cross_source": false,
    "min_column_confidence": 0,
    "max_join_hops": 4
  },
  "raw_text": "text",
  "include_explanation": false,
  "allow_org_scope": false
}
{
  "resolved_plan": {
    "source_name": "text",
    "metric_column": "text",
    "aggregation": "sum",
    "group_column": "text",
    "join_path": {
      "base_source": "text",
      "group_source": "text",
      "edges": [
        {
          "left_source": "text",
          "right_source": "text",
          "left_key": "text",
          "right_key": "text",
          "join_type": "inner",
          "min_confidence": 0,
          "expected_cardinality": "text",
          "allow_many_to_many": false
        }
      ],
      "max_hops": 4,
      "min_path_confidence": 0,
      "reject_on_ambiguity": true,
      "reject_on_fanout": true
    },
    "filter": {
      "time_filter": "text",
      "conditions": [
        {
          "column": "text",
          "dimension_hint": "text",
          "op": "eq",
          "value": null,
          "values": []
        }
      ]
    },
    "limit": 1,
    "order": "desc",
    "constraints": {
      "requires_derived": false,
      "no_cross_source": false,
      "min_column_confidence": 0,
      "max_join_hops": 4
    },
    "schema_revision": "text"
  },
  "confidence": 1,
  "plan": [
    "text"
  ],
  "explanation": [
    "text"
  ],
  "resolved_column": "",
  "resolved_role": "",
  "resolved_source": "",
  "candidates": [
    {
      "source": "text",
      "column": "text",
      "role": "text",
      "magnitude": "text",
      "formula": "text",
      "confidence": 1,
      "score_components": {
        "ANY_ADDITIONAL_PROPERTY": 1
      },
      "notes": [
        "text"
      ]
    }
  ],
  "source_scores": {
    "ANY_ADDITIONAL_PROPERTY": 1
  },
  "latency_ms": 1,
  "decision_path": "text",
  "plan_hash": "text",
  "schema_revision": "text",
  "validated": true,
  "deterministic_scope": "text",
  "confidence_source": "text",
  "clarification_required": false,
  "rejection_reason": "text",
  "request_id": "text",
  "intent_signature": "text",
  "source_set": [
    "text"
  ],
  "join_path": [
    {}
  ],
  "planner_mode": "registry_planner"
}

POST /v1/sources/schema

Infer and return the structural schema of data sources

post

Call this once when a user connects a data source.

Returns the full Algenta structural schema: column roles, detected formulas, cardinality, and query_hints the LLM should use when calling POST /v1/query.

The schema is also embedded as Arrow metadata in the returned Parquet bytes (parquet_b64), which the LLM agent can store and reuse — no re-profiling on subsequent queries.

Flow:

  1. User connects data source

  2. Call POST /v1/sources/schema — ~1-2s, runs once

  3. LLM reads schema JSON and query_hints

  4. User asks questions → LLM produces structured intent → POST /v1/query (~200ms, cached)

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
Responses
200

Successful Response

application/json
object · Response Infer Schema V1 Sources Schema PostOptional
post/v1/sources/schema
POST /v1/sources/schema HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 198

{
  "sources": [
    {
      "name": "text",
      "dataset_id": "text",
      "source_id": "text",
      "records": [
        {}
      ],
      "csv": "text",
      "json_str": "text",
      "url": "text",
      "excel_b64": "text",
      "parquet_b64": "text",
      "connection": {},
      "table": "text"
    }
  ]
}
{}

POST /v1/verify

Validate a structured query plan before execution

post

LLM calls this after reading /v1/sources/schema.

Submit the exact source + column names chosen by the LLM. The engine verifies:

  • Source exists in registry

  • metric_column exists and is numeric

  • aggregation is valid for the column's role

  • group_column exists (if given)

  • join path exists with sufficient confidence (if join_source_name given)

Returns valid: true + resolved names on success, or valid: false + errors + suggestions on failure. Call /v1/execute (or /v1/query with exact-spec) only after verify returns valid.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body

LLM-produced execution plan. All names are EXACT (from schema endpoint). Mojo checks: source exists, columns exist, aggregation is valid for the column role, and join keys have sufficient confidence.

source_namestring · nullableOptional

Exact source name from schema

dataset_idstring · nullableOptional

Public dataset ID alias for a registered source. When provided, verification is scoped to that one registered dataset.

metric_columnstring · nullableOptional

Exact column name to aggregate

aggregationstring · nullableOptional

sum | avg | count | max | min

group_columnstring · nullableOptional

Exact column name for group-by

join_source_namestring · nullableOptional

Second source name for join

join_columnsstring[] · nullableOptional

[local_col, remote_col] — join key pair. Omit to auto-detect.

min_join_confidencenumberOptional

Reject join paths below this confidence threshold. Default 0.85 — only statistically solid joins are accepted. Lower to 0.50 to allow weaker joins at your own risk.

Default: 0.85
modestringOptional

strict — reject invalid plans with no suggestions (enterprise enforcement). assist — reject invalid plans AND return corrective suggestions (default, LLM-friendly).

Default: assist
Responses
200

Successful Response

application/json
validbooleanRequired
errorsstring[]Required
suggestionsstring[]Required
valid_dimensionsstring[]OptionalDefault: []
valid_measuresstring[]OptionalDefault: []
source_behaviorstringOptionalDefault: ""
latency_msnumberRequired
verifiedbooleanOptionalDefault: false
request_idstring · nullableOptional
schema_revisionstring · nullableOptional
plan_hashstring · nullableOptional
verification_modestringOptionalDefault: assist
rejection_reasonstring · nullableOptional
post/v1/verify
POST /v1/verify HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 921

{
  "source_name": "text",
  "dataset_id": "text",
  "metric_column": "text",
  "aggregation": "text",
  "group_column": "text",
  "join_source_name": "text",
  "join_columns": [
    "text"
  ],
  "min_join_confidence": 0.85,
  "mode": "assist",
  "resolved_plan": {
    "source_name": "text",
    "metric_column": "text",
    "aggregation": "sum",
    "group_column": "text",
    "join_path": {
      "base_source": "text",
      "group_source": "text",
      "edges": [
        {
          "left_source": "text",
          "right_source": "text",
          "left_key": "text",
          "right_key": "text",
          "join_type": "inner",
          "min_confidence": 0,
          "expected_cardinality": "text",
          "allow_many_to_many": false
        }
      ],
      "max_hops": 4,
      "min_path_confidence": 0,
      "reject_on_ambiguity": true,
      "reject_on_fanout": true
    },
    "filter": {
      "time_filter": "text",
      "conditions": [
        {
          "column": "text",
          "dimension_hint": "text",
          "op": "eq",
          "value": null,
          "values": []
        }
      ]
    },
    "limit": 1,
    "order": "desc",
    "constraints": {
      "requires_derived": false,
      "no_cross_source": false,
      "min_column_confidence": 0,
      "max_join_hops": 4
    },
    "schema_revision": "text"
  }
}
{
  "valid": true,
  "errors": [
    "text"
  ],
  "suggestions": [
    "text"
  ],
  "resolved": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "valid_dimensions": [
    "text"
  ],
  "valid_measures": [
    "text"
  ],
  "source_behavior": "",
  "latency_ms": 1,
  "verified": false,
  "request_id": "text",
  "schema_revision": "text",
  "plan_hash": "text",
  "verification_mode": "assist",
  "rejection_reason": "text"
}

Simulation

POST /v1/simulate

Run a simulation

post

Execute a Monte Carlo simulation and receive a structured decision envelope. Use mode: 'auto' for minimal setup or mode: 'expert' for full control.

Performance: p50 < 15ms server-side (Mojo worker pool, async persistence).

Execution policy: Algenta editions have unlimited decisions and no plan request meter. HTTP 429 is reserved for explicit endpoint, provider, or operator controls.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
or
Responses
200

Successful Response

application/json

Full decision output returned by /v1/simulate, /v1/recommend, and /v1/score.

run_idstring · uuidRequired
statusstringOptionalDefault: completed
engine_versionstringRequired
recommended_actionstringRequired
confidencenumber · max: 1Required
rationalestringRequired
scenarios_runintegerRequired
execution_msintegerRequired
simulation_modelstringOptional

Which simulation algorithm was used. Possible values: monte_carlo | qmc_sobol | lhs | bootstrap | scenario | sensitivity | mcmc | decision_tree | time_series | compare | importance_sampling

Default: monte_carlo
engine_typestring · nullableOptional

Engine that ran the simulation (e.g. 'mojo-native-expr', 'lhs', 'mcmc')

simulation_classstringOptional

High-level simulation contract class. Examples: predictive, scenario_analysis, sensitivity_analysis, decision_tree.

Default: predictive
model_revisionstring · nullableOptional

Stable engine or model revision used to generate this result.

assumptions_hashstring · nullableOptional

Stable fingerprint of the validated simulation assumptions executed by the engine.

validated_inputsobject · Validated Inputs · nullableOptional

Normalized summary of the validated request inputs used for execution. Includes mode, runs, variable counts, and model selection.

confidence_intervalobject · Confidence Interval · nullableOptional

Primary outcome confidence interval derived from the simulated distribution.

request_idstring · nullableOptional

Correlation identifier propagated from the API request.

scenario_analysisobject · Scenario Analysis · nullableOptional

Populated for simulation_model='scenario': expected_value, best_case, scenarios list

sensitivity_analysisobject · Sensitivity Analysis · nullableOptional

Populated for simulation_model='sensitivity': tornado_chart, first_order_sobol, variable_importance

bootstrap_resultobject · Bootstrap Result · nullableOptional

Populated for simulation_model='bootstrap': statistic, observed_value, CI, bias, SE

mcmc_resultobject · Mcmc Result · nullableOptional

Populated for simulation_model='mcmc': posterior summaries, R-hat, acceptance_rate

importance_sampling_resultobject · Importance Sampling Result · nullableOptional

Populated for simulation_model='importance_sampling'. Contains: tail_direction, target_threshold, tail_probability, tail_probability_se, cvar_tail, weighted_mean, weighted_std, theta (tilt parameter), tilt_variable, effective_sample_size, nominal_sample_size, variance_reduction_factor, naive_tail_count.

scenario_rankingobject[] · nullableOptional
sensitivity_rankingobject[] · nullableOptional
scorenumber · max: 1 · nullableOptional
score_breakdownobject · Score Breakdown · nullableOptional
created_atstring · date-time · nullableOptional
decision_tree_resultobject · Decision Tree Result · nullableOptional

Populated for simulation_model='decision_tree': n_paths, expected_value, paths[]

time_series_resultobject · Time Series Result · nullableOptional

Populated for simulation_model='time_series'. Contains: model, granularity, dt_years, initial_value, n_steps, fan_chart (per-horizon p5/p25/p50/p75/p95), terminal distribution, max_drawdown_pct, and optional sample_paths for visualization.

formatted_resultobject · Formatted Result · nullableOptional

Human-readable formatted output values with units. Populated when output_unit_specs or unit_spec is provided. Contains: mean_formatted, p5_formatted, p95_formatted, unit, unit_type, etc.

unit_contextobject · Unit Context · nullableOptional

Unit metadata for all variables and outputs. Contains per-variable unit type, code, precision, and display scale. Use this to reconstruct formatted values client-side.

unit_warningsstring[] · nullableOptional

Non-fatal unit validation warnings (e.g. negative currency, out-of-range probability). Simulation still ran — these are advisory only.

chartsobject · Charts · nullableOptional

Pre-computed Vega-Lite compatible chart specs for instant rendering. Populated when include_charts=true in the request or automatically for sensitivity/time_series engine types. Keys: 'histogram', 'cdf', 'tornado', 'fan_chart', 'scatter'. Each value is a complete Vega-Lite spec that can be passed to vega-embed.

histogram_dataobject · Histogram Data · nullableOptional

Pre-computed histogram bins (50 bins) for the primary output distribution.

request_hashstring · nullableOptional

SHA-256 fingerprint of the INPUT payload (variables, distributions, objective function, seed). Cryptographic proof of what data was used to make this decision. Computed at submission time before simulation runs. Format: hex string, 64 chars.

result_hashstring · nullableOptional

SHA-256 fingerprint of this decision OUTPUT (64-char hex). Covers: run_id, request_hash (input binding), recommended_action, confidence, rationale, metrics, percentiles, scenarios_run, engine_version, simulation_model. Binds the decision to both its inputs AND outputs. Use to verify the decision has not been tampered with. Also returned as X-Decision-Hash response header.

post/v1/simulate
POST /v1/simulate HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 226

{
  "mode": "auto",
  "runs": 10000,
  "scenario": {
    "name": "Product launch decision",
    "objective": "maximize_net_value",
    "variables": {
      "cost": {
        "high": 90000,
        "low": 40000
      },
      "revenue": {
        "high": 200000,
        "low": 80000
      }
    }
  },
  "simulation_model": "monte_carlo"
}
{
  "run_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "completed",
  "engine_version": "text",
  "recommended_action": "text",
  "confidence": 1,
  "rationale": "text",
  "metrics": {
    "expected_value": 1,
    "median": 1,
    "std_deviation": 1,
    "variance": 1,
    "probability_of_loss": 1,
    "var_95": 1,
    "cvar_95": 1
  },
  "percentiles": {
    "p5": 1,
    "p10": 1,
    "p25": 1,
    "p50": 1,
    "p75": 1,
    "p90": 1,
    "p95": 1,
    "p99": 1
  },
  "scenarios_run": 1,
  "execution_ms": 1,
  "metadata": {
    "mode": "text",
    "seed": 1,
    "billing_units": 1,
    "engine_version": "text"
  },
  "simulation_model": "monte_carlo",
  "engine_type": "text",
  "simulation_class": "predictive",
  "model_revision": "text",
  "assumptions_hash": "text",
  "validated_inputs": {},
  "confidence_interval": {},
  "request_id": "text",
  "scenario_analysis": {},
  "sensitivity_analysis": {},
  "bootstrap_result": {},
  "mcmc_result": {},
  "importance_sampling_result": {},
  "scenario_ranking": [
    {}
  ],
  "sensitivity_ranking": [
    {}
  ],
  "score": 1,
  "score_breakdown": {},
  "created_at": "2026-01-01T00:00:00.000Z",
  "decision_tree_result": {},
  "time_series_result": {},
  "formatted_result": {},
  "unit_context": {},
  "unit_warnings": [
    "text"
  ],
  "charts": {},
  "histogram_data": {},
  "decision_plan": {
    "recommended_action": "text",
    "confidence": 1,
    "expected_value": 1,
    "risk": {
      "p5": 1,
      "p95": 1,
      "probability_of_loss": 1,
      "var_95": 1
    },
    "options": [
      {
        "name": "text",
        "rank": 1,
        "expected_value": 1,
        "risk": {
          "p5": 1,
          "p95": 1,
          "probability_of_loss": 1,
          "var_95": 1
        },
        "score": 1
      }
    ],
    "rationale": "text",
    "integrity": {},
    "calibration": "text"
  },
  "request_hash": "text",
  "result_hash": "text"
}

GET /v1/simulate/templates

List simulation templates for all industries

get

Returns all available domain-specific simulation templates. Requires API key authentication. Use the template's id with GET /v1/simulate/templates/{id} to get a ready-to-run payload.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
domainstring · nullableOptional
industrystring · nullableOptional
tagstring · nullableOptional
pageintegerOptionalDefault: 1
limitintegerOptionalDefault: 25
Responses
200

Successful Response

application/json
anyOptional
get/v1/simulate/templates
GET /v1/simulate/templates HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

GET /v1/simulate/templates/{template_id}

Get a simulation template with ready-to-run payload

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
template_idstringRequired
Query parameters
runsintegerOptionalDefault: 50000
seedinteger · nullableOptional
Responses
200

Successful Response

application/json
anyOptional
get/v1/simulate/templates/{template_id}
GET /v1/simulate/templates/{template_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

POST /v1/templates/{template_id}/run

Run a simulation template directly

post

Run a simulation template by ID without constructing the full payload. Optionally override runs and seed. Returns simulation results immediately.

Use GET /v1/simulate/templates to list all available templates.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
template_idstringRequired
Query parameters
runsintegerOptionalDefault: 10000
seedinteger · nullableOptional
enginestringOptionalDefault: monte_carlo
Responses
200

Successful Response

application/json
anyOptional
post/v1/templates/{template_id}/run
POST /v1/templates/{template_id}/run HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Source Registry

GET /v1/sources

List all registered sources for this org

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1OptionalDefault: 1
limitinteger · min: 1 · max: 200 · nullableOptional
Responses
200

Successful Response

application/json
object · Response List Sources V1 Sources GetOptional
get/v1/sources
GET /v1/sources HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

GET /v1/sources/graph

Connection graph — all detected join paths between registered sources

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Responses
200

Successful Response

application/json
object · Response Get Graph V1 Sources Graph GetOptional
get/v1/sources/graph
GET /v1/sources/graph HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{}

POST /v1/sources/register

Register a data source — profile, index, detect joins to all existing sources

post

One-time registration per data source.

  • Full column scan (handles sparse/late-appearing data)

  • Mojo detects A×B≈C formulas within the source

  • Mojo detects join keys to every already-registered source

  • Result cached in memory (hot) + persisted to disk (survives restarts)

After registration, use POST /v1/query with sources: [] to query all registered sources, or pass source_ids to target specific ones.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Body
descriptionstring · nullableOptional

Optional human description

Responses
200

Successful Response

application/json
object · Response Register Source V1 Sources Register PostOptional
post/v1/sources/register
POST /v1/sources/register HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 216

{
  "source": {
    "name": "text",
    "dataset_id": "text",
    "source_id": "text",
    "records": [
      {}
    ],
    "csv": "text",
    "json_str": "text",
    "url": "text",
    "excel_b64": "text",
    "parquet_b64": "text",
    "connection": {},
    "table": "text"
  },
  "description": "text"
}
{}

GET /v1/sources/{source_id}

Get schema for a registered source

get
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
source_idstringRequired
Responses
200

Successful Response

application/json
object · Response Get Source V1 Sources Source Id GetOptional
get/v1/sources/{source_id}
GET /v1/sources/{source_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

DELETE /v1/sources/{source_id}

Remove a registered source

delete
Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Path parameters
source_idstringRequired
Responses
200

Successful Response

application/json
object · Response Delete Source V1 Sources Source Id DeleteOptional
delete/v1/sources/{source_id}
DELETE /v1/sources/{source_id} HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}

Streaming

POST /v1/simulate/stream

Streaming simulation via Server-Sent Events

post

Run a simulation and receive progressive results via Server-Sent Events.

The connection stays open and emits events as the Mojo engine computes:

  • progress events every checkpoint_every runs (default: 1000) Each carries Welford online statistics: mean, std, min, max, probability_of_loss, runs_completed, progress (0–1).

  • final event when complete — contains the full DecisionEnvelope identical to what /v1/simulate returns.

Example (curl)

curl -N -X POST /v1/simulate/stream \
  -H "Authorization: Bearer sk-..." \
  -H "Content-Type: application/json" \
  -d '{"mode":"expert","runs":100000,"variables":[...]}'

Example (JavaScript EventSource)

const es = new EventSource('/v1/simulate/stream?token=sk-...');
es.addEventListener('progress', e => console.log(JSON.parse(e.data)));
es.addEventListener('final', e => {
  console.log(JSON.parse(e.data).result);
  es.close();
});

Query parameters

  • checkpoint_every — emit a progress event every N runs (default: 1000, min: 100)

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
checkpoint_everyintegerOptionalDefault: 1000
Body
or
Responses
200

SSE stream of progress events + final DecisionEnvelope

text/event-stream
post/v1/simulate/stream
POST /v1/simulate/stream HTTP/1.1
Host: api.algenta.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 226

{
  "mode": "auto",
  "runs": 10000,
  "scenario": {
    "name": "Product launch decision",
    "objective": "maximize_net_value",
    "variables": {
      "cost": {
        "high": 90000,
        "low": 40000
      },
      "revenue": {
        "high": 200000,
        "low": 80000
      }
    }
  },
  "simulation_model": "monte_carlo"
}

System

GET /v1/admin/egress-log

GET /v1/admin/egress-policy

GET /v1/admin/privacy-report

GET /v1/admin/runtime/benchmarks

GET /v1/admin/runtime/modules

GET /v1/admin/runtime/validation

GET /v1/health

Health check

get
Responses
200

Successful Response

application/json
statusstringRequired
timestampstring · date-timeRequired
get/v1/health
GET /v1/health HTTP/1.1
Host: api.algenta.ai
Accept: */*
200

Successful Response

{
  "status": "text",
  "timestamp": "2026-01-01T00:00:00.000Z"
}

GET /v1/meta/contract

Machine-readable Algenta contract

get
Responses
200

Successful Response

application/json
contract_versionstringRequired
brandstringRequired
api_base_urlstringRequired
mcp_endpointstringRequired
mcp_tools_endpointstringRequired
auth_schemestringRequired
primary_data_query_contractobject · Primary Data Query ContractRequired
get/v1/meta/contract
GET /v1/meta/contract HTTP/1.1
Host: api.algenta.ai
Accept: */*
200

Successful Response

{
  "contract_version": "text",
  "brand": "text",
  "api_base_url": "text",
  "mcp_endpoint": "text",
  "mcp_tools_endpoint": "text",
  "auth_scheme": "text",
  "api_key_prefixes": {
    "live": "text",
    "test": "text"
  },
  "compatibility": {
    "legacy_headers": [
      "text"
    ],
    "legacy_env_vars": [
      "text"
    ],
    "legacy_domains": [
      "text"
    ],
    "deprecation_window_days": 1
  },
  "defaults": {
    "read_only_default": true,
    "write_confirmation_required": true,
    "plan_limits": {
      "ANY_ADDITIONAL_PROPERTY": {}
    }
  },
  "primary_data_query_contract": {},
  "integrations": [
    {
      "name": "text",
      "description": "text",
      "icon": "text",
      "capabilities": [
        "text"
      ],
      "auth_scheme": "text",
      "required_scopes": [
        "text"
      ],
      "read_only_default": true,
      "write_actions": [
        "text"
      ],
      "admin_controls": [
        "text"
      ],
      "docs_url": "text",
      "privacy_url": "text",
      "terms_url": "text",
      "support_url": "text",
      "regions": [
        "text"
      ],
      "status": "text"
    }
  ]
}

GET /v1/runtime/library-stats

GET /v1/runtime/manifest

GET /v1/version

API and engine version

get
Responses
200

Successful Response

application/json
api_versionstringRequired
engine_versionstringRequired
environmentstringRequired
get/v1/version
GET /v1/version HTTP/1.1
Host: api.algenta.ai
Accept: */*
200

Successful Response

{
  "api_version": "text",
  "engine_version": "text",
  "environment": "text"
}

Team

GET /v1/audit-logs

Paginated audit log from DB

get

Return paginated audit log for the authenticated org from the audit_events table.

Authorizations
AuthorizationstringRequired

Canonical v1 authentication. Use Authorization: Bearer <api_key>.

Query parameters
pageinteger · min: 1OptionalDefault: 1
limitinteger · min: 1 · max: 100OptionalDefault: 25
Responses
200

Successful Response

application/json
totalintegerRequired
pageintegerRequired
limitintegerRequired
pagesintegerRequired
get/v1/audit-logs