# Credit API

{% hint style="info" %}
Credit API is alleen beschikbaar voor Prepaid-gebruikers. Enterprise-klanten kunnen hier op verzoek gebruik van maken.
{% endhint %}

Een GET-verzoek aan de Credit API retourneert een JSON-antwoord met jouw API gebruik per API voor het opgegeven aantal uren. Door een tijdparameter toe te voegen, kunt u het tijdsbereik van het verzoek in uren opgeven.

{% hint style="info" %}
Er zit een latentieperiode van 60 seconden tussen wijzigingen in uw tegoed en de aanwezigheid ervan in de Credit API.
{% endhint %}

## Dien een GET-verzoek in bij de API om uw gebruikte API verbruik te ontvangen. Geef uw tijdsbereik op met de tijdqueryparameter

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

#### Query Parameters

| Name | Type    | Description                  |
| ---- | ------- | ---------------------------- |
| time | integer | Tijdbereik in uren. Bijv. 24 |

#### Headers

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

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

{% tab title="403: Forbidden" %}
{ "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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.altum.ai/ontwikkelaars/credit-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
