Usage

Get your credit usage

GET/v1/integration/platform/usage

Your credit balance, and the credits you bought and used in a period, by client. One AI Interview uses one credit. Requires an API key with the `usage:read` scope.

Requires an Alfa API key as a bearer token. How API keys work

Query parameters

  • fromstring

    The start of the period. Defaults to the start of the current month (UTC).

    format date-time

  • tostring

    The end of the period, excluded. Defaults to now.

    format date-time

Response body

  • fromstringrequired

    The start of the period.

  • tostringrequired

    The end of the period, excluded.

  • balanceintegerrequired

    Credits purchased minus credits used, all time. Negative once you use more than you bought; the overage is invoiced.

  • purchasedintegerrequired

    Credits purchased in the period.

  • usedintegerrequired

    Credits used in the period: one per AI Interview.

  • clientsobject[]required

    Usage by client in the period, highest first.

    Show fields
    • companyIdstringrequired

      The client’s Company ID.

    • externalClientIdstring | nullrequired

      Your id for the client.

    • namestring | nullrequired

      The client company name.

    • usedintegerrequired

      Credits the client used in the period.

    • interviewsintegerrequired

      AI Interviews in the period.

Responses

  • 200Success.
  • 400The request is malformed: invalid JSON, an unexpected body or an unknown query parameter. Problem details
  • 401The bearer token is missing, expired or invalid. Problem details
  • 403The caller may not perform this operation, or has no active organisation. Problem details
  • 404The resource does not exist or is not visible to the caller. Problem details
  • 422The request failed validation; `errors` lists each invalid field. Problem details
  • 429Too many requests, or the AI service is busy. Retry after a short wait. Problem details
  • 500An unexpected error. Quote the `correlationId` to support. Problem details