> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get usage

> Returns the current billing period's usage broken down by category.

Returns credits used / remaining, agent runs, deployments, and active project count.

<Tip>
  Hook this into your team dashboard to alert when usage approaches the cap. See [Usage limits](/features/billing/usage-limits) for thresholds.
</Tip>


## OpenAPI

````yaml GET /v1/billing/usage
openapi: 3.1.0
info:
  title: vly.ai API
  version: 0.1.0
  description: >-
    REST API for the vly.ai AI app builder. v0, illustrative — endpoints, paths,
    and shapes may change before general availability. See the API Reference
    introduction for status.
  contact:
    name: vly.ai support
    email: support@vly.ai
    url: https://docs.vly.ai/api-reference/introduction
  license:
    name: vly.ai Terms
    url: https://vly.ai/terms
servers:
  - url: https://api.vly.ai
    description: Production
  - url: https://api.staging.vly.ai
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Create, list, update, and delete vly projects.
  - name: Deployments
    description: Trigger and inspect deployments.
  - name: Agents
    description: Trigger an AI agent run on a project.
  - name: Files
    description: Upload assets to a project.
  - name: Billing
    description: Inspect plan usage and credits.
  - name: Webhooks
    description: Send and verify webhook events.
paths:
  /v1/billing/usage:
    get:
      tags:
        - Billing
      summary: Get usage
      description: Returns the current billing period's usage broken down by category.
      operationId: getUsage
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingUsage'
components:
  schemas:
    BillingUsage:
      type: object
      properties:
        period_start:
          type: string
          format: date-time
        period_end:
          type: string
          format: date-time
        credits_used:
          type: integer
          example: 124
        credits_remaining:
          type: integer
          example: 376
        agent_runs:
          type: integer
          example: 42
        deployments:
          type: integer
          example: 18
        projects:
          type: integer
          example: 6
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: vly_live_...
      description: Workspace-scoped API key. Generate from Workspace settings → API keys.

````

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