# Get Credit Balance

`GET /v1/credits`

Get your current credit balance.

Returns the total available credits that can be used for finetune jobs.
Credits are consumed when running finetune jobs based on instance hourly rates.

Next to the total, the split the dashboard's billing page shows: starter
credits, prepaid bundles and each voucher, left and granted. The split
is the account members' to read; it is null when it cannot be read.

- Base URL: `https://junction-api.qualiastudios.dev`
- Authentication: an API key in the `X-API-Key` header, or `Authorization: Bearer …`

## Responses

- `200` Credit balance retrieved successfully: `application/json` `CreditBalanceResponse`
- `401` Invalid or missing API key: `application/json` `ErrorResponse`

## Schemas

```yaml
CreditBalanceResponse:
  properties:
    balance:
      type: integer
      description: Total available credits
    grant_balance:
      description: Starter credits left; null when the split is unreadable
      type:
        - integer
        - "null"
    grant_original_balance:
      description: Starter credits granted
      type:
        - integer
        - "null"
    bundle_balance:
      description: Prepaid credits left
      type:
        - integer
        - "null"
    bundle_original_balance:
      description: Prepaid credits bought
      type:
        - integer
        - "null"
    bundle_last_top_up:
      description: When prepaid credits were last bought, ISO 8601
      type:
        - string
        - "null"
    vouchers:
      description: Redeemed vouchers with credits left, soonest to expire first
      nullable: true
      items:
        $ref: "#/components/schemas/CreditVoucher"
      type: array
  type: object
  required:
    - balance
  title: CreditBalanceResponse
  description: Response containing user's credit balance.
CreditVoucher:
  properties:
    label:
      description: The voucher's label, if it has one
      type:
        - string
        - "null"
    balance:
      type: integer
      description: Credits left on it
    original_balance:
      type: integer
      description: Credits it granted
    expires_at:
      description: When it expires, ISO 8601
      type:
        - string
        - "null"
  type: object
  required:
    - balance
    - original_balance
  title: CreditVoucher
  description: One redeemed voucher that still has credits.
ErrorResponse:
  properties:
    detail:
      type: string
      description: Error message describing what went wrong
  type: object
  required:
    - detail
  title: ErrorResponse
  description: Standard error response.
```
