---
title: "Get wallet credits"
description: "Returns the current wallet balance of the workspace."
---

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

Path: Zacx Public API › Wallet

`GET /workspace/wallet_balance`

Returns the current wallet balance of the workspace.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Code samples

### cURL

```curl
curl --request GET \
  --url https://api.zacx.io/v1/workspace/wallet_balance \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.zacx.io/v1/workspace/wallet_balance';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.zacx.io/v1/workspace/wallet_balance"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The balance.

#### Example

```json
{
  "status": "success",
  "data": {
    "balance": 1234.23,
    "currency": "INR"
  }
}
```

- `getWalletBalance.response.200.status` (string, required)
- `getWalletBalance.response.200.data` (object, required)
  - `getWalletBalance.response.200.data.balance` (number, required) — Available credits.
  - `getWalletBalance.response.200.data.currency` (string, required) — ISO 4217 currency code.

### 401

The API key is missing or invalid.

#### Example

```json
{
  "status": "error",
  "code": "VALIDATION_FAILED",
  "message": "string"
}
```

- `getWalletBalance.response.401.status` (string, required)
- `getWalletBalance.response.401.code` (string, required) — Stable machine-readable error code.
- `getWalletBalance.response.401.message` (string, required) — Human-readable explanation.


Source: https://zacx.io/api/workspace/wallet-balance/index.md
