Workspaces

Get workspace usage

Changed on

Creative Units balance plus total and per-day consumption over the last days days.

get/v1/workspaces/{workspace_id}/usage

Request

  • Base URL: https://api.app.layer.ai/api
  • URL: https://api.app.layer.ai/api/v1/workspaces/{workspace_id}/usage
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://auth.app.layer.ai/authorize, token URL https://auth.app.layer.ai/oauth/token)
    • OAuth 2 (client credentials, token URL https://api.app.layer.ai/api/oauth/token, scopes: billing:read)

Path parameters

workspace_idstring uuid required

Id of the workspace that owns the resource.

Query parameters

daysinteger

How many days back to report.

Response

Successful Response

balance_creative_unitsnumber required

Current Creative Units balance.

reserved_creative_unitsnumber required

Creative Units reserved by in-flight generations.

available_creative_unitsnumber required

Balance minus reserved: what's spendable right now.

period_startstring required

Start of the reported window (UTC date).

period_endstring required

End of the reported window (UTC date).

total_creative_unitsnumber required

Total Creative Units consumed over the window.

Changes

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      the endpoint scheme security serviceAccount was added to the API

    • info

      the security scope billing:read was removed from the endpoint's security scheme oauth2