# Credits Balance

The Credits endpoint lets you check your current TryItOn API credit balance. The response shows your total credits, any credits from an active API subscription, and any custom-bought credits.

{% hint style="info" %}
**Credit Usage**

* **Subscription Credits**: Included with your monthly API plan
* **Purchased Credits**: Additional tryons purchased separately
* **Reserved Credits**: Reserved tryons which are currently being processed
* **On-demand Credits**: (Subscription credits + Purchased credits) - Reserved credits
  {% endhint %}

#### Request <a href="#request" id="request"></a>

Check your current credits balance by making a GET request to the credits endpoint:

> **GET** `https://tryiton.now/api/v1/credits`

Call this endpoint whenever you need to know how many credits you have remaining.

**Request Examples**

{% tabs %}
{% tab title="cURL" %}

```python
curl -X GET https://tryiton.now/api/v1/credits \
     -H "Authorization: Bearer YOUR_API_KEY"
```

{% endtab %}

{% tab title="JavaScript" %}

```python
fetch('https://tryiton.now/api/v1/credits', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
  }
});
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
 
response = requests.get(
  "https://tryiton.now/api/v1/credits",
  headers={"Authorization": "Bearer YOUR_API_KEY"},
)
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}
Example response payload

<details>

<summary><strong>Response</strong></summary>

```python
{
  "credits": {
    "on_demand": 149,
    "subscription": 50,
    "purchased": 100,
    "reserved": 1
  }
}
```

</details>
{% endtab %}
{% endtabs %}

#### Response Fields <a href="#response-fields" id="response-fields"></a>

|                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>credits</code> <em>(object)</em></p><p>Container object for all credit information.</p>                                                                                |
| <p><code>on\_demand</code> <em>(integer)</em></p><p>Currently available credits (subscription + on-demand credits - reserved credits).</p>                                      |
| <p><code>subscription</code> <em>(integer)</em></p><p>Credits included with your current API subscription plan.<br>These credits reset monthly based on your billing cycle.</p> |
| <p><code>purchased</code> <em>(integer)</em></p><p>Additional credits purchased separately from your subscription.<br>These credits do not expire.</p>                          |
| <p><code>reserved</code> <em>(integer)</em></p><p>Reserved tryons which are currently being processed.</p>                                                                      |

#### Rate Limits <a href="#rate-limits" id="rate-limits"></a>

The credits endpoint has its own specific rate limit:

| Endpoint          | Limit                       |
| ----------------- | --------------------------- |
| `/api/v1/credits` | 300 requests per 60 seconds |

For other endpoints, see the default rate limits in [API Fundamentals](https://docs.tryiton.now/api-overview/api-fundamentals).
