# Get Key Usage

Return usage and remaining quota information for the current API key.

- Source: https://www.unifyllm.com/docs/api-reference/key-usage/
- Language: en

## Endpoint

```http
GET https://api.unifyllm.top/api/usage/token
```

Use the authentication and headers shown in the request examples. 

## Parameters

| Field | Location | Type | Required | Description | Allowed values | Example |
| --- | --- | --- | --- | --- | --- | --- |

## Default

```json
{}
```

### cURL

```bash
curl --request GET \
  --url 'https://api.unifyllm.top/api/usage/token' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
```

### JavaScript

```javascript
const response = await fetch("https://api.unifyllm.top/api/usage/token", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>"
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

response = requests.get(
    "https://api.unifyllm.top/api/usage/token",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"}
)
response.raise_for_status()
print(response.json())
```

## Response examples

### Example 1 — HTTP 200

```json
{
  "code": true,
  "data": {
    "expires_at": 0,
    "model_limits": {},
    "model_limits_enabled": false,
    "name": "Personal",
    "object": "token_usage",
    "total_available": 35261102,
    "total_granted": 50000000,
    "total_used": 14738898,
    "unlimited_quota": false
  },
  "message": "ok"
}
```
