---
title: "Get daily spend"
method: GET
path: "/v1/projects/{project_id}/budgets/daily-cost"
tags: ["budgets"]
---

# Get daily spend

`GET /v1/projects/{project_id}/budgets/daily-cost`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/budgets/daily-cost`
- Auth: HTTP bearer

Per-day token usage and cost, split by agent, for one calendar month, including judge evaluations. Costs are in each model's pricing currency unless `convert_costs_to` is set. Defaults to the current month; pass `month=YYYY-MM` to query history. Covers every environment the caller can access; `environment_id` limits it to one. `group_by=model` splits by model; `group_by=context.<key>` splits by a run context value such as `context.customer_id`, with `context_value: null` for runs that do not set it. Response includes running month total, projected end-of-month estimate when the month is in progress, and month-over-month trend versus the prior calendar month.

Required permission: `budgets.view`.

## Path parameters

- `project_id` string, uuid, required

## Query parameters

- `month` string, nullable: Month in YYYY-MM format
- `environment_id` string, uuid, nullable: Restrict to one environment UUID
- `start_date` string, date-time, nullable: Exact range start; applies only together with `end_date` and narrows the data within `month`
- `end_date` string, date-time, nullable: Exact range end (exclusive); applies only together with `start_date`
- `tz_offset` integer, nullable: UTC offset in minutes, with the sign inverted (-120 for UTC+2, 300 for UTC-5). Days are grouped in this timezone; defaults to UTC.
- `group_by` string: Group spend by 'agent', 'model', or a run context path such as 'context.customer_id'
- `convert_costs_to` 'EUR' | 'USD', nullable: Convert token costs to EUR or USD at the daily ECB reference rate of each model call

## Response `200`

Successful Response

- PublicDailyCostResponse
  - `month` string, required: Month in `YYYY-MM` format.
  - `days` PublicDailyCostDayResponse[], required: One item per calendar day of the month.
    - `date` string, date, required: Calendar day in the timezone given by `tz_offset`, UTC by default.
    - `agents` union[], required: Spend per group on this day, highest token count first. Items match `group_by`.
      - union
        - PublicDailyCostAgentResponse
          - `token_cost` PublicTokenCostResponse, required: Token cost in each model's pricing currency, or in one currency when `convert_costs_to` is set.
            - `amounts` object, required: Total cost keyed by currency code (`EUR` or `USD`), as a decimal string with 12 decimal places. Only currencies with a nonzero amount are included.
            - `breakdown` object, required: Cost split by token type and by agent versus judge, keyed by currency code.
            - `coverage` PublicTokenCostCoverageResponse, required: How many model calls could be priced.
              - …
            - `converted_to` string, nullable: Currency the amounts were converted to at the daily ECB reference rate of each call. Present only when `convert_costs_to` is set.
            - `native_amounts` object, nullable: Totals in each model's pricing currency before conversion, as decimal strings keyed by currency code. Present only when `convert_costs_to` is set.
          - `tokens` integer, required: Total tokens for this group, including judge evaluations.
          - `agent_name` string, required: Agent the costs belong to (`group_by=agent`).
        - PublicDailyCostModelResponse
          - `token_cost` PublicTokenCostResponse, required: Token cost in each model's pricing currency, or in one currency when `convert_costs_to` is set.
            - `amounts` object, required: Total cost keyed by currency code (`EUR` or `USD`), as a decimal string with 12 decimal places. Only currencies with a nonzero amount are included.
            - `breakdown` object, required: Cost split by token type and by agent versus judge, keyed by currency code.
            - `coverage` PublicTokenCostCoverageResponse, required: How many model calls could be priced.
              - …
            - `converted_to` string, nullable: Currency the amounts were converted to at the daily ECB reference rate of each call. Present only when `convert_costs_to` is set.
            - `native_amounts` object, nullable: Totals in each model's pricing currency before conversion, as decimal strings keyed by currency code. Present only when `convert_costs_to` is set.
          - `tokens` integer, required: Total tokens for this group, including judge evaluations.
          - `model_name` string, required: Model the costs belong to (`group_by=model`).
        - PublicDailyCostContextResponse
          - `token_cost` PublicTokenCostResponse, required: Token cost in each model's pricing currency, or in one currency when `convert_costs_to` is set.
            - `amounts` object, required: Total cost keyed by currency code (`EUR` or `USD`), as a decimal string with 12 decimal places. Only currencies with a nonzero amount are included.
            - `breakdown` object, required: Cost split by token type and by agent versus judge, keyed by currency code.
            - `coverage` PublicTokenCostCoverageResponse, required: How many model calls could be priced.
              - …
            - `converted_to` string, nullable: Currency the amounts were converted to at the daily ECB reference rate of each call. Present only when `convert_costs_to` is set.
            - `native_amounts` object, nullable: Totals in each model's pricing currency before conversion, as decimal strings keyed by currency code. Present only when `convert_costs_to` is set.
          - `tokens` integer, required: Total tokens for this group, including judge evaluations.
          - `context_value` string, nullable, required: Run context value at the `group_by` path. Null for runs that do not set it.
    - `token_cost` PublicTokenCostResponse, required: Token cost in each model's pricing currency, or in one currency when `convert_costs_to` is set.
      - `amounts` object, required: Total cost keyed by currency code (`EUR` or `USD`), as a decimal string with 12 decimal places. Only currencies with a nonzero amount are included.
      - `breakdown` object, required: Cost split by token type and by agent versus judge, keyed by currency code.
      - `coverage` PublicTokenCostCoverageResponse, required: How many model calls could be priced.
        - `complete` boolean, required: True when every model call could be priced.
        - `call_count` integer, required: Model calls covered by the report.
        - `priced_call_count` integer, required: Calls included in the cost amounts.
        - `unpriced_call_count` integer, required: Calls without a known price or without reported token usage. They are left out of the amounts.
        - `unpriced_models` string[], required: Models of the unpriced calls.
      - `converted_to` string, nullable: Currency the amounts were converted to at the daily ECB reference rate of each call. Present only when `convert_costs_to` is set.
      - `native_amounts` object, nullable: Totals in each model's pricing currency before conversion, as decimal strings keyed by currency code. Present only when `convert_costs_to` is set.
  - `currencies` string[], required: Currency codes with a nonzero cost this month or last month.
  - `current_token_cost` PublicTokenCostResponse, required: Token cost in each model's pricing currency, or in one currency when `convert_costs_to` is set.
    - `amounts` object, required: Total cost keyed by currency code (`EUR` or `USD`), as a decimal string with 12 decimal places. Only currencies with a nonzero amount are included.
    - `breakdown` object, required: Cost split by token type and by agent versus judge, keyed by currency code.
    - `coverage` PublicTokenCostCoverageResponse, required: How many model calls could be priced.
      - `complete` boolean, required: True when every model call could be priced.
      - `call_count` integer, required: Model calls covered by the report.
      - `priced_call_count` integer, required: Calls included in the cost amounts.
      - `unpriced_call_count` integer, required: Calls without a known price or without reported token usage. They are left out of the amounts.
      - `unpriced_models` string[], required: Models of the unpriced calls.
    - `converted_to` string, nullable: Currency the amounts were converted to at the daily ECB reference rate of each call. Present only when `convert_costs_to` is set.
    - `native_amounts` object, nullable: Totals in each model's pricing currency before conversion, as decimal strings keyed by currency code. Present only when `convert_costs_to` is set.
  - `current_total_tokens` integer, required: Total tokens for the same period.
  - `projected_amounts` object, nullable, required: Estimated end-of-month cost keyed by currency code, extrapolated from the average daily spend so far. Null unless the month is in progress and every call could be priced.
  - `last_month_token_cost` PublicTokenCostResponse, required: Token cost in each model's pricing currency, or in one currency when `convert_costs_to` is set.
    - `amounts` object, required: Total cost keyed by currency code (`EUR` or `USD`), as a decimal string with 12 decimal places. Only currencies with a nonzero amount are included.
    - `breakdown` object, required: Cost split by token type and by agent versus judge, keyed by currency code.
    - `coverage` PublicTokenCostCoverageResponse, required: How many model calls could be priced.
      - `complete` boolean, required: True when every model call could be priced.
      - `call_count` integer, required: Model calls covered by the report.
      - `priced_call_count` integer, required: Calls included in the cost amounts.
      - `unpriced_call_count` integer, required: Calls without a known price or without reported token usage. They are left out of the amounts.
      - `unpriced_models` string[], required: Models of the unpriced calls.
    - `converted_to` string, nullable: Currency the amounts were converted to at the daily ECB reference rate of each call. Present only when `convert_costs_to` is set.
    - `native_amounts` object, nullable: Totals in each model's pricing currency before conversion, as decimal strings keyed by currency code. Present only when `convert_costs_to` is set.
  - `last_month_total_tokens` integer, required: Total tokens for the previous calendar month.
  - `last_month_agents` union[], required: Previous month's spend per group, sorted by name.
    - union
      - PublicDailyCostAgentResponse
        - `token_cost` PublicTokenCostResponse, required: Token cost in each model's pricing currency, or in one currency when `convert_costs_to` is set.
          - `amounts` object, required: Total cost keyed by currency code (`EUR` or `USD`), as a decimal string with 12 decimal places. Only currencies with a nonzero amount are included.
          - `breakdown` object, required: Cost split by token type and by agent versus judge, keyed by currency code.
          - `coverage` PublicTokenCostCoverageResponse, required: How many model calls could be priced.
            - `complete` boolean, required: True when every model call could be priced.
            - `call_count` integer, required: Model calls covered by the report.
            - `priced_call_count` integer, required: Calls included in the cost amounts.
            - `unpriced_call_count` integer, required: Calls without a known price or without reported token usage. They are left out of the amounts.
            - `unpriced_models` string[], required: Models of the unpriced calls.
          - `converted_to` string, nullable: Currency the amounts were converted to at the daily ECB reference rate of each call. Present only when `convert_costs_to` is set.
          - `native_amounts` object, nullable: Totals in each model's pricing currency before conversion, as decimal strings keyed by currency code. Present only when `convert_costs_to` is set.
        - `tokens` integer, required: Total tokens for this group, including judge evaluations.
        - `agent_name` string, required: Agent the costs belong to (`group_by=agent`).
      - PublicDailyCostModelResponse
        - `token_cost` PublicTokenCostResponse, required: Token cost in each model's pricing currency, or in one currency when `convert_costs_to` is set.
          - `amounts` object, required: Total cost keyed by currency code (`EUR` or `USD`), as a decimal string with 12 decimal places. Only currencies with a nonzero amount are included.
          - `breakdown` object, required: Cost split by token type and by agent versus judge, keyed by currency code.
          - `coverage` PublicTokenCostCoverageResponse, required: How many model calls could be priced.
            - `complete` boolean, required: True when every model call could be priced.
            - `call_count` integer, required: Model calls covered by the report.
            - `priced_call_count` integer, required: Calls included in the cost amounts.
            - `unpriced_call_count` integer, required: Calls without a known price or without reported token usage. They are left out of the amounts.
            - `unpriced_models` string[], required: Models of the unpriced calls.
          - `converted_to` string, nullable: Currency the amounts were converted to at the daily ECB reference rate of each call. Present only when `convert_costs_to` is set.
          - `native_amounts` object, nullable: Totals in each model's pricing currency before conversion, as decimal strings keyed by currency code. Present only when `convert_costs_to` is set.
        - `tokens` integer, required: Total tokens for this group, including judge evaluations.
        - `model_name` string, required: Model the costs belong to (`group_by=model`).
      - PublicDailyCostContextResponse
        - `token_cost` PublicTokenCostResponse, required: Token cost in each model's pricing currency, or in one currency when `convert_costs_to` is set.
          - `amounts` object, required: Total cost keyed by currency code (`EUR` or `USD`), as a decimal string with 12 decimal places. Only currencies with a nonzero amount are included.
          - `breakdown` object, required: Cost split by token type and by agent versus judge, keyed by currency code.
          - `coverage` PublicTokenCostCoverageResponse, required: How many model calls could be priced.
            - `complete` boolean, required: True when every model call could be priced.
            - `call_count` integer, required: Model calls covered by the report.
            - `priced_call_count` integer, required: Calls included in the cost amounts.
            - `unpriced_call_count` integer, required: Calls without a known price or without reported token usage. They are left out of the amounts.
            - `unpriced_models` string[], required: Models of the unpriced calls.
          - `converted_to` string, nullable: Currency the amounts were converted to at the daily ECB reference rate of each call. Present only when `convert_costs_to` is set.
          - `native_amounts` object, nullable: Totals in each model's pricing currency before conversion, as decimal strings keyed by currency code. Present only when `convert_costs_to` is set.
        - `tokens` integer, required: Total tokens for this group, including judge evaluations.
        - `context_value` string, nullable, required: Run context value at the `group_by` path. Null for runs that do not set it.
  - `trends` object, required: Change versus the previous month, keyed by currency code.
  - `agents` string[], required: Groups with usage or spend in the period, sorted by name. Null stands for runs without the context value.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `422`: Validation Error
- `429`: Rate limit exceeded.

---

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