# The First Connection

A connection stores the credentials and settings needed to communicate with an AI provider. Before you can use AI features, you need to create at least one connection.

## Prerequisites

* Umbraco.AI and a provider package installed
* An API key from your AI provider

## Create a Connection

1. Log in to the Umbraco backoffice
2. Navigate to the **AI** section
3. Click **Connections** in the tree
4. Click **Create Connection**

![The Select AI Provider dialog showing available providers](/files/CbHxSAuEqvHFJxALVS2V)

{% hint style="info" %}
If you don't see the AI section, ensure your user group has access to it. See the [Installation](/ai-in-umbraco/getting-started/installation.md#verify-installation) guide for details on granting section access.
{% endhint %}

![The Create Connection form with provider settings](/files/VOHmo1nA834aJuIGhmNR)

## Configure the Connection

Fill in the connection details:

| Field        | Description                                 | Example                      |
| ------------ | ------------------------------------------- | ---------------------------- |
| **Name**     | A display name for this connection          | "OpenAI Production"          |
| **Alias**    | A unique identifier for programmatic access | "openai-prod"                |
| **Provider** | The AI provider to use                      | "OpenAI"                     |
| **API Key**  | Your provider API key                       | "sk-..." or "$OpenAI:ApiKey" |

{% hint style="info" %}
Use a configuration reference like `$OpenAI:ApiKey` to read the API key from `appsettings.json` instead of storing it in the database.
{% endhint %}

## Connection Properties

Each connection has the following properties:

| Property     | Description                                               |
| ------------ | --------------------------------------------------------- |
| `Id`         | Unique GUID identifier                                    |
| `Alias`      | Unique string alias for lookups                           |
| `Name`       | Display name                                              |
| `ProviderId` | Which provider this connection uses                       |
| `Settings`   | Provider-specific settings (API key, endpoint, and so on) |
| `IsActive`   | Whether the connection is enabled                         |
| `Version`    | Current version number, increments with each save         |

## Multiple Connections

You can create multiple connections to:

* Separate development and production environments
* Use different API keys for different teams or projects
* Connect to multiple AI providers

## Next Steps

{% content-ref url="/pages/hCprG4dU4iTVweoxlKyn" %}
[The First Profile](/ai-in-umbraco/getting-started/first-profile.md)
{% endcontent-ref %}


---

# 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.umbraco.com/ai-in-umbraco/getting-started/first-connection.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.
