> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duraton.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Project usage

> What a project used over a period, every meter, in raw units.

```ts theme={null}
import { createManagementClient, oauthTokens } from "@duraton/sdk/management";

const client = createManagementClient({ baseUrl, auth: oauthTokens(options) });
const usage = await client.projects.usage(projectId, {
  from: new Date("2026-11-01T00:00:00Z"),
  to: new Date("2026-12-01T00:00:00Z"),
});
usage.totals["edge_gateway.egress_bytes"];
```

`GET /projects/{id}/usage?from=<instant>&to=<instant>` on the console's
address, signed in or with an OAuth token, answers the project's total for
each meter over the window: from `from`, included, to `to`, excluded. Both are
required RFC 3339 instants, and `from` must be before `to` (else `422
unprocessable`). Every meter is in the answer, `0` when nothing was used. Any
member who may view the project can read it; a project you cannot see is
`404 not_found`.

```json theme={null}
{
  "from": "2026-11-01T00:00:00.000Z",
  "to": "2026-12-01T00:00:00.000Z",
  "totals": {
    "project.hours": 720,
    "edge_gateway.requests": 1830042,
    "edge_gateway.egress_bytes": 9120448512,
    "database.storage_byte_hours": 377957122048000,
    "database.egress_bytes": 2147483648,
    "database.exports": 3,
    "database.export_bytes": 157286400,
    "workflows.runs": 12480,
    "workflows.steps": 58302,
    "workflows.events": 31077,
    "workflows.state_byte_hours": 2254857830400,
    "webhooks.deliveries": 4210,
    "webhooks.egress_bytes": 18400000
  }
}
```

| Meter | Counts |
| - | - |
| `project.hours` | Hours the project was live, one per closed UTC hour |
| `edge_gateway.requests` | Requests the gateway let through after checking their key |
| `edge_gateway.egress_bytes` | Body bytes of those answers sent to the client, a cancelled stream's bytes up to the cancel included |
| `database.storage_byte_hours` | The database's largest size in each closed hour, in bytes, times one hour |
| `database.egress_bytes` | Bytes sent to clients connected to the database directly |
| `database.exports` | Exports that finished |
| `database.export_bytes` | The file size of those exports |
| `workflows.runs` | Runs created |
| `workflows.steps` | Step attempts that finished, succeeded or failed |
| `workflows.events` | Events received |
| `workflows.state_byte_hours` | The project's stored run state at its sampled peak in each hour, in bytes, times one hour |
| `webhooks.deliveries` | Webhook delivery attempts that sent a request |
| `webhooks.egress_bytes` | The request body bytes of those attempts |

Totals update every few minutes; the latest minutes and the current hour may
not be in them yet. These are raw units, not a bill.

The MCP tool `project_get_usage` on the management MCP takes `projectId`,
`from` and `to` and answers the same. The workflows and webhooks meters alone
are also readable with a secret key ([Usage](https://docs.duraton.dev/workflows/usage.md)).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.