---
title: "Read one machine's AI usage per app and per model"
method: GET
path: "/api/nodes/{node_id}/ai-gateway/usage"
tags: ["nodes"]
---

# Read one machine's AI usage per app and per model

`GET /api/nodes/{node_id}/ai-gateway/usage`

## Request

- Base URL: `https://app.nerdit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.nerdit.ai/api/nodes/{node_id}/ai-gateway/usage`
- Auth: none declared

Forward ``GET /api/ai-gateway/usage?days=``, summed per (app, model).

A daemon from before 0.8.2 answers 404, which passes through.

## Path parameters

- `node_id` string, uuid, required

## Query parameters

- `days` integer: UTC days back, today included.

## Response `200`

Successful Response

- NodeAiUsageView: The machine AI gateway's usage over the last ``days`` UTC days. No cost.
  - `days` integer, required
  - `rows` NodeAiUsageRowView[], required
    - `service` string, required
    - `alias` string, required
    - `requests` integer, required
    - `prompt_tokens` integer, required
    - `completion_tokens` integer, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Content
- `502`: Bad Gateway

---

[API](https://skmtc.dev/nerdit/apis/nerdit-cloud-web.md) · [All operations](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/llms.txt) · [OpenAPI document](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/revisions/06e3b44b58be?raw)
