# Configure agent authorization

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/air/llms.txt).

To work on a task, an agent needs an available authorization source. Air in IDEs offers the following options:

* [Agent login](#agent-login) – the authorization that the agent manages itself. Air in IDEs reuses an existing login when it detects one on your machine; otherwise, the agent starts its own authorization flow.

* [JetBrains AI](#jetbrains-ai) – an eligible JetBrains AI license or organization workspace associated with your JetBrains Account.

* [Configured provider](#configured-provider) – a third-party AI provider that you configure in Air in IDEs with the credentials that it requires.

The source that you select also determines how the work of an agent is billed. When an agent works through JetBrains AI, your JetBrains AI access and subscription cover the usage. When an agent works through a configured provider or through its own authorization, the subscription, billing, and terms of that provider apply.

## Use the agent login

Air in IDEs detects the agents installed on your machine together with the configuration that they already use. If such an agent is already authorized, for example, because you have previously logged in to it, a session starts with that authorization, so you do not need to configure anything in the IDE. An agent that has no authorization yet starts its own authorization flow instead.

In a session, this source is represented by the Agent login entry in the list opened by clicking the ![](images/database-plugin.icons.expui.user.svg) button.

![Session prompt area with the authorization list open and Agent login selected, showing that the agent manages its own login.](images/air_select_authorization.png)

## Use JetBrains AI

If your JetBrains Account has an eligible [JetBrains AI
license](https://www.jetbrains.com/help/ai/ai-service-license.html#subscription-plans) or workspace assigned to it, you can use it with the agents that support JetBrains AI authorization. Currently, these are the following agents:

* [Claude Agent](https://www.anthropic.com/)

* [Codex](https://openai.com/codex/)

* [Junie](https://www.jetbrains.com/junie/)

The JetBrains account entry at the top of the `Tools | Air | Accounts` page holds this authorization. While you are logged out, the entry shows the Log in button: click it and complete the login in the browser.

![Accounts settings with the logged-out JetBrains account entry and its Log in button above a configured OpenAI API key entry.](images/air_accounts_login.png)

After you log in, the entry shows the name of your account, a list of available JetBrains AI licenses or organizations associated with your account, and how many of your monthly credits are left. To open the Manage Subscriptions dialog and review the licenses of your account, click ![](images/app.ide.external_link_arrow.svg) next to the account name.

### Personal account

For an account that works with a subscription of its own, the list holds the eligible JetBrains AI licenses of that account. To select a specific license, click ![](images/app-client.expui.general.chevronDown.svg) and select the required one from the list.

![Accounts settings with the logged-in JetBrains account entry, an eligible personal JetBrains AI license selected, and the monthly credits left.](images/air_accounts_non_org.png)

### Organization account

For an account that belongs to organizations which supply credits to it, the list holds these organizations. Click ![](images/app-client.expui.general.chevronDown.svg) to select the organization to spend credits from.

![Tools | Air | Accounts settings with the JetBrains account entry, the list of organizations that supply credits, and the monthly credits left.](images/air_org_account.png)

> **Tip:**
> The list holds only the organizations that are available to you. To work without organization credits, for example with your own subscription or with the authorization flow of the agent, select another authorization source in the session, as described in [Select the authorization for a session](#select-authorization).

> **Note:**
> If your organization turns off AI access for you in JetBrains Central Console, you lose access to its workspace. After you restart the IDE, the organization no longer appears in this list or in the Choose a sign-in method to continue list. To request access, contact your organization administrator.

### An account without JetBrains AI access

If the account that you are logged in with has no JetBrains AI access, the entry shows No JetBrains AI access for this account and the Manage subscriptions link. However, the More Providers button stays available, so you can still add third-party providers and [work through them](#configured-provider) instead.

## Use a configured AI provider

Air in IDEs supports several third-party AI providers. You can configure a provider using the credentials and settings that it requires, such as an API key, and switch between the configured providers as your tasks require.

> **Note: Limitations**
> A Claude subscription cannot be used to authorize Claude Agent in the chat surface. To use Claude Agent, select JetBrains AI or configure Anthropic API-key authentication with API billing.
>
>
>
> To use your Claude subscription, run Claude Code in the terminal surface, which Air in IDEs opens as a full-screen editor tab.

Procedure: Add an AI provider

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `Ctrl+Alt+S` (Linux) and select `Tools | Air | Accounts`. Alternatively, click ![](images/database-plugin.icons.expui.user.svg) in the session and select Accounts.

![Authorization list open in a session, with the Accounts item at the bottom that opens the Air Accounts settings.](images/air_select_authorization.png)

2. Click More Providers and select the provider that you want to add.

![Accounts settings with a configured OpenAI API key entry and the More Providers popup listing the available API key types.](images/air_accounts_settings_key_configured.png)

3. In the dialog that opens, enter the credentials that you obtained from the provider and configure any additional settings required to finish the configuration.

> **Tip:**
> Click the Test Connection button to check whether the connection to the provider is established.

4. Click OK to save the settings.

The configured provider appears in the AI Providers list and becomes [available for
selection](#select-authorization) in sessions with the agents that support it.

Procedure: Edit or remove a provider

To change or delete the configuration of a provider, click ![](images/app.expui.general.moreVertical.svg) on its entry in the AI Providers list and select the action that you need.

![Accounts settings with the menu open on the OpenAI API key entry, offering the Edit and Remove provider actions.](images/air_edit_remove_provider.png)

## Select the authorization for a session

Every authorization source is selected in the session. Click the ![](images/database-plugin.icons.expui.user.svg) button below the prompt field and select the source for the session:

![Session controls below the prompt field with the authorization widget open, listing Agent login, JetBrains AI, a configured OpenAI provider, and the Accounts item.](images/air_select_authorization.png)

* Agent login – the authorization that the agent manages itself. Select this entry to let the agent handle authorization: if Air in IDEs detects an existing login, it reuses it, and an authorized agent starts directly. Otherwise, the agent starts its own authorization flow.

* JetBrains AI – your JetBrains Account, with access to JetBrains AI.

* One entry for every compatible provider configured on the Accounts page.

Sending a prompt in a session where the agent has no authorization yet also starts the authorization procedure. The agent responds with the Choose a sign-in method to continue list, which holds the same authorization sources. You can authorize the agent by selecting the preferred option from the list.

![Agent session where the first message triggers the sign-in method list with the agent account, JetBrains AI workspaces, and Add an AI provider.](images/air_choose_sign_in_method.png)

## See also

### External Links

[JetBrains AI license](https://www.jetbrains.com/help/ai/ai-service-license.html#subscription-plans)

