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

# Get credit balance

> The organization's live credit balance, in USD: what the current month opened with, plus credits purchased since, minus what was consumed this month. This is the figure the spend gate enforces — requests are refused once it reaches zero.

Also carries the organization's attributed spend over four windows (today, last 7 days, this calendar month, lifetime) — the sum of every group's `spend` from `GET /v1/groups` — and its pricing: the service charge applied on top-ups and any fixed monthly fee.

Requires your organization API key, from your backend.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/billing/balance
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/billing/balance:
    get:
      tags:
        - Billing
      summary: Get credit balance
      description: >-
        The organization's live credit balance, in USD: what the current month
        opened with, plus credits purchased since, minus what was consumed this
        month. This is the figure the spend gate enforces — requests are refused
        once it reaches zero.


        Also carries the organization's attributed spend over four windows
        (today, last 7 days, this calendar month, lifetime) — the sum of every
        group's `spend` from `GET /v1/groups` — and its pricing: the service
        charge applied on top-ups and any fixed monthly fee.


        Requires your organization API key, from your backend.
      parameters: []
      responses:
        '200':
          description: The balance
          content:
            application/json:
              schema:
                type: object
                properties:
                  balance:
                    type: number
                    description: Credits left, in USD. The spend gate closes at 0.
                  period_start:
                    type: string
                    format: date
                    description: First day of the current statement month (UTC).
                  period_end:
                    type: string
                    format: date
                    description: First day of the next month (exclusive).
                  opening_balance:
                    type: number
                    description: >-
                      Credits carried into the current month from the previous
                      statement.
                  credits_added:
                    type: number
                    description: Completed purchases not yet on a closed statement.
                  consumed:
                    type: number
                    description: Cost of requests started since the month opened.
                  spend:
                    type: object
                    properties:
                      today:
                        type: number
                        description: Since midnight UTC.
                      last_7_days:
                        type: number
                        description: Since midnight UTC seven days ago.
                      month:
                        type: number
                        description: Since the 1st of the current UTC month.
                      lifetime:
                        type: number
                        description: Everything ever attributed.
                    nullable: true
                    description: >-
                      Attributed spend in USD over four UTC windows. Null only
                      when the figures could not be read.
                  pricing:
                    type: object
                    properties:
                      service_charge_rate:
                        type: number
                        nullable: true
                        description: >-
                          Fraction added on top of a credit purchase (0.45 =
                          45%). Null when no pricing is configured.
                      monthly_fixed:
                        type: number
                        nullable: true
                        description: Fixed monthly fee in USD, if any.
              example:
                balance: 318.46
                period_start: '2026-10-01'
                period_end: '2026-11-01'
                opening_balance: 259.73
                credits_added: 100
                consumed: 41.27
                spend:
                  today: 2.14
                  last_7_days: 12.9
                  month: 41.27
                  lifetime: 1240.54
                pricing:
                  service_charge_rate: 0.45
                  monthly_fixed: 0
        '403':
          description: Not an API key
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````

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