> 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/profiles/create.md).

# Create Profile

Create a new AI profile.

Creates a new profile with the specified settings.

## Request

{% code title="Endpoint" %}

```http
POST /umbraco/ai/management/api/v1/profiles
```

{% endcode %}

### Request Body

{% code title="Request Body" %}

```json
{
    "alias": "content-assistant",
    "name": "Content Assistant",
    "capability": "Chat",
    "model": {
        "providerId": "openai",
        "modelId": "gpt-4o"
    },
    "connectionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "settings": {
        "$type": "chat",
        "temperature": 0.7,
        "maxTokens": 4096,
        "systemPromptTemplate": "You are a helpful content assistant.",
        "contextIds": [],
        "guardrailIds": []
    },
    "tags": ["content", "assistant"]
}
```

{% endcode %}

### Required Fields

| Field              | Type   | Description                         |
| ------------------ | ------ | ----------------------------------- |
| `alias`            | string | Unique alias (used in code)         |
| `name`             | string | Display name                        |
| `capability`       | string | `Chat` or `Embedding`               |
| `model`            | object | Model reference                     |
| `model.providerId` | string | Provider ID (for example, `openai`) |
| `model.modelId`    | string | Model ID (for example, `gpt-4o`)    |
| `connectionId`     | guid   | ID of an existing connection        |

### Optional Fields

| Field      | Type   | Description                  |
| ---------- | ------ | ---------------------------- |
| `settings` | object | Capability-specific settings |
| `tags`     | array  | Categorization tags          |

## Response

### Success

{% code title="201 Created" %}

```
Location: /umbraco/ai/management/api/v1/profiles/3fa85f64-5717-4562-b3fc-2c963f66afa6

"3fa85f64-5717-4562-b3fc-2c963f66afa6"
```

{% endcode %}

### Validation Error

{% code title="400 Bad Request" %}

```json
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "Bad Request",
    "status": 400,
    "detail": "Duplicate alias"
}
```

{% endcode %}

### Connection Not Found

{% code title="404 Not Found" %}

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

{% endcode %}

## Examples

### Create Chat Profile

{% code title="cURL" %}

```bash
curl -X POST "https://your-site.com/umbraco/ai/management/api/v1/profiles" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "content-assistant",
    "name": "Content Assistant",
    "capability": "Chat",
    "model": {
      "providerId": "openai",
      "modelId": "gpt-4o"
    },
    "connectionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "settings": {
      "$type": "chat",
      "temperature": 0.7,
      "maxTokens": 4096,
      "systemPromptTemplate": "You are a helpful content assistant for an Umbraco website.",
      "contextIds": [],
      "guardrailIds": []
    },
    "tags": ["content", "assistant"]
  }'
```

{% endcode %}

### Create Embedding Profile

{% code title="cURL" %}

```bash
curl -X POST "https://your-site.com/umbraco/ai/management/api/v1/profiles" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "document-embeddings",
    "name": "Document Embeddings",
    "capability": "Embedding",
    "model": {
      "providerId": "openai",
      "modelId": "text-embedding-3-small"
    },
    "connectionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "settings": {
      "$type": "embedding"
    }
  }'
```

{% endcode %}

### Minimal Profile

{% code title="cURL" %}

```bash
curl -X POST "https://your-site.com/umbraco/ai/management/api/v1/profiles" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "basic-chat",
    "name": "Basic Chat",
    "capability": "Chat",
    "model": {
      "providerId": "openai",
      "modelId": "gpt-4o-mini"
    },
    "connectionId": "d290f1ee-6c54-4b01-90e6-d701748f0851"
  }'
```

{% endcode %}

## Settings Structure

### Chat Settings

| Property               | Type   | Description                   |
| ---------------------- | ------ | ----------------------------- |
| `$type`                | string | Must be `"chat"`              |
| `temperature`          | float  | Response randomness (0.0-1.0) |
| `maxTokens`            | int    | Maximum output tokens         |
| `systemPromptTemplate` | string | Default system prompt         |
| `contextIds`           | array  | Context IDs to include        |
| `guardrailIds`         | array  | Guardrail IDs to apply        |

### Embedding Settings

| Property | Type   | Description           |
| -------- | ------ | --------------------- |
| `$type`  | string | Must be `"embedding"` |

{% hint style="warning" %}
The `alias` must be unique across all profiles. If a profile with the same alias already exists, the request will fail with a 400 error.
{% endhint %}

{% hint style="info" %}
The `connectionId` must reference an existing connection. The connection determines which API credentials are used when making AI requests with this profile.
{% endhint %}


---

# 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/profiles/create.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.
