Get usage and cost
What the project used and spent in the period, and what the overview page shows (running sessions, the plan's concurrency limit, agent runs and their model cost, per day too).
GET
/v1/project/usageRequest
| Method and path | GET/v1/project/usage |
|---|---|
| Base URL | https://api.boxline.dev |
| Authentication | Your API key in the x-api-key header (or Authorization: Bearer). The examples read it from BOXLINE_API_KEY. |
Query parameters
| Name | Type | Default | Allowed values | Description |
|---|---|---|---|---|
from | string | – | – | Default the start of this month. Format: date-time. |
to | string | – | – | Default now. Format: date-time. |
curl "https://api.boxline.dev/v1/project/usage" \ -H "x-api-key: $BOXLINE_API_KEY"import { Boxline } from "@boxline/sdk";const bx = new Boxline(); // reads BOXLINE_API_KEY and BOXLINE_API_URLconst usage = await bx.usage();console.log(usage.costUsd, usage.running, usage.concurrencyLimit, usage.byDay);from boxline import Boxlinebx = Boxline() # reads BOXLINE_API_KEY and BOXLINE_API_URLusage = bx.usage()print(usage["costUsd"], usage["running"], usage["concurrencyLimit"], usage["byDay"])boxline usage # this month so farboxline usage --from 2026-09-01 --to 2026-09-30Responses
200 OK
Usage of sessions created in the period.
Fields
| Name | Type | Default | Allowed values | Description |
|---|---|---|---|---|
from | string | – | – | Format: date-time. |
to | string | – | – | Format: date-time. |
sessions | integer | – | – | |
running | integer | – | – | |
concurrencyLimit | integer | – | – | The plan's concurrent sessions. |
agentRuns | integer | – | – | Agent runs started in the period. |
modelCostUsd | number | – | – | List-price cost of runs on the platform's model keys. |
ownKeyModelCostUsd | number | – | – | List-price cost of runs on the project's own model keys (not charged by Boxline). |
browserSeconds | number | – | – | |
sandboxVcpuSeconds | number | – | – | |
sandboxGibSeconds | number | – | – | |
proxy | object | – | – | |
proxy.residentialGb | number | – | – | |
proxy.datacenterGb | number | – | – | |
proxy.customGb | number | – | – | |
proxy.costUsd | number | – | – | |
captchaSolves | object | – | – | |
captchaSolves.solved | integer | – | – | |
captchaSolves.failed | integer | – | – | |
captchaSolves.refused | integer | – | – | |
captchaSolves.costUsd | number | – | – | |
searches | object | – | – | Web searches that reached the provider in the period (cached answers are not counted). |
searches.count | integer | – | – | |
searches.costUsd | number | – | – | The searches beyond each month's allowance |
costUsd | number | – | – | Includes proxy data |
byDay | object[] | – | – | |
byDay[].date | string | – | – | Format: date. |
byDay[].sessions | integer | – | – | |
byDay[].seconds | number | – | – | |
byDay[].costUsd | number | – | – | |
byDay[].agentRuns | integer | – | – | |
byDay[].modelCostUsd | number | – | – | |
byDay[].ownKeyModelCostUsd | number | – | – |
{ "from": "2026-09-29T10:00:00.000Z", "to": "2026-09-29T10:00:00.000Z", "sessions": 0, "running": 0, "concurrencyLimit": 0, "agentRuns": 0, "modelCostUsd": 0, "ownKeyModelCostUsd": 0, "browserSeconds": 0, "sandboxVcpuSeconds": 0, "sandboxGibSeconds": 0, "proxy": { "residentialGb": 0, "datacenterGb": 0, "customGb": 0, "costUsd": 0 }, "captchaSolves": { "solved": 0, "failed": 0, "refused": 0, "costUsd": 0 }, "searches": { "count": 0, "costUsd": 0 }, "costUsd": 0, "byDay": [ { "date": "2026-09-29", "sessions": 0, "seconds": 0, "costUsd": 0, "agentRuns": 0, "modelCostUsd": 0, "ownKeyModelCostUsd": 0 } ]}Errors
Errors have a matching HTTP status and the same body. code is stable, so check it in your code; message is for people. See Errors and request ids.
| Status | Codes | When |
|---|---|---|
| 401 Unauthorized | unauthorized | Missing or invalid API key. |
{ "error": { "code": "not_found", "message": "session not found", "requestId": "req_4fJx0aQm2Lk9Pz7N" }}Learn more
These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.