> 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/management-api/management-api.md).

# Overview

REST API for managing AI connections, profiles, and performing AI operations.

The Umbraco.AI Management API provides REST endpoints for managing connections and profiles, as well as performing chat completions and embedding generation.

## Base URL

All endpoints are prefixed with:

{% code title="Base URL" %}

```
/umbraco/ai/management/api/v1
```

{% endcode %}

## API Versioning

The API uses URL-based versioning. The current version is `v1`.

## Available Endpoints

### Chat Operations

| Method | Endpoint                                                         | Description                              |
| ------ | ---------------------------------------------------------------- | ---------------------------------------- |
| POST   | `/umbraco/ai/management/api/v1/chat/complete`                    | Get a chat completion (default profile)  |
| POST   | `/umbraco/ai/management/api/v1/chat/{profileIdOrAlias}/complete` | Get a chat completion (specific profile) |

### Connection Management

| Method | Endpoint                                                                       | Description                               |
| ------ | ------------------------------------------------------------------------------ | ----------------------------------------- |
| GET    | `/umbraco/ai/management/api/v1/connections`                                    | List all connections                      |
| GET    | `/umbraco/ai/management/api/v1/connections/{connectionIdOrAlias}`              | Get a specific connection                 |
| POST   | `/umbraco/ai/management/api/v1/connections`                                    | Create a connection                       |
| PUT    | `/umbraco/ai/management/api/v1/connections/{connectionIdOrAlias}`              | Update a connection                       |
| DELETE | `/umbraco/ai/management/api/v1/connections/{connectionIdOrAlias}`              | Delete a connection                       |
| POST   | `/umbraco/ai/management/api/v1/connections/{connectionIdOrAlias}/test`         | Test a connection                         |
| GET    | `/umbraco/ai/management/api/v1/connections/capabilities`                       | List available capabilities               |
| GET    | `/umbraco/ai/management/api/v1/connections?capability={capability}`            | List connections by capability            |
| GET    | `/umbraco/ai/management/api/v1/connections/{connectionIdOrAlias}/capabilities` | Get a connection's capabilities           |
| GET    | `/umbraco/ai/management/api/v1/capabilities/enabled`                           | List capabilities enabled on this install |
| GET    | `/umbraco/ai/management/api/v1/connections/{connectionIdOrAlias}/models`       | Get available models                      |

### Profile Management

| Method | Endpoint                                                    | Description            |
| ------ | ----------------------------------------------------------- | ---------------------- |
| GET    | `/umbraco/ai/management/api/v1/profiles`                    | List all profiles      |
| GET    | `/umbraco/ai/management/api/v1/profiles/{profileIdOrAlias}` | Get a specific profile |
| POST   | `/umbraco/ai/management/api/v1/profiles`                    | Create a profile       |
| PUT    | `/umbraco/ai/management/api/v1/profiles/{profileIdOrAlias}` | Update a profile       |
| DELETE | `/umbraco/ai/management/api/v1/profiles/{profileIdOrAlias}` | Delete a profile       |

### Context Management

| Method | Endpoint                                                    | Description            |
| ------ | ----------------------------------------------------------- | ---------------------- |
| GET    | `/umbraco/ai/management/api/v1/contexts`                    | List all contexts      |
| GET    | `/umbraco/ai/management/api/v1/contexts/{contextIdOrAlias}` | Get a specific context |
| POST   | `/umbraco/ai/management/api/v1/contexts`                    | Create a context       |
| PUT    | `/umbraco/ai/management/api/v1/contexts/{contextIdOrAlias}` | Update a context       |
| DELETE | `/umbraco/ai/management/api/v1/contexts/{contextIdOrAlias}` | Delete a context       |

### Guardrails

