> For the complete documentation index, see [llms.txt](https://docs.chat.ngo/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chat.ngo/api/how-to-add-api-keys.md).

# How to Add API Keys

<figure><img src="/files/jZfK55emvLXufSo14oPy" alt=""><figcaption></figcaption></figure>

To add an API key to your workspace and enable AI usage, follow these steps:

#### Step 1. Ensure Admin Access

* Only users with the **Admin** role can add or manage API keys in the workspace. If you do not have admin privileges, contact your workspace admin.

#### Step 2. Access Workspace Settings

* Click on the **Workspace Settings** option from the left menu.
* Navigate to the **Models & Credentials** section.

#### Step 3. Add a New API Key

* Click on the **+ Add model** button.
* From the dropdown menu, select the API provider you want to add, either **OpenAI** or **Anthropic**.
* In the **API Key** field, paste your API key.
* Click **Save**.

#### Step 4. Enable or Disable Models

* Once the API key is added successfully, the available models for that provider, such as **GPT-4o** or **Claude 3.5**, will be displayed.
* You can toggle each model on or off depending on the needs of your workspace.

#### Step 5. Set Default Models

* In the **Default Models** section, you can select a default model for various functions like Chat, Vision, or Image Generation.
* Choose the desired default model for each function from the dropdown.
* Click **Save** to confirm your selection.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.chat.ngo/api/how-to-add-api-keys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
