# Get the credit balance

Source: https://deeperesearch.com/docs/api/reference/operations/getcredits/

GET

/v1/credits

```js
const url = 'https://deeperesearch.com/v1/credits';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request GET \
  --url https://deeperesearch.com/v1/credits \
  --header 'Authorization: Bearer <token>'
```

Available credit, credit held by running research, and any debt.

## Authorizations

- **[apiKey](https://deeperesearch.com/docs/api/reference/#apikey)**

## Responses

### 200

The balance

application/json

object

**available_usd**

required

US dollars

number

**held_usd**

required

Held for research that is still running

number

**debt_usd**

required

Owed after a run cost more than its hold; research can’t start while above zero

number

#### Example generated

```json
{
  "available_usd": 1,
  "held_usd": 1,
  "debt_usd": 1
}
```

### 401

Missing or invalid API key (unauthorized)

application/json

object

**error**

required

object

**code**

required

Stable, machine-readable error code. See Errors in the docs.

string

**message**

required

What went wrong, written for people

string

#### Example generated

```json
{
  "error": {
    "code": "example",
    "message": "example"
  }
}
```

### 429

Rate limit, spending limit or quota reached (rate_limited, limit_reached, quota_exceeded). See Retry-After.

application/json

object

**error**

required

object

**code**

required

Stable, machine-readable error code. See Errors in the docs.

string

**message**

required

What went wrong, written for people

string

#### Example generated

```json
{
  "error": {
    "code": "example",
    "message": "example"
  }
}
```
