---
title: "Get Session Run Cost"
method: GET
path: "/api/v1/cost/detections/{detection_id}/run"
---

# Get Session Run Cost

`GET /api/v1/cost/detections/{detection_id}/run`

## Request

- Base URL: `https://api.stacktrace.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stacktrace.ai/api/v1/cost/detections/{detection_id}/run`
- Auth: none declared

A Session cost run's cost so far, against the same person's other
runs in the same repo on the same agent kind over the last 30 days: what
the detection's page draws (ADR-0087). 404 for another org's detection,
409 for another rule's.

## Path parameters

- `detection_id` string, required

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- SessionRunCost: `GET /api/v1/cost/detections/{id}/run`: what a Session cost run has cost, and the person's other runs in the same repo on the same agent kind over the last 30 days, which its chart draws (ADR-0087).
  - `run_id` string, required
  - `title` string, nullable, required
  - `repo` string, nullable, required
  - `cost` number, nullable, required
  - `unpriced` integer, required
  - `similar` SimilarRun[], required
    - `run_id` string, required
    - `title` string, nullable
    - `cost` number, required
  - `median` number, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/stacktrace/apis/stacktrace-fleet-api.md) - [All operations](https://skmtc.dev/stacktrace/apis/stacktrace-fleet-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stacktrace/apis/stacktrace-fleet-api/revisions/0ee5484d1d0b?raw)
