# Balance (/docs/configuration/librechat_yaml/object_structure/balance)

## Overview

The `balance` object allows administrators to configure how token credit balances are managed for users within LibreChat. Settings include enabling balance tracking, initializing user balances, and configuring automatic token refill behavior.

**Fields under `balance`:**

- `enabled`
- `startBalance`
- `autoRefillEnabled`
- `refillIntervalValue`
- `refillIntervalUnit`
- `refillAmount`

**Notes:**

- `balance` configurations apply globally across the application.
- Defaults are provided but can be customized based on requirements.
- Conditional logic can dynamically modify these settings based on other configurations.


## Example

```yaml filename="balance"
balance:
  enabled: false
  startBalance: 20000
  autoRefillEnabled: false
  refillIntervalValue: 30
  refillIntervalUnit: "days"
  refillAmount: 10000
```


## enabled

**Key:**

<OptionTable
    options={[
        ['enabled', 'Boolean', 'Enables token credit tracking and balance management for users.', 'Set to true to activate balance tracking for token usage.'],
    ]}
/>

**Default:** `false`

**Example:**

```yaml filename="balance / enabled"
balance:
  enabled: true
```


## startBalance

**Key:**

<OptionTable
    options={[
        ['startBalance', 'Integer', 'Specifies the initial number of tokens credited to a user upon registration.', 'Tokens credited to a new user account.'],
    ]}
/>

**Default:** `20000`

**Example:**

```yaml filename="balance / startBalance"
balance:
  startBalance: 20000
```


## autoRefillEnabled

**Key:**

<OptionTable
    options={[
        ['autoRefillEnabled', 'Boolean', 'Determines whether automatic refilling of token credits is enabled.', 'Set to true to enable automatic token refills.'],
    ]}
/>

**Default:** `false`

**Example:**

```yaml filename="balance / autoRefillEnabled"
balance:
  autoRefillEnabled: true
```


## refillIntervalValue

**Key:**

<OptionTable
    options={[
        ['refillIntervalValue', 'Integer', 'Specifies the numerical value for the interval at which token credits are automatically refilled.', 'For example, 30 represents a 30-day interval.'],
    ]}
/>

**Default:** `30`

**Example:**

```yaml filename="balance / refillIntervalValue"
balance:
  refillIntervalValue: 30
```


## refillIntervalUnit

**Key:**

<OptionTable
    options={[
        ['refillIntervalUnit', 'String', 'Specifies the time unit for the refill interval (e.g., "days", "hours").', 'Indicates the unit of time for refillIntervalValue.'],
    ]}
/>

**Default:** `"days"`

**Example:**

```yaml filename="balance / refillIntervalUnit"
balance:
  refillIntervalUnit: "days"
```


## refillAmount

**Key:**

<OptionTable
    options={[
        ['refillAmount', 'Integer', 'Specifies the number of tokens to be added to the user\'s balance during each automatic refill.', 'The amount added to a user’s token credits at each refill interval.'],
    ]}
/>

**Default:** `10000`

**Example:**

```yaml filename="balance / refillAmount"
balance:
  refillAmount: 10000
```