---
title: "What this computer's tasks cost this month"
method: GET
path: "/api/v1/devices/{id}/model_usage"
tags: ["Devices"]
---

# What this computer's tasks cost this month

`GET /api/v1/devices/{id}/model_usage`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/devices/{id}/model_usage`
- Auth: API key in header `api-key`

The device's own key (its own id only), its owner or root, and any account in the owner's tree (the owner's agents, by api-key). Anyone else gets 404. `cost_usd` and `calls` are the billed person's month across all their computers, against `budget_usd`; `device_cost_usd` and `device_calls` are this computer's share. Money is a decimal string.

## Path parameters

- `id` string, required

## Response `200`

OK.

- object
  - `month` string: The UTC calendar month the numbers cover.
  - `cost_usd` string: What the person billed (the top of the device's owner tree) has used this month across ALL their computers, a decimal string. This is the number the allowance measures.
  - `budget_usd` string: The person's monthly allowance (DEVICE_MODEL_BUDGET_USD, 20 unless the operator changed it).
  - `calls` integer: The person's calls this month across all their computers.
  - `device_cost_usd` string: This computer's share of cost_usd.
  - `device_calls` integer: This computer's share of calls.

## Other responses

- `401`: Missing or invalid credentials.
- `404`: Not this device, not yours, or the feature is off.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
