> 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/getting-started/first-profile.md).

# The First Profile

Create a profile to configure how AI requests are made and use it in your code.

A profile combines a connection with model settings for a specific use case. Profiles let you configure temperature, model selection, and system prompts once and reuse them throughout your application.

## Prerequisites

* At least one connection created

## Create a Profile

1. In the Umbraco backoffice, navigate to the **AI** section
2. Click **Profiles** in the tree
3. Click **Create Profile**

![The Create Profile capability selection showing Chat and Embedding](https://583970477-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCHKT9bQhbR3swAdBvil4%2Fuploads%2Fgit-blob-cdca51504be7d59c2c89f6e388f1155321c32a6f%2Fbackoffice-create-profile-modal.png?alt=media)

## Configure the Profile

Fill in the profile details:

| Field          | Description                     | Example             |
| -------------- | ------------------------------- | ------------------- |
| **Name**       | A display name for this profile | "Content Assistant" |
| **Alias**      | A unique identifier for lookups | "content-assistant" |
| **Capability** | The type of AI capability       | "Chat"              |
| **Connection** | Which connection to use         | "OpenAI Production" |
| **Model**      | The specific model to use       | "gpt-4o"            |

### Chat Settings

For chat profiles, you can configure:

| Setting           | Description                                       | Default          |
| ----------------- | ------------------------------------------------- | ---------------- |
| **Temperature**   | Controls randomness (0-2). Lower is more focused. | Provider default |
| **Max Tokens**    | Maximum tokens in the response                    | Provider default |
| **System Prompt** | Instructions sent with every request              | None             |

{% hint style="info" %}
Leave settings empty to use the model's default values. Only set values you want to override.
{% endhint %}

![The Create Profile form with connection and model settings](https://583970477-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCHKT9bQhbR3swAdBvil4%2Fuploads%2Fgit-blob-d76e493e470969f0b54f0405f7eab576568aa09b%2Fbackoffice-create-profile-form.png?alt=media)

## Set as Default

To use this profile when no profile is specified in code:

1. Navigate to the **AI** section > **Settings**
2. Select "Content Assistant" in the **Default Chat Profile** picker
3. Click **Save**

{% hint style="info" %}
See [Managing Settings](/ai-in-umbraco/backoffice/managing-settings.md) for more details on configuring defaults.
{% endhint %}

## Use the Profile in Code

### Using the Default Profile

{% code title="ContentController.cs" %}

```csharp
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.AI;
using Umbraco.AI.Core.Chat;

[ApiController]
[Route("/api/content")]
public class ContentController : Controller
{
    private readonly IAIChatService _chatService;

    public ContentController(IAIChatService chatService)
    {
        _chatService = chatService;
    }

    [HttpPost]
    public async Task<IActionResult> GenerateSummary([FromBody] string content)
    {
        var messages = new List<ChatMessage>
        {
            new(ChatRole.User, $"Summarize this content:\n\n{content}")
        };

        // Uses the default profile configured in Settings
        var response = await _chatService.GetChatResponseAsync(
            chat => chat.WithAlias("content-summary"),
            messages);

        return Ok(response.Text);
    }
}
```

{% endcode %}

### Using a Specific Profile

To use a specific profile, pass its alias (or ID) to `WithProfile`:

{% code title="ContentController.cs" %}

```csharp
public async Task<IActionResult> GenerateSummary([FromBody] string content)
{
    var messages = new List<ChatMessage>
    {
        new(ChatRole.User, $"Summarize this content:\n\n{content}")
    };

    var response = await _chatService.GetChatResponseAsync(
        chat => chat.WithAlias("content-summary").WithProfile("content-assistant"),
        messages);

    return Ok(response.Text);
}
```

{% endcode %}

## Understanding Profile Resolution

When you make a chat request:

1. The system resolves the profile by ID or alias
2. The connection provides the credentials
3. Profile settings (model, temperature, and so on) configure the request
4. The system applies any registered middleware
5. The system sends the request to the AI provider

## Multiple Profiles

Create different profiles for different use cases:

| Profile             | Use Case            | Model       | Temperature |
| ------------------- | ------------------- | ----------- | ----------- |
| `content-assistant` | Content suggestions | gpt-4o      | 0.7         |
| `code-helper`       | Code generation     | gpt-4o      | 0.2         |
| `translator`        | Translation         | gpt-4o-mini | 0.3         |

## Next Steps

Learn more about using the chat API:

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

Or explore the core concepts:

{% content-ref url="/pages/BEfNpZDOI0FB08Kb0PbN" %}
[Core Concepts](/ai-in-umbraco/concepts/concepts.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/getting-started/first-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.
