GET /api/v1/metering/costs/by-contract
Costs By Contract
Per-contract cost rollup (sum over each salescontracts_id).
Auth: Authorization: Bearer <token> required
Request
Section titled “Request”curl -sS -X GET "https://entherium.duckdns.org:8443/api/v1/metering/costs/by-contract" \ -H "Authorization: Bearer <token>"Response 200
Section titled “Response 200”The contract carries no example for this response; schema: array of ContractCostRow. Field-level shape: interactive explorer.
Returns
Section titled “Returns”array of ContractCostRow — Successful Response
| Field | Type | Description |
|---|---|---|
brave_calls | integer | Web-search API calls billed to this bucket. |
cost_micro_usd | integer | |
runs | integer | |
salescontracts_id | integer | null | |
total_tokens | integer |
Parameters
Section titled “Parameters”| Parameter | In | Required | Type | Default | Constraints | Description |
|---|---|---|---|---|---|---|
ai_company_id | query | no | integer | null | — | — | |
from | query | no | string | null | — | date-time | |
to | query | no | string | null | — | date-time |
Errors
Section titled “Errors”| Code | Meaning | Body |
|---|---|---|
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
Every error body is {detail, code?, request_id, doc_url} — request_id is the value to quote, doc_url points at the Errors reference.