| Method | Endpoint                                                        | Description               |
| ------ | --------------------------------------------------------------- | ------------------------- |
| GET    | `/umbraco/ai/management/api/v1/guardrails`                      | List all guardrails       |
| GET    | `/umbraco/ai/management/api/v1/guardrails/{guardrailIdOrAlias}` | Get a specific guardrail  |
| POST   | `/umbraco/ai/management/api/v1/guardrails`                      | Create a guardrail        |
| PUT    | `/umbraco/ai/management/api/v1/guardrails/{guardrailIdOrAlias}` | Update a guardrail        |
| DELETE | `/umbraco/ai/management/api/v1/guardrails/{guardrailIdOrAlias}` | Delete a guardrail        |
| GET    | `/umbraco/ai/management/api/v1/guardrail-evaluators`            | List available evaluators |

### Settings

| Method | Endpoint                                 | Description          |
| ------ | ---------------------------------------- | -------------------- |
| GET    | `/umbraco/ai/management/api/v1/settings` | Get current settings |
| PUT    | `/umbraco/ai/management/api/v1/settings` | Update settings      |

### Version History

| Method | Endpoint                                                                             | Description                               |
| ------ | ------------------------------------------------------------------------------------ | ----------------------------------------- |
| GET    | `/umbraco/ai/management/api/v1/versions/supported-types`                             | List entity types that support versioning |
| GET    | `/umbraco/ai/management/api/v1/versions/{entityType}/{entityId}`                     | Get version history                       |
| GET    | `/umbraco/ai/management/api/v1/versions/{entityType}/{entityId}/{version}`           | Get specific version                      |
| GET    | `/umbraco/ai/management/api/v1/versions/{entityType}/{entityId}/{from}/compare/{to}` | Compare versions                          |
| POST   | `/umbraco/ai/management/api/v1/versions/{entityType}/{entityId}/{version}/rollback`  | Rollback to version                       |

### Audit Logs

| Method | Endpoint                                                       | Description            |
| ------ | -------------------------------------------------------------- | ---------------------- |
| GET    | `/umbraco/ai/management/api/v1/audit-logs`                     | List audit logs        |
| GET    | `/umbraco/ai/management/api/v1/audit-logs/{id}`                | Get specific audit log |
| GET    | `/umbraco/ai/management/api/v1/audit-logs?entityId={entityId}` | Get entity history     |
| DELETE | `/umbraco/ai/management/api/v1/audit-logs/{id}`                | Delete audit log       |
| POST   | `/umbraco/ai/management/api/v1/audit-logs/cleanup`             | Cleanup old logs       |

### Usage Analytics

| Method | Endpoint                                                    | Description           |
| ------ | ----------------------------------------------------------- | --------------------- |
| GET    | `/umbraco/ai/management/api/v1/analytics/usage-summary`     | Get usage summary     |
| GET    | `/umbraco/ai/management/api/v1/analytics/usage-time-series` | Get time series data  |
| GET    | `/umbraco/ai/management/api/v1/analytics/usage-by-provider` | Breakdown by provider |
| GET    | `/umbraco/ai/management/api/v1/analytics/usage-by-model`    | Breakdown by model    |
| GET    | `/umbraco/ai/management/api/v1/analytics/usage-by-profile`  | Breakdown by profile  |
| GET    | `/umbraco/ai/management/api/v1/analytics/usage-by-user`     | Breakdown by user     |

### Tools

| Method | Endpoint                                     | Description                                       |
| ------ | -------------------------------------------- | ------------------------------------------------- |
| GET    | `/umbraco/ai/management/api/v1/tools`        | List all user-configurable tools grouped by scope |
| GET    | `/umbraco/ai/management/api/v1/tools/scopes` | List all tool scopes                              |

### Context Resource Types

| Method | Endpoint                                                    | Description                                  |
| ------ | ----------------------------------------------------------- | -------------------------------------------- |
| GET    | `/umbraco/ai/management/api/v1/context-resource-types`      | List all resource types                      |
| GET    | `/umbraco/ai/management/api/v1/context-resource-types/{id}` | Get a resource type with its settings schema |

