Flux logo
Flux
Docs
Concepts

Concepts

Costs and usage

What each endpoint charges for, how to read the cost of a request, and how to check your balance.

2 min read · Updated 20 Nov 2026
On this page

Flux is prepay. Each request is charged to the workspace that owns its key, and its response says what it cost. Current prices are on the pricing page.

What is charged

  • POST /lineage is charged by the input tokens it reads, once per pass. A pass is one question over one document, so three questions over two documents are six passes. A request without questions is one pass per document.
  • POST /search is a flat price per search, however many results it reads.
  • POST /fetch is a flat price per page.
  • POST /chat/completions and POST /responses cost the same as the search or Lineage request they make.
  • GET /account and GET /models are free.

What is not charged

  • A request that returns an error. That includes a page Flux could not fetch.
  • A document in a documents request that could not be read. It is listed in errors, and the others are charged as normal.
  • A repeat of a request with the same Idempotency-Key. Flux returns the stored response instead of running it again.

Reading the cost

Every billed response has a usage object. Two fields hold the cost:

  • cost_usd is the cost in US dollars, as a string with ten decimal places, such as "0.0012500000". Use it for display.
  • cost_usd_ticks is the same amount as an integer, in ticks of one ten-billionth of a dollar. Add these up when you total costs, so rounding never creeps in.

Lineage's usage also reports input_tokens and output_tokens. A request with several passes returns a list whose top-level usage is the total; each entry has its own.

Checking the balance

GET /account returns the balance as balance.usd and balance.usd_ticks, and balance.input_tokens: roughly how many tokens of Lineage input the balance covers. It is free, so check it before a large job.

Next steps