# Check Usage API

This API provides the overall invocation count for your Nected account. It’s helpful for monitoring usage, tracking consumption against plan limits, and integrating usage stats into your internal reporting or billing dashboards.

### Authentication

All requests require your Nected API key.

```
Nected-API-Key: <YOUR_API_KEY>
```

### **Endpoint**

```
GET https://api.nected.ai/dev/usage
```

### **Headers**

| Header         | Value               | Required |
| -------------- | ------------------- | -------- |
| Nected-API-Key | Your API key string | Yes      |

**Query Parameters**\
\&#xNAN;*None*

**Example Request (cURL)**

```bash
curl --location "https://api.nected.ai/dev/usage" \
  --header "Nected-API-Key: <YOUR_API_KEY>"
```

**Sample Response**

```json
{
  "data": {
    "invocations": 1000
  },
  "code": "success",
  "message": "Success."
}
```

**Response Fields**

| Field            | Type   | Description                              |
| ---------------- | ------ | ---------------------------------------- |
| data.invocations | number | Count of total invocations recorded.     |
| code             | string | Request status string (e.g., `success`). |
| message          | string | Human-readable status message.           |

### Error Handling

| HTTP Status | Error Code              | Description             | Recommended Action                   |
| ----------- | ----------------------- | ----------------------- | ------------------------------------ |
| 401         | UNAUTHORIZED            | Missing/invalid API key | Check the `Nected-API-Key` header    |
| 429         | TOO\_MANY\_REQUESTS     | Rate limit exceeded     | Back off and retry later             |
| 500         | INTERNAL\_SERVER\_ERROR | Unexpected system error | Retry; contact support if persistent |

### Notes & Best Practices

* Call this endpoint from secure server-side code only; do not expose your API key in client apps.
* For automation/monitoring, cache the value your system needs and poll at reasonable intervals to avoid rate limits.


---

# 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.nected.ai/nected-docs/management-api/check-usage-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.
