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

# Get the usage of the current billing period



## OpenAPI

````yaml /api-referansi/openapi.json get /v1/billing/current-usage
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/billing/current-usage:
    get:
      tags:
        - Billing
        - BillingUsage
      summary: Get the usage of the current billing period
      operationId: billingUsage.current
      parameters:
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    $ref: '#/components/schemas/CurrentUsageResource'
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    CurrentUsageResource:
      type: object
      properties:
        period:
          type: object
          properties:
            start:
              type: string
            end:
              type: string
            last_day:
              type: string
            day_count:
              type: string
            label:
              type: string
          required:
            - start
            - end
            - last_day
            - day_count
            - label
        billing_plan_code:
          type: string
        billing_plan_name:
          type: string
        currency:
          type: string
        is_billing_enabled:
          type: string
        usage:
          type: array
          items: {}
        estimated_total:
          type: string
          description: >-
            Net estimate before taxes and discounts; sum of the rounded line
            estimates.
        ai_role_costs:
          type: object
          additionalProperties:
            type: string
        ai_role_costs_currency:
          type: string
          description: The currency of the unconverted AI role costs.
          const: USD
        ai_role_costs_in_billing_currency:
          type: object
          description: >-
            AI role costs converted to the response currency, matching the
            billing panel.
          additionalProperties:
            type: string
      required:
        - period
        - billing_plan_code
        - billing_plan_name
        - currency
        - is_billing_enabled
        - usage
        - estimated_total
        - ai_role_costs
        - ai_role_costs_currency
        - ai_role_costs_in_billing_currency
      title: CurrentUsageResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.