> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Audit Dynamic CI savings with the Decisions API

> Measure the CI hours and dollars Dynamic CI saved, or would save in Learning mode, from the Decisions API, and project them over a normal week.

The [Decisions endpoint](https://docs.trunk.io/api/beta/dynamic-ci/dynamicci/list-dynamic-cis-decisions.md) lists every job decision Dynamic CI made, with an estimate of what each job costs to run. From it you can work out how much CI time and money Dynamic CI saved, or would save if a repository in Learning mode were Enforced. You can follow these steps yourself or hand them to an AI agent.

## Before you start

* An [API key](https://docs.trunk.io/api/authentication#api-keys) for your organization.
* The start of the period to measure.
* Your repository's workflow files, to price each job by the runner it uses.

## Read the model's skips

Only a skip that Dynamic CI's model decided can save time. A skip that a rule decided, such as a [paths filter](https://docs.trunk.io/dynamic-ci/configuration/path-filters.md), is never counted as a saving. So ask only for the model's skips:

```bash theme={"system"}
curl -H "Authorization: Bearer $TRUNK_API_KEY" \
  "https://api.trunk.io/v2beta/dynamic-ci/decisions?since=2026-11-01T00:00:00Z&decidedBy=model&decision=skip&limit=100"
```

Add `owner` and `name` to read one repository. Then follow `nextCursor` while `hasMore` is true. Trunk keeps 90 days of decisions.

## Decide which skips count

Leave out a decision whose `falseSkip` is true, or whose `estimate` is null. Sort the rest by `mode` and `outcome`:

| Figure | Counts a decision when | Meaning |
| - | - | - |
| **Actual** | `mode` is `enforced` or `evolving`, and `outcome` is `skipped` | Time Dynamic CI saved. |
| **Prospective** | `mode` is `learning`, and `outcome` is not `skipped` | Time Dynamic CI would save in Enforced mode. |

In Learning mode every job runs, so Actual is 0. A Learning skip whose job's outcome is `skipped` is not a Prospective saving either: your own CI conditions, such as an `if:` or a paths filter in your workflow, skipped that job already.

## Work out hours and cost

`estimate.durationMs` is the job's compute time, summed over all of its legs (matrix legs, shards or parallel steps). The hours saved are the sum of `durationMs` over the decisions that count, divided by 3,600,000.

To price a job, find its runner from `runs-on` in the workflow file at `workflow.path`, and use the runner provider's price per minute. GitHub-hosted runners and most third-party runners bill each job by the minute, rounded up. Each leg is a job of its own, so round each leg up separately:

```text theme={"system"}
cost = legCount × ceil(durationMs ÷ legCount ÷ 60,000) × price per minute
```

## Project a normal week

If the period is shorter than a week, scale it up to 7 days. Weekdays are busier than weekends, so a short period gives a rough figure. For a better estimate, look at how a past week spread out: call the endpoint with the same filters and `includeTotal=true&limit=1`, once over a whole past week and once over the same days and hours as your period. The week's `total` divided by the period's `total` is the factor to multiply by. Use a week with no holidays, and use only its counts: its decisions may reflect an older configuration.
