---
title: "Get project spend"
method: GET
path: "/api/v1/projects/{project_id}/spend"
tags: ["Projects"]
---

# Get project spend

`GET /api/v1/projects/{project_id}/spend`

## Request

- Base URL: `https://api.studio.kaitoi.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.studio.kaitoi.io/api/v1/projects/{project_id}/spend`
- Auth: HTTP bearer

Returns actual billed credits from project-attributed ledger transactions. The response does not expose account balances, payment methods, or dollar amounts.

## Path parameters

- `project_id` string, required

## Headers

- `authorization` string, nullable

## Response `200`

Project spend summary.

- PublicProjectSpendSummary
  - `projectId` string, required: Project identifier.
  - `totalCredits` integer, required: Whole billed credits derived from project-attributed ledger transactions.
  - `totalMicrocredits` string, required: Exact total billed amount in millionths of one credit.
  - `byNode` PublicProjectSpendNode[], required: Spend grouped by node.
    - `nodeId` string, required: Node instance identifier.
    - `nodeType` string, nullable: Node type identifier.
    - `nodeTitle` string, required: Node display title.
    - `credits` integer, required: Credits billed for this node.
    - `microcredits` string, required: Exact billed amount in millionths of one credit.
    - `billedRuns` integer, required: Number of billed node executions counted for this node.
    - `lastUsedAt` string, date-time, nullable: Timestamp of the most recent billed node execution.
  - `byProvider` object, required: Provider credit breakdown.
  - `byProviderMicrocredits` object, required: Exact provider breakdown in millionths of one credit.
  - `byChargeType` object, required: Charge type credit breakdown.
  - `byChargeTypeMicrocredits` object, required: Exact charge-type breakdown in millionths of one credit.
  - `recentRuns` PublicProjectSpendRun[], required: Recent billed executions derived from ledger transactions.
    - `id` string, required: Stable row identifier for this billed run entry.
    - `credits` integer, required: Net credits billed for this node execution.
    - `microcredits` string, required: Exact net billed amount in millionths of one credit.
    - `kind` string: Entry kind. Project spend exposes net billed deductions.
    - `chargeType` string, required: Primary charge type for this billed run.
    - `reason` string, required: Reason/source for this spend row.
    - `provider` string, nullable: Primary provider, when available.
    - `model` string, nullable: Model billed for assistant/API-backed rows, when available.
    - `nodeId` string, required: Node instance identifier.
    - `nodeType` string, nullable: Node type identifier.
    - `nodeTitle` string, required: Node display title.
    - `nodeExecutionId` string, nullable: Node execution identifier.
    - `createdAt` string, date-time, nullable: Node execution timestamp.

## Other responses

- `401`: Missing, malformed, expired, or revoked bearer token.
- `403`: The API key lacks the required scope or account capability.
- `404`: The project does not exist or is not owned by this user.
- `422`: Validation Error
- `429`: The client or API key exceeded the REST API rate limit.
- `503`: The shared REST API rate limiter is temporarily unavailable.

---

[API](https://skmtc.dev/kaitoi/apis/kaitoi-rest-api.md) · [All operations](https://skmtc.dev/kaitoi/apis/kaitoi-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kaitoi/apis/kaitoi-rest-api/revisions/239a74aa2c64?raw)
