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

# boxd

> Bring boxd cost into CostGraph

boxd machines are microVMs for agents and development, billed on the CPU, memory, and disk they actually use.

CostGraph reads boxd at a grain of one record per machine per day. Each record carries the hours the machine spent running, in standby, and hibernated, so you can see what idle machines cost. Spend is priced at your organization's current boxd rates. A past day read again after a rate change shows the new rates, so it can differ from your invoice.

Recent usage is not final. boxd meters usage in 15-minute buckets and can lag by about 25 minutes. The current day keeps changing until it ends.

## Choose how the data reaches us

> [card] CostGraph pulls it
>
> You supply an API key and we read boxd. Nothing to run.

> [card] You push it
>
> You send us the records over the API. Your credentials stay in your infrastructure.

## Before you begin

* In boxd, create an API key (`bxd_...`) in the console or with `boxd auth keys create`. An organization owner or admin must create it.
* The key reads usage for the organization it belongs to. To read a different organization, enter its name or id on the connect form.
* The connect form links to the page where you create this credential.

## Let CostGraph pull

1. Open **Settings > Integrations** and pick **boxd**.
2. Name the connection and pick the tenant these charges belong to.
3. Enter the values you copied. The form lists what boxd needs and marks the
   optional ones.
4. Select **Connect**.

CostGraph verifies the credentials with a short fetch before saving, so a wrong
value or a missing permission fails while you are still on the form.

> [!NOTE]
>
> Credentials are encrypted at rest. Revoke the key in boxd at any time and the connection stops.

## Push cost data

Send the charges to CostGraph yourself instead. [Push data](https://docs.costgraph.ai/costgraph/integrations/focus-push.md) covers the connection id,
the `focus:write` key, and the request shape.

## Run the exporter

```bash theme={null}
focus-exporter --provider boxd --sink costgraph
```

Your boxd key stays with you.
Only the finished records reach CostGraph. [Run the exporter](https://docs.costgraph.ai/costgraph/integrations/exporter.md) covers the three
ways to run it and the variables it reads.

## Cost processing

boxd spend appears in Cost Overview and in anomaly detection alongside every
other provider.


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