---
title: "What your account spent, in dollars and chip-seconds, by model."
method: GET
path: "/v1/usage"
tags: ["usage"]
---

# What your account spent, in dollars and chip-seconds, by model.

`GET /v1/usage`

## Request

- Base URL: `https://api.japanfold.aiand.com`
- URL: `https://api.japanfold.aiand.com/v1/usage`
- Auth: HTTP bearer

What you are billed for is chip-seconds: for every target of every job, how long a processor was actually leased to it. Time spent queueing, targets that failed, retries we had to make and jobs our watchdog stopped are reported in `excluded_s` and are not billed. Nor is a chip that stayed leased longer than the work that produced your result: each target is capped at the runtime the engine itself measured, plus the time the chip spent loading the model when it did not already have it. That load is billed, because the chip was leased to you while it ran, and each record says how much of `billable_s` it was in `load_s`. Each record carries both numbers per target, the intervals and that runtime, so every line can be rechecked by hand.

`summary` totals the rows in the window (`from`/`to`, not the page): `amount` is what they cost in `currency` (always `usd`), `amount_micros` the same in millionths of a dollar, and `by_model` and `by_surface` split it, each adding up to the total. So "what did I spend last week" is `summary.amount` with `from` set a week back.

## Query parameters

- `from` string
- `to` string
- `since` string
- `until` string
- `limit` integer
- `cursor` string

## Response `200`

Usage list with an account summary

- UsageList
  - `data` Usage[]
    - `amount` number: The same charge in whole `currency` units (dollars), ready to read.
    - `amount_micros` integer: Millionths of one unit of `currency` (US dollars): 1000000 is $1.00. Exact; add these, not `amount`.
    - `billable_s` number
    - `closed_at` string, date-time
    - `currency` 'usd'
    - `excluded_s` number
    - `job` string
    - `load_s` number
    - `model` string
    - `status` string
    - `surface` string
    - `targets` object[]
      - `amount` number: The same charge in whole `currency` units (dollars), ready to read.
      - `amount_micros` integer: Millionths of one unit of `currency` (US dollars): 1000000 is $1.00. Exact; add these, not `amount`.
      - `billable_s` number
      - `id` string
  - `has_more` boolean
  - `next_cursor` string, nullable
  - `summary` object
    - `amount` number: The same charge in whole `currency` units (dollars), ready to read.
    - `amount_micros` integer: Millionths of one unit of `currency` (US dollars): 1000000 is $1.00. Exact; add these, not `amount`.
    - `billable_s` number
    - `by_model` object
    - `by_surface` object
    - `currency` 'usd'
    - `jobs` integer

## Other responses

- `400`: Invalid request
- `401`: Unauthorized

---

[API](https://skmtc.dev/aiand/apis/japanfold-api.md) · [All operations](https://skmtc.dev/aiand/apis/japanfold-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aiand/apis/japanfold-api/revisions/9f4be813b447?raw)
