Skip to main content
CodePilot needs an AI model connected before it can generate responses. In most cases, you just select a model and register a personal API key in Settings. Google is included by default, so you can start right away. This guide uses Google Gemini as the example.
When an administrator (super) enables the providers and models the organization will use, members simply pick from that list. Registering a model that isn’t on the list — via Custom Models — is only for standalone setups used without signing in.

1. Get a Gemini API key

You can get an API key from Google for free.
1

Go to Google AI Studio

In your browser, go to aistudio.google.com/apikey and sign in with your Google account.
2

Create an API key

Click the Create API key button. If it asks you to choose a project, pick any project or create a new one.
3

Copy the key

A string starting with AIza is generated. Click the Copy button and keep it somewhere safe.
An API key is like a password. Don’t paste it into source code or team chat. If it leaks, delete it immediately in Google AI Studio and issue a new one.
Gemini includes a free usage tier. You may be charged if you exceed it, so check your billing settings and limits in Google AI Studio.

2. Select a model and register an API key

Register the key you obtained in Settings.
1

Open AI model settings

Click the gear (⚙) icon at the top right of the chat panel, then select AI Models from the left menu.AI Models settings
2

Select an AI model

In the Select AI Model dropdown, choose the provider you want to use. Google is included by default, so you can leave it as-is.
3

Choose a model

In the model settings area below (Configure the API settings for the selected model), open the Model dropdown and choose the model to use. (e.g., Gemini 3.0 Flash)
4

Register a personal API key

Set the API Key item to Personal API Key, then paste the key you copied in step 1 into the Personal API Key field and click Save.
Now type any question in the chat to confirm the connection.
Hi there! Just checking that everything's connected properly.
Use the Streaming · Native tool calls · Thinking · Multimodal toggles to adjust how responses are generated. See the Settings guide for details.

3. Switching to the admin key

If your administrator has registered an API key for the organization, a dropdown to choose between the admin key and a personal key appears under the API Key item. Switching to the admin key lets you start using it right away without your own key. Choosing the API key source
OptionMeaning
Admin API KeyUses the key registered by the organization. The organization covers the cost
Personal API KeyUses a key you issued yourself. You cover the cost
When both an admin key and a personal key exist, Admin API Key is selected by default. If no keys are registered at all, it shows No keys registered — in that case, ask your administrator or register a personal key.

4. Register a custom model (standalone only)

This method is only for standalone (BYOK) setups used without signing in. Use it to register a model that isn’t in the provider list above, specifying its endpoint directly. The Custom Models section does not appear when you’re signed in to an organization.
1

Add a model

Under Custom Models in Settings → AI Models, click + Add Model.Adding a custom model
2

Select a provider

In the Provider dropdown, choose Google Gemini. Once you select it, the API Endpoint is filled in automatically. Leave this value as-is.Gemini model form
3

Enter the model details

Type the two values below yourself.
FieldValue to enter
Model NameGemini 3.1 Pro — this is just the name shown in the list, so use whatever you like
Model IDgemini-3.1-pro-preview — must be the exact value defined by Google
The faint example text in the field (gemini-2.5-pro) refers to an older model. Don’t leave it as-is — type the value above instead.
4

Paste the API key and save

Paste the key you copied in step 1 into the API Key field. Leave everything else (auth method, context window, temperature, extra headers, etc.) at its default and click Save.
5

Test, then select

Click Test next to the saved model to confirm Connection OK, then click Select to put it in the ✓ Active state.Testing and selecting the model
If you only save and don’t click Select, the model is merely registered and won’t be used. Be sure to select it too.

Using a different provider

Choose a different provider in the Provider dropdown. The steps are the same as for Gemini — only where you get the API key differs.
ProviderExample model ID
OpenAIgpt-4o
Anthropic Claudeclaude-opus-4-6
Google Geminigemini-3.1-pro-preview
DeepSeekdeepseek-chat
Model IDs change whenever a provider releases a new model. If the value above doesn’t work, check the provider’s official documentation for the current model ID.
You can also register cloud providers (Vertex AI · Azure OpenAI · AWS Bedrock) and self-hosted servers (OpenAI-compatible endpoints).
To use it without an internet connection, you can run a local model that needs no API key. Connect a local model server under Settings → AI Models.

Troubleshooting

The API Key item may be set to Personal API Key without a saved key, or there may be no admin key available. Check that you entered your personal key and clicked Save.
Neither an admin key nor a personal key is registered. Issue and register a personal key, or ask your administrator to register an organization key.
Your administrator (super) may not have enabled that provider. Ask your administrator. In a standalone setup used without signing in, you can register it yourself via Custom Models.
Check the following, in order.
  1. API key — make sure no leading/trailing whitespace got copied in, and paste it again.
  2. Model ID — it must be the exact value defined by Google, like gemini-3.1-pro-preview. Don’t confuse it with the model name (Gemini 3.1 Pro).
  3. API endpoint — reselecting the provider restores the correct value.
  4. Network — a corporate firewall may be blocking outbound API calls. Contact your administrator.
You may have used up the Gemini free tier. Check your usage and billing settings in Google AI Studio.

Next steps

Quickstart

Send your first request and approve changes right away

Connect to an organization

Using it as a team? Join an organization to apply administrator policies