Workspaces

Get workspace balance and usage

Changed on

Returns, in USD, the balance the credential's user may see in a workspace and, when they may see workspace usage, what the workspace was charged over an inclusive UTC day range (default: the last 30 days; at most 31 days, ending no later than today). On a plan that includes usage reporting, a user with billing permissions for the workspace gets the workspace balance and workspace totals (balance_scope workspace). Anyone else gets only their own allowance and any member limit on them (balance_scope caller), and spend is unavailable with reason entitlement_missing (the plan lacks usage reporting) or permission_missing (the user lacks billing permissions), never zero. available_cost is current, not limited to the period, and does not guarantee that a run will be admitted. Totals only: no pool breakdown and no per-member, per-model, or per-run detail. An API key needs billing permission on the workspace; an OAuth token works for any workspace its user is a member of. Other workspaces return 403.

get/workspaces/{workspaceId}/usage

Request

  • Base URL
    https://app.flora.ai/api/v1
  • URL
    https://app.flora.ai/api/v1/workspaces/{workspaceId}/usage
  • Auth
    HTTP bearer

Path parameters

workspaceIdstring required

Workspace identifier

Example:ws_abc123

Query parameters

start_datestring

First UTC day to include (YYYY-MM-DD), at most 30 days before end_date. Defaults to 29 days before end_date.

Example:2026-08-01
end_datestring

Last UTC day to include (YYYY-MM-DD), no later than today. Defaults to today (UTC).

Example:2026-08-01

Response

Workspace usage returned.

workspace_idstring required

Workspace identifier

currency'USD' required

Currency of every cost in this response

balance_scope'caller' | 'workspace' required

Whose balance available_cost is, decided by the workspace's plan and the current role of the credential's user. workspace: the plan includes usage reporting and the user holds billing permissions for the workspace, directly or through an organization role. caller: anyone else, including billing admins on a plan without usage reporting.

available_costnumber required

USD that can still be spent now, read at request time and not limited to any period. For balance_scope workspace: what the credit pool the workspace draws from can still fund (included, prepaid, and remaining enabled overage usage), before any per-member limit; an organization's workspaces may share that pool. For balance_scope caller: the credential's user's own allowance from that pool, held to any spending limit or cap on that user, so it equals the pool's amount when none applies. Workspace-level spending caps are not reflected, and it does not guarantee that a run will be admitted: other spend and concurrent runs change it.

Example response

{
  "workspace_id": "ws_abc123",
  "spend": {
    "period": {
      "start_date": "2026-08-01",
      "end_date": "2026-08-01"
    }
  }
}

Changes

    • warning

      added the new not_configured enum value to the / response property for the response status

    • warning

      added the new not_configured enum value to the / response property for the response status

    • warning

      added the new not_configured enum value to the / response property for the response status

    • warning

      added the new not_configured enum value to the / response property for the response status

    • warning

      added the new not_configured enum value to the / response property for the response status

    • warning

      added the new not_configured enum value to the / response property for the response status

    • warning

      added the new not_configured enum value to the / response property for the response status

    • warning

      added the new not_configured enum value to the / response property for the response status

    • warning

      added the new not_configured enum value to the / response property for the response status

    • info

      endpoint added