### Provider Information

| Method | Endpoint                                       | Description             |
| ------ | ---------------------------------------------- | ----------------------- |
| GET    | `/umbraco/ai/management/api/v1/providers`      | List all providers      |
| GET    | `/umbraco/ai/management/api/v1/providers/{id}` | Get a specific provider |

### Embedding Operations

| Method | Endpoint                                            | Description         |
| ------ | --------------------------------------------------- | ------------------- |
| POST   | `/umbraco/ai/management/api/v1/embeddings/generate` | Generate embeddings |

### Decision Operations (Experimental)

Returns 404 unless the `Umbraco:AI:Experimental:Decision` feature flag is enabled.

| Method | Endpoint                                     | Description                                                              |
| ------ | -------------------------------------------- | ------------------------------------------------------------------------ |
| POST   | `/umbraco/ai/management/api/v1/decision/ask` | [Ask a decision](/ai-in-umbraco/management-api/decision/ask-decision.md) |

## IdOrAlias Pattern

Many endpoints accept an `IdOrAlias` parameter, which can be either:

* A GUID (for example, `3fa85f64-5717-4562-b3fc-2c963f66afa6`)
* A string alias (for example, `my-chat-profile`)

Using either format provides flexibility in how you reference resources.

## Response Format

All responses use standard HTTP status codes and return JSON:

### Success Response

{% code title="Response" %}

```json
{
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "alias": "my-profile",
    "name": "My Profile"
}
```

{% endcode %}

### Error Response

{% code title="Response" %}

```json
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
    "title": "Not Found",
    "status": 404,
    "detail": "Connection not found"
}
```

{% endcode %}

## Pagination

List endpoints support pagination:

| Parameter | Type   | Default | Description               |
| --------- | ------ | ------- | ------------------------- |
| `skip`    | int    | 0       | Number of items to skip   |
| `take`    | int    | 100     | Number of items to return |
| `filter`  | string | null    | Filter by name (contains) |

Response includes total count:

{% code title="Response" %}

```json
{
  "items": [...],
  "total": 42
}
```

{% endcode %}

## In This Section

{% content-ref url="/pages/Quz4XauKz05n0ODKPfBs" %}
[Authentication](/ai-in-umbraco/management-api/management-api/authentication.md)
{% endcontent-ref %}

{% content-ref url="/pages/OAtxlEvjWWLkcSGrsdZZ" %}
[Chat](/ai-in-umbraco/management-api/chat.md)
{% endcontent-ref %}

{% content-ref url="/pages/lI5zNEtEBHypUFTRBq5N" %}
[Connections](/ai-in-umbraco/management-api/connections.md)
{% endcontent-ref %}

{% content-ref url="/pages/5dRGHt0KdQW8tkw9nMcP" %}
[Profiles](/ai-in-umbraco/management-api/profiles.md)
{% endcontent-ref %}

{% content-ref url="/pages/tFs5KTpdtVGdQoURItBV" %}
[Providers](/ai-in-umbraco/management-api/providers.md)
{% endcontent-ref %}

{% content-ref url="/pages/7dHNFt6qUCBlNeLEcFZ6" %}
[Tools](/ai-in-umbraco/management-api/tools.md)
{% endcontent-ref %}

{% content-ref url="/pages/WmfFWwg4bQe29CWjsEUn" %}
[Context Resource Types](/ai-in-umbraco/management-api/context-resource-types.md)
{% endcontent-ref %}

{% content-ref url="/pages/4hGJvN110wAvm6WiBJ0D" %}
[Embeddings](/ai-in-umbraco/management-api/embeddings.md)
{% endcontent-ref %}

{% content-ref url="/pages/Jo1k8H7oZFHVJBEFhJRV" %}
[Decision](/ai-in-umbraco/management-api/decision.md)
{% endcontent-ref %}


---

# 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/management-api/management-api.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.
