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

# Get Project Usage

Get the usage of your project.


## OpenAPI

````yaml get /api/v1/project/billing
openapi: 3.1.0
info:
  title: Memobase API
  summary: APIs for Memobase, a user memory system for LLM Apps
  version: 0.0.40
servers:
  - url: https://api.memobase.dev
  - url: https://api.memobase.cn
security:
  - BearerAuth: []
paths:
  /api/v1/project/billing:
    get:
      tags:
        - project
      summary: Get Project Billing
      operationId: get_project_billing_api_v1_project_billing_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingResponse'
      x-code-samples:
        - lang: python
          source: >+
            # To use the Python SDK, install the package:

            # pip install memobase


            from memobase import MemoBaseClient


            memobase = MemoBaseClient(project_url='PROJECT_URL',
            api_key='PROJECT_TOKEN')


            print(memobase.get_usage())

          label: Python
        - lang: go
          source: >+
            // To use the Go SDK, install the package:

            // go get
            github.com/memodb-io/memobase/src/client/memobase-go@latest


            import (
                "fmt"
                "log"

                "github.com/memodb-io/memobase/src/client/memobase-go/core"
            )


            func main() {
                projectURL := "YOUR_PROJECT_URL"
                apiKey := "YOUR_API_KEY"
                // Initialize the client
                client, err := core.NewMemoBaseClient(
                    projectURL,
                    apiKey,
                )
                if err != nil {
                    log.Fatalf("Failed to create client: %v", err)
                }

                // Get usage
                usage, err := client.GetUsage()
                if err != nil {
                    log.Fatalf("Failed to get usage: %v", err)
                }
                fmt.Printf("Usage: %v
            ", usage)

            }

          label: Go
components:
  schemas:
    BillingResponse:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/BillingData'
            - type: 'null'
          description: Response containing token left
        errno:
          $ref: '#/components/schemas/CODE'
          description: Error code, 0 means success
          default: 0
        errmsg:
          type: string
          title: Errmsg
          description: Error message, empty when success
          default: ''
      type: object
      title: BillingResponse
    BillingData:
      properties:
        token_left:
          anyOf:
            - type: integer
            - type: 'null'
          title: Token Left
          description: Total token left
        next_refill_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Next Refill At
          description: Next refill time
        project_token_cost_month:
          type: integer
          title: Project Token Cost Month
          description: Token cost of this project for this month
      type: object
      required:
        - project_token_cost_month
      title: BillingData
    CODE:
      type: integer
      enum:
        - 0
        - 400
        - 401
        - 403
        - 404
        - 405
        - 409
        - 422
        - 500
        - 501
        - 502
        - 503
        - 504
        - 520
      title: CODE
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````