# Cloud compute cost by day, crew and VM.

> Model use is billed by your provider, on your own plan, and is never given a dollar figure here; `notes` says what is and is not counted.
> https://koi.dog/docs/api/costs-and-settings/get-costs/

`GET /api/v1/costs` · Scope: `read`

Experimental: this route may change inside v1. No path or query parameters.

## Response.

200 OK: a JSON object. The example has placeholder values.

## Request.

```sh
curl https://app.koi.dog/api/v1/costs \
    -H "Authorization: Bearer $KOIDOG_API_KEY"
```

```js
const res = await fetch("https://app.koi.dog/api/v1/costs", {
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
  },
});
console.log(await res.json());
```

```python
import os

import requests

r = requests.get(
    "https://app.koi.dog/api/v1/costs",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "budget": {
    "capUsd": 0,
    "spentUsd": 0,
    "reservedUsd": 0,
    "burnUsdPerHour": 0,
    "basis": "string"
  },
  "byDay": [],
  "byCrew": [],
  "byVm": [],
  "notes": []
}
```
