> For the complete documentation index, see [llms.txt](https://zaiadocs.gitbook.io/recursos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zaiadocs.gitbook.io/recursos/api/consumo.md).

# Consumo

### \[GET] Retrieve Usage

Retorna a quantidade de agentes utilizada e a quantidade de créditos disponíveis na conta

```bash
curl --location 'https://api.zaia.app/v1.1/api/retrieve-usage' \
--header 'Authorization: Bearer <your api key goes here>'
```

### Headers (Cabeçalhos)

<table><thead><tr><th width="167.765625">Chave</th><th width="139.88671875">Tipo</th><th width="216.09765625">Exemplo</th><th width="125.3359375">Obrigatório</th></tr></thead><tbody><tr><td><mark style="color:red;">Authorization</mark></td><td>String</td><td>Bearer &#x3C;sua chave aqui></td><td><mark style="color:red;"><strong>✓</strong></mark></td></tr></tbody></table>

### **Usage**

<table><thead><tr><th width="244.59375">Chave</th><th width="139.88671875">Tipo</th><th width="216.09765625">Exemplo</th></tr></thead><tbody><tr><td>agents</td><td>Limits</td><td>40</td></tr><tr><td>externalGenerativeMessages</td><td>Limits</td><td></td></tr><tr><td>generativeMessages</td><td>Limits</td><td></td></tr></tbody></table>

### **Limits**

<table><thead><tr><th width="244.59375">Chave</th><th width="139.88671875">Tipo</th><th width="216.09765625">Exemplo</th></tr></thead><tbody><tr><td>balance</td><td>Number</td><td>32</td></tr><tr><td>count</td><td>Number</td><td>8</td></tr><tr><td>limit</td><td>Number</td><td>40</td></tr></tbody></table>

### **Responses**

{% tabs %}
{% tab title="🟢 200 -> OK" %}

```json
{
    "usage": {
        "agents": {
            "balance": 32,
            "count": 8,
            "limit": 40
        },
        "externalGenerativeMessages": {
            "balance": 19902,
            "count": 8,
            "limit": 20000
        },
        "generativeMessages": {
            "balance": 9902,
            "count": 98,
            "limit": 10000
        }
    }
}

```

{% endtab %}

{% tab title="🔴 403 → Unauthorized" %}

```json
"Forbidden."
```

{% endtab %}

{% tab title="🔴 404 → Not Found" %}

```json
"Agent not found."
```

{% endtab %}
{% endtabs %}
