# Credit API

{% hint style="info" %}
Credit API is only available to Prepaid users. Enterprise customers can utilize this upon request.
{% endhint %}

A GET Request to the Credit API will return a JSON response showing your used credits, categorized into API names since 24 hours ago. By adding a `time` parameter, you can specify the time range of the request in hours.

{% hint style="info" %}
There is a 60s latency window between changes in your credit and its presence in the Credit API.
{% endhint %}

***

## Make GET Request to the API to receive your used credit for 24 hours. Specify your time range with the time query parameter

<mark style="color:blue;">`GET`</mark> `https://api.altum.ai/credit`

#### Query Parameters

| Name | Type    | Description                 |
| ---- | ------- | --------------------------- |
| time | integer | Time range in hours. Eg. 90 |

#### Headers

| Name                                        | Type   | Description      |
| ------------------------------------------- | ------ | ---------------- |
| x-api-key<mark style="color:red;">\*</mark> | string | Valid API key    |
| Content-Type                                | string | application/json |

{% tabs %}
{% tab title="200: OK Successful" %}
{\
"interactivereference-api": "6", \
"rebuildapi": "1", \
"objectdataapi": "1" \
}
{% endtab %}

{% tab title="403: Forbidden Feature not enabled on your account" %}
{ "message": "Forbidden" }
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.altum.ai/credit
?time=40
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
	"interactivereference-api": 1307,
	"avmapi": 671,
	"wozapi": 209,
	"sustainabilityapi": 85,
	"energylabelapi": 390
}
```

{% endtab %}
{% endtabs %}
