---
title: "Get what a job and its run were charged"
method: GET
path: "/jobs/{id}/cost"
tags: ["Jobs"]
---

# Get what a job and its run were charged

`GET /jobs/{id}/cost`

## Request

- Base URL: `https://api.varg.ai/v2`
- URL: `https://api.varg.ai/v2/jobs/{id}/cost`
- Auth: HTTP bearer

Ledger view of what the job, and the whole run it belongs to (the root
job plus every job it spawned), were actually charged. Unlike
`GET /jobs/{id}/price`, nothing here falls back to an estimate:
`charged_cents` is money that moved, `estimated_cents` is a quote, and
`held_cents` is credits set aside for work still running. All amounts
are integer credits (1 credit = 1 cent), in fields named `*_cents`.
Pass a root or child job id.

## Path parameters

- `id` string, required

## Response `200`

Run cost

- RunCostResponse
  - `data` RunCostData
    - `job_id` string
    - `run_id` string: Id of the root job of the run
    - `is_root` boolean
    - `charged_cents` integer: Ledger charges for this job alone
    - `run_charged_cents` integer: Ledger charges for the whole run
    - `run_held_cents` integer: Credits still held for the run's unfinished work
    - `settled` boolean: True when every job in the run has finished and nothing is held
    - `attribution` object, nullable
      - `source` RunCostDimension: A value with a human-readable label.
        - `key` string, required
        - `label` string, required
        - `kind` 'member' | 'api_key'
        - `avatar_url` string, nullable
        - `owner_label` string, nullable
      - `member` RunCostDimension: A value with a human-readable label.
        - `key` string, required
        - `label` string, required
        - `kind` 'member' | 'api_key'
        - `avatar_url` string, nullable
        - `owner_label` string, nullable
      - `api_key` RunCostDimension: A value with a human-readable label.
        - `key` string, required
        - `label` string, required
        - `kind` 'member' | 'api_key'
        - `avatar_url` string, nullable
        - `owner_label` string, nullable
    - `jobs` RunCostJob[]
      - `job_id` string
      - `parent_job_id` string, nullable
      - `is_root` boolean
      - `tool` RunCostDimension: A value with a human-readable label.
        - `key` string, required
        - `label` string, required
        - `kind` 'member' | 'api_key'
        - `avatar_url` string, nullable
        - `owner_label` string, nullable
      - `model` RunCostDimension: A value with a human-readable label.
        - `key` string, required
        - `label` string, required
        - `kind` 'member' | 'api_key'
        - `avatar_url` string, nullable
        - `owner_label` string, nullable
      - `status` RunCostDimension: A value with a human-readable label.
        - `key` string, required
        - `label` string, required
        - `kind` 'member' | 'api_key'
        - `avatar_url` string, nullable
        - `owner_label` string, nullable
      - `created_at` string, date-time, nullable
      - `completed_at` string, date-time, nullable
      - `estimated_cents` integer, nullable
      - `charged_cents` integer: Ledger charges for this job
      - `held_cents` integer: Credits still held for this job
      - `charges` RunCostCharge[]
        - `id` string: Ledger transaction id
        - `posted_at` string, date-time
        - `amount_cents` integer
        - `billed_units` object, nullable
  - `meta` object
    - `definition_version` string
    - `data_as_of` string, date-time
    - `money_unit` 'cent': Amounts are integer credits, in `*_cents` fields
    - `time_basis` 'posted_at' | 'lifetime' | 'created_at'
    - `attribution_scope` 'full' | 'self': `self` means identity fields show only your own values

## Other responses

- `401`: Missing or invalid API key / JWT
- `404`: Unknown job (or not owned by the caller)
- `503`: Cost reporting is not available (billing database not configured)

## Changes

- **2026-10-20** `43bcf5ea398d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/varg/apis/varg-api/changes/jobs/:id/cost/get.md)

---

[API](https://skmtc.dev/varg/apis/varg-api.md) · [All operations](https://skmtc.dev/varg/apis/varg-api/llms.txt) · [OpenAPI document](https://skmtc.dev/varg/apis/varg-api/revisions/09d49a6d852f?raw)
