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

# Get Auto Top-Up

> Returns whether the balance is topped up automatically, at what level and for how much

```
GET /openapi/memorylake/admin/v1/billing/auto-topup
```

Returns whether the balance is topped up automatically, at what level and for how much. Changing it is done in the console.

<Note>
  **Permission required:** `credits:view`
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/billing/auto-topup' \
    -H 'Authorization: Bearer sk_xxxxxx'
  ```
</RequestExample>

### Response

<ResponseField name="data" type="object">
  <Expandable title="Auto Topup object">
    <ResponseField name="amount" type="object">
      Charged per top-up

      <Expandable title="Money object">
        <ResponseField name="amount" type="integer">Amount in the currency's smallest unit (cents for usd)</ResponseField>
        <ResponseField name="currency" type="string">Lowercase ISO 4217 currency code</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="enabled" type="boolean">Whether the balance is topped up automatically</ResponseField>
    <ResponseField name="threshold_tokens" type="integer">Top up when the one-time balance falls to this many tokens</ResponseField>
    <ResponseField name="tokens" type="integer">Tokens each top-up adds</ResponseField>
    <ResponseField name="cooldown_until" type="integer">No automatic top-up before this time, Unix seconds</ResponseField>
    <ResponseField name="last_topup_at" type="integer">Last automatic top-up, Unix seconds</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "message": "Operation completed successfully",
    "data": {
      "amount": {
        "amount": 1999,
        "currency": "usd"
      },
      "enabled": true,
      "threshold_tokens": 1200000,
      "tokens": 1200000,
      "cooldown_until": 1,
      "last_topup_at": 1760000000
    }
  }
  ```
</ResponseExample>

### Errors

Errors answer with `success: false`, a `message` and an `error_code`. See [Error Codes](/features/memorylake/api-reference/errors) for every code.

| Status | Meaning |
| - | - |
| `401` | The API key is missing, invalid, disabled or expired |
| `403` | The key is not allowed to do this |
| `429` | Too many requests. Wait for the time in `Retry-After` |
| `500` | Server-side error |


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