> ## Documentation Index
> Fetch the complete documentation index at: https://www.edenai.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get organization usage

> Returns the organization's aggregated consumption over a date window, as a time series per API key at the requested granularity. Narrow it by feature, provider, member or API key, or get one total per member with `group_by=user`. Without `begin`/`end` the last 7 days are returned. Requires the `manage:read` scope.



## OpenAPI

````yaml https://api.edenai.run/v2/info/splitted-schema/management_api/openapi.json get /v3/manage/usage/
openapi: 3.0.3
info:
  title: Organization Management
  version: '2.0'
  description: Your project description
servers:
  - url: https://api.edenai.run
security: []
paths:
  /v3/manage/usage/:
    get:
      tags:
        - Usage
      summary: Get organization usage
      description: >-
        Returns the organization's aggregated consumption over a date window, as
        a time series per API key at the requested granularity. Narrow it by
        feature, provider, member or API key, or get one total per member with
        `group_by=user`. Without `begin`/`end` the last 7 days are returned.
        Requires the `manage:read` scope.
      operationId: manage_usage_retrieve
      parameters:
        - in: query
          name: begin
          schema:
            type: string
            format: date
          description: >-
            First day of the window (inclusive). Provide both `begin` and `end`,
            or neither to get the last 7 days.
        - in: query
          name: end
          schema:
            type: string
            format: date
          description: >-
            Day after the last day of the window (exclusive). The window may not
            exceed 366 days.
        - in: query
          name: feature
          schema:
            type: string
            minLength: 1
          description: Only count this feature.
        - in: query
          name: group_by
          schema:
            enum:
              - user
            type: string
            minLength: 1
          description: |-
            Break the totals down per member.

            * `user` - user
        - in: query
          name: key_id
          schema:
            type: string
            format: uuid
          description: Only count usage of this API key (404 if not in the organization).
        - in: query
          name: phase
          schema:
            type: string
            minLength: 1
          description: Only count this phase.
        - in: query
          name: provider
          schema:
            type: string
            minLength: 1
          description: Only count this provider.
        - in: query
          name: step
          schema:
            type: integer
            maximum: 4
            minimum: 1
          description: >-
            Granularity of the time series: 1 = day, 2 = week, 3 = month, 4 =
            year.
          required: true
        - in: query
          name: subfeature
          schema:
            type: string
            minLength: 1
          description: Only count this subfeature.
        - in: query
          name: token
          schema:
            type: string
            minLength: 1
          description: >-
            Only count usage of the API keys with this name. Use `base_token`
            for usage not attributed to any key. Ignored when `key_id` is given.
        - in: query
          name: user
          schema:
            type: string
            format: email
            minLength: 1
          description: Only count usage of this member (404 if not in the organization).
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManageUsageResponse'
          description: ''
      security:
        - ManagementKeyAuth: []
components:
  schemas:
    ManageUsageResponse:
      description: >-
        Organization usage: a time series per API key, or one total per member
        when

        `group_by=user` is set.
      properties:
        usage:
          anyOf:
            - items:
                $ref: '#/components/schemas/TokenData'
              type: array
            - items:
                $ref: '#/components/schemas/UserCostTotal'
              type: array
          title: Usage
      required:
        - usage
      title: ManageUsageResponse
      type: object
    TokenData:
      properties:
        token:
          title: Token
          type: string
        data:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/Details'
            type: object
          title: Data
          type: object
      required:
        - token
        - data
      title: TokenData
      type: object
    UserCostTotal:
      description: Total cost of one member over the window.
      properties:
        user:
          title: User
          type: string
        total_cost:
          title: Total Cost
          type: number
      required:
        - user
        - total_cost
      title: UserCostTotal
      type: object
    Details:
      properties:
        total_cost:
          title: Total Cost
          type: number
        details:
          title: Details
          type: integer
        cost_per_provider:
          additionalProperties:
            type: number
          title: Cost Per Provider
          type: object
      required:
        - total_cost
        - details
        - cost_per_provider
      title: Details
      type: object
  securitySchemes:
    ManagementKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: >-
        A management key (created from the organization dashboard or with `POST
        /v3/manage/auth-keys`), sent as `Authorization: Bearer
        <management_key>`. Inference API keys (`sk-eden...`) are not accepted on
        these endpoints.

````