---
title: "Get user credit balance"
description: "Returns the authenticated user's ID and current credit balance."
---

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

Path: ThreadAPI API › User

`GET /api/v1/user/balance`

Returns the authenticated user's ID and current credit balance.

## Authentication

Requires one of the following:

- `bearerAuth`, http, header `Authorization`
- `apiKeyAuth`, apiKey, in header, header `x-api-key`

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.threadapi.dev/api/v1/user/balance \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.threadapi.dev/api/v1/user/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.threadapi.dev/api/v1/user/balance"

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

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

print(response.text)
```

## Responses

### 200

Current user balance

#### Example

```json
{
  "user_id": "usr_12345",
  "credit_balance": 100
}
```

- `user_id` (`getUserBalance.response.200.user_id`; string, required)
  - example `"usr_12345"`
- `credit_balance` (`getUserBalance.response.200.credit_balance`; integer, required)
  - example `100`

### 401

Missing or invalid API key or OAuth access token

#### Example

```json
{
  "error": {
    "code": "not_found",
    "message": "string",
    "retryable": true,
    "retry_after": 0,
    "request_id": "string"
  }
}
```

- `error` (`getUserBalance.response.401.error`; object, required) — Some codes add fields, such as `limit` and `used` on `monitor_limit_reached` and `upgrade_url` on `rate_limited` and `daily_quota_exceeded`.
  - `code` (`getUserBalance.response.401.error.code`; string, required)
    - example `"not_found"`
  - `message` (`getUserBalance.response.401.error.message`; string, required)
  - `retryable` (`getUserBalance.response.401.error.retryable`; boolean, required)
  - `retry_after` (`getUserBalance.response.401.error.retry_after`; integer, optional) — Seconds to wait before retrying.
  - `request_id` (`getUserBalance.response.401.error.request_id`; string, optional) — The request's X-Request-Id; include it when reporting an issue.

### 404

Requested user or resource not found

#### Example

```json
{
  "error": {
    "code": "not_found",
    "message": "string",
    "retryable": true,
    "retry_after": 0,
    "request_id": "string"
  }
}
```

- `error` (`getUserBalance.response.404.error`; object, required) — Some codes add fields, such as `limit` and `used` on `monitor_limit_reached` and `upgrade_url` on `rate_limited` and `daily_quota_exceeded`.
  - `code` (`getUserBalance.response.404.error.code`; string, required)
    - example `"not_found"`
  - `message` (`getUserBalance.response.404.error.message`; string, required)
  - `retryable` (`getUserBalance.response.404.error.retryable`; boolean, required)
  - `retry_after` (`getUserBalance.response.404.error.retry_after`; integer, optional) — Seconds to wait before retrying.
  - `request_id` (`getUserBalance.response.404.error.request_id`; string, optional) — The request's X-Request-Id; include it when reporting an issue.

### 429

Rate limit or daily request quota exceeded

#### Example

```json
{
  "error": {
    "code": "not_found",
    "message": "string",
    "retryable": true,
    "retry_after": 0,
    "request_id": "string"
  }
}
```

- `error` (`getUserBalance.response.429.error`; object, required) — Some codes add fields, such as `limit` and `used` on `monitor_limit_reached` and `upgrade_url` on `rate_limited` and `daily_quota_exceeded`.
  - `code` (`getUserBalance.response.429.error.code`; string, required)
    - example `"not_found"`
  - `message` (`getUserBalance.response.429.error.message`; string, required)
  - `retryable` (`getUserBalance.response.429.error.retryable`; boolean, required)
  - `retry_after` (`getUserBalance.response.429.error.retry_after`; integer, optional) — Seconds to wait before retrying.
  - `request_id` (`getUserBalance.response.429.error.request_id`; string, optional) — The request's X-Request-Id; include it when reporting an issue.

### 500

Internal server error

#### Example

```json
{
  "error": {
    "code": "not_found",
    "message": "string",
    "retryable": true,
    "retry_after": 0,
    "request_id": "string"
  }
}
```

- `error` (`getUserBalance.response.500.error`; object, required) — Some codes add fields, such as `limit` and `used` on `monitor_limit_reached` and `upgrade_url` on `rate_limited` and `daily_quota_exceeded`.
  - `code` (`getUserBalance.response.500.error.code`; string, required)
    - example `"not_found"`
  - `message` (`getUserBalance.response.500.error.message`; string, required)
  - `retryable` (`getUserBalance.response.500.error.retryable`; boolean, required)
  - `retry_after` (`getUserBalance.response.500.error.retry_after`; integer, optional) — Seconds to wait before retrying.
  - `request_id` (`getUserBalance.response.500.error.request_id`; string, optional) — The request's X-Request-Id; include it when reporting an issue.


Source: https://threadapi.dev/api/User/getUserBalance/index.md
