---
title: "Get Repo Costs"
method: GET
path: "/repos/{short_id}/costs"
tags: ["analytics"]
---

# Get Repo Costs

`GET /repos/{short_id}/costs`

Per-repo cost breakdown.

Aggregates two data sources:
  - credit_transactions (this user, scoped by repo_id) - billing-side spend
    in cents, broken down by transaction type, with 7d / 30d / lifetime
    windows.
  - llm_costs.json artifact (engine-side per-operation telemetry) when
    present. The OSS indexer doesn't currently emit this artifact for
    every snapshot, so the response includes available=False rather than
    500-ing when it's missing.

Auth: anyone can fetch the totals for a public snapshot (transactions are
filtered by user_id, so anonymous callers see zeros for the spend half but
the engine telemetry is still useful as a public stat). Private snapshots
follow the standard owner-only rule.

## Path parameters

- `short_id` string, required

## Response `200`

Successful Response

- RepoCostsResponse
  - `repo_id` string, required
  - `short_id` string, required
  - `total_cents` integer, required
  - `total_cents_30d` integer, required
  - `total_cents_7d` integer, required
  - `by_type` CostsByType, required
    - `indexing_cents` integer
    - `chat_cents` integer
    - `reindex_cents` integer
    - `other_cents` integer
  - `transaction_count` integer, required
  - `transactions` RepoCostTransaction[]
    - `id` string, nullable
    - `amount_cents` integer, required
    - `type` string, required
    - `description` string, nullable
    - `snapshot_id` string, nullable
    - `created_at` string, nullable
  - `llm_costs` LlmCostsTelemetry, required — Engine-side per-operation token telemetry (from llm_costs.json artifact). Available only when the OSS pipeline writes the artifact. Hosted gracefully returns None for every field if the file is absent.
    - `available` boolean
    - `total_input_tokens` integer, nullable
    - `total_output_tokens` integer, nullable
    - `total_cost_usd` number, nullable
    - `by_model` object
    - `by_operation` object

## Other responses

- `422` — Validation Error

---

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