---
title: "Get an optimal decision"
method: POST
path: "/v1/decision"
tags: ["Products"]
---

# Get an optimal decision

`POST /v1/decision`

## Request

- Base URL: `https://api.algenta.ai`
- URL: `https://api.algenta.ai/v1/decision`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

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.

## Request body

- DecisionRequest: 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.
  - `inputs` DecisionInput[], required: Business inputs with optional uncertainty ranges
    - `name` string, required: Variable name, e.g. 'revenue'
    - `value` number, required: Expected / central value
    - `low` number, nullable: Pessimistic value (optional)
    - `high` number, nullable: Optimistic value (optional)
    - `unit` string, nullable: Unit label, e.g. 'USD'
  - `objective` string: What to optimize: maximize_value, minimize_risk, maximize_profit, minimize_cost
  - `risk_tolerance` string: How much risk is acceptable: low, medium, high
  - `scenarios` integer: How many scenarios to evaluate (more = higher confidence)
  - `engine` string: 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
  - `label` string, nullable: Optional label for this decision

## Response `200`

Successful Response

- DecisionResponse
  - `decision_id` string, required
  - `action` string, required: Recommended action: proceed, pause, reject, or custom
  - `confidence` number, required: Confidence in this recommendation (0–1)
  - `reasoning` string, required: Plain-English explanation
  - `why` string[], required: 3 crisp reasons behind this recommendation
  - `expected_outcome` number, required: Expected value in your input units
  - `downside_risk` number, required: Value at 5th percentile (worst-case)
  - `upside_potential` number, required: Value at 95th percentile (best-case)
  - `probability_of_loss` number, required: Probability of negative outcome
  - `scenarios_evaluated` integer, required
  - `latency_ms` number, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/codna/apis/algenta-api.md) · [All operations](https://skmtc.dev/codna/apis/algenta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/codna/apis/algenta-api/revisions/35d30f84a5df?raw)
