import type * as Extend from "../index"; /** * Usage credits consumed by a run. * * **Availability:** This field will not be returned for: * * Runs created before October 7, 2025 * * Customers on legacy billing systems * * For more details on how credits work, see our [Credits Guide](https://docs.extend.ai/2026-02-09/product/general/how-credits-work). */ export interface RunUsage { /** The credits consumed by this run. For most run types this is the line item for the run's own work; for `workflow_run` this is the aggregate across all child runs. */ credits: number; /** * The total credits accounted for under this run, including any other runs it was responsible for creating. For example, an extract run on a fresh upload triggers a parse run, so `totalCredits` includes both line items. For runs that didn't trigger any other work — like `parse_run`, `edit_run` and `workflow_run` — `totalCredits` equals `credits`. * * **Availability:** Present on runs persisted on or after May 14, 2026. Runs persisted before that date will omit this field. */ totalCredits?: number; /** * The chargeable resources that make up `totalCredits`, including this run itself when it has its own line item. For `workflow_run`, lists every contributing child run sorted by creation time (the workflow itself isn't chargeable and has no line item). * * **Availability:** Present on runs persisted on or after May 14, 2026. Runs persisted before that date will omit this field. */ breakdown?: Extend.RunUsageBreakdownEntry[]; }