> For the complete documentation index, see [llms.txt](https://docs.altum.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.altum.ai/english/developers/usage-api.md).

# Usage API

Usage API is a utility API that helps to keep track of your used Altum credits.

The **Usage API** gives you insight into your API usage: the number of calls made per API within a selected period. This is useful for monitoring usage, validating integrations, and setting up call-based checks.

{% hint style="info" %}
**Note: number of calls, not credits** The Usage API reports the *number of calls* per API, not the number of credits used or your remaining credit balance. Under the credit model, each API has its own credit cost per call. To convert calls into credits, multiply the number of calls by the credit value of that API. See [Credits per API](/english/platform/credits-per-api.md).
{% endhint %}

#### Name change: from Credit API to Usage API

This API was previously called the Credit API. A credit is a billing unit (1 credit = €0.05), while this API returns the number of calls. To make this distinction clearer, it is named the Usage API.

{% hint style="info" %}
The endpoint itself does not change. The `/credit` path remains unchanged and fully supported, so existing integrations, including Enterprise checks, will continue to work without any changes. No action is required.
{% endhint %}

#### A GET Request

A GET request to the Usage API returns a JSON response with the number of calls per API name. By adding a `time` parameter, you can specify the time range of the request in hours. The default range is 24 hours.

{% hint style="info" %}
There is a 60 second latency window between a call and its presence in the Usage API.
{% endhint %}

## Make a GET request to receive call counts. Specify the 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" %}

```json
{
  "interactivereference-api": "6",
  "rebuildapi": "1",
  "objectdataapi": "1"
}
```

{% endtab %}

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

```json
{ "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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.altum.ai/english/developers/usage-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
