> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/ai-in-umbraco/19.latest/management-api/analytics/breakdown-profile.md).

# By Profile

Get usage breakdown by AI profile.

{% hint style="warning" %}
This endpoint is obsolete and will be removed in version 20. Use [Get Usage Breakdown](/ai-in-umbraco/19.latest/management-api/analytics/breakdown.md) with `dimension=Profile` instead.
{% endhint %}

Returns usage distribution across AI profiles.

## Request

```http
GET /umbraco/ai/management/api/v1/analytics/usage-by-profile
```

### Query Parameters

| Parameter     | Type     | Required | Description                                                             |
| ------------- | -------- | -------- | ----------------------------------------------------------------------- |
| `from`        | datetime | Yes      | Start of period (inclusive)                                             |
| `to`          | datetime | Yes      | End of period (exclusive)                                               |
| `granularity` | string   | No       | Aggregation granularity: `Hourly` or `Daily` (auto-selected if omitted) |

## Response

### Success

{% code title="200 OK" %}

```json
[
    {
        "dimension": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "dimensionName": "content-assistant",
        "requestCount": 9200,
        "totalTokens": 2100000,
        "percentage": 0.55
    },
    {
        "dimension": "d290f1ee-6c54-4b01-90e6-d701748f0851",
        "dimensionName": "translator",
        "requestCount": 4800,
        "totalTokens": 890000,
        "percentage": 0.29
    },
    {
        "dimension": "e401f2ff-7d65-5c12-a1f7-e812859a1962",
        "dimensionName": "search-embeddings",
        "requestCount": 2680,
        "totalTokens": 345000,
        "percentage": 0.16
    }
]
```

{% endcode %}

## Examples

{% code title="cURL" %}

```bash
curl -X GET "https://your-site.com/umbraco/ai/management/api/v1/analytics/usage-by-profile?from=2024-01-01T00:00:00Z&to=2024-01-31T23:59:59Z" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

{% endcode %}

{% code title="C#" %}

```csharp
var from = DateTime.UtcNow.AddDays(-30);
var to = DateTime.UtcNow;

var response = await httpClient.GetAsync(
    $"/umbraco/ai/management/api/v1/analytics/usage-by-profile?from={from:O}&to={to:O}");

var breakdown = await response.Content.ReadFromJsonAsync<UsageBreakdownItemModel[]>();

foreach (var item in breakdown)
{
    Console.WriteLine($"{item.DimensionName}: {item.RequestCount} requests");
}
```

{% endcode %}

## Response Properties

| Property        | Type   | Description                       |
| --------------- | ------ | --------------------------------- |
| `dimension`     | string | Profile ID                        |
| `dimensionName` | string | Profile alias                     |
| `requestCount`  | int    | Number of requests                |
| `totalTokens`   | long   | Total tokens used                 |
| `percentage`    | double | Share of total requests (0.0-1.0) |

## Use Cases

* **Feature usage** - Understand which AI features are most popular
* **Profile optimization** - Identify underutilized or overused profiles
* **Budget allocation** - Attribute AI costs to specific use cases


---

# 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.umbraco.com/ai-in-umbraco/19.latest/management-api/analytics/breakdown-profile.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.
