Connecting Your Account

To use AI agents in Anvil, you need to connect your account to an AI provider. When you open the agent chat window for the first time, you’ll be prompted to choose a provider.

Anvil supports the following providers:

Provider selection screen in the Anvil agent chat window

Choose an AI provider to get started

ChatGPT/Codex

Click ChatGPT/Codex in the agent chat window.

There are two ways to connect your ChatGPT/Codex account:

  1. Log in with ChatGPT
  2. Log in with an API key

Log in with ChatGPT

A one-time login code will be displayed in the chat window, and a link to sign in at https://auth.openai.com/codex/device.

Log in with ChatGPT

Log in with ChatGPT

Do not share your login code with anyone else.

Copy the code and open the link. Log in or choose an account to open the Sign in to Codex with ChatGPT confirmation window. When prompted, paste the code and click Continue.

Once connected, return to the Anvil Editor and click Continue to conversation.

Troubleshooting

  • Make sure you are already logged into your OpenAI account before opening the link. If you are not logged in, the option to enter the code may not appear.
  • If you still do not see the option to enter the code, go to ChatGPT Settings and under Security and login, toggle on “Enable device code authorisation for Codex”. Then, reopen the link from Anvil.

Log in with an API key

Generate an API key from the OpenAI dashboard. In the dialog that appears, paste your API key and click Log in.

Log in with an API key

Log in with an API key

Claude

Click Claude in the agent chat window.

There are two ways to connect your Claude account:

  1. Anthropic API key
  2. Claude Code token

Anthropic API key

Generate an API key from the Anthropic Console. In the dialog that appears, paste your API key and click Log in.

Log in with an Anthropic API key

Log in with an Anthropic API key

Claude Code token

With Claude Code installed on your machine, run the following command in your terminal:

claude setup-token

Copy the generated OAuth token, paste it into the dialog, and click Log in.

Log in with a Claude Code token

Log in with a Claude Code token

Custom Model Provider

Custom Model Provider is available on Anvil Enterprise. Click Custom Model Provider in the agent chat window to get in touch and discuss your requirements.

Custom Model Provider dialog

Custom Model Provider is available on Anvil Enterprise

Disconnecting your AI account

To disconnect an AI provider, go to your account settings, from the menu in the top-right of the Anvil Editor. Open the Authentication & Keys tab and under AI Connections click Remove connection next to the provider you want to disconnect.

AI Connections in Authentication & Keys settings

Manage AI connections in your account settings


Do you still have questions?

Our Community Forum is full of helpful information and Anvil experts.