> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/zerve-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/zerve-docs/administration/bring-your-own-api-keys.md).

# Bring your own API keys

Use your organization's own model provider accounts with Zerve.

Organizations can connect their **own accounts with model providers**, so Zerve's agents use your API keys instead of Zerve's. Many organizations do this to keep model usage under their own provider contracts, pricing, data agreements and rate limits.

## Supported providers

| Provider           | What you need                                                                                                                                                                                                             |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Anthropic**      | An API key                                                                                                                                                                                                                |
| **OpenAI**         | An API key                                                                                                                                                                                                                |
| **Google Gemini**  | An API key                                                                                                                                                                                                                |
| **OpenRouter**     | An API key                                                                                                                                                                                                                |
| **Amazon Bedrock** | No key. Bedrock uses the AWS credentials of your organization's compute, so it's available when your organization runs Zerve in your own AWS account. See [Deployment options](/zerve-docs/self-hosting/self-hosting.md). |

## Adding a key

You need to be an organization admin.

{% stepper %}
{% step %}

### Open Model settings

Go to **Organization Settings → Model Settings**, and find **AI API keys**.
{% endstep %}

{% step %}

### Add the key

Choose the provider and paste your API key.
{% endstep %}

{% step %}

### Check the provider is approved

Make sure the provider is approved for your organization and the models you want are enabled. See [Model settings](/zerve-docs/administration/model-settings.md).
{% endstep %}
{% endstepper %}

Your key is stored in your organization's secure vault and is never shown again. To replace it, enter a new one.

## How your key is used

Once you've added a key, all agent requests to that provider use **your key instead of Zerve's**. Your key always takes priority for its provider.

## How billing works

| Cost              | Who you pay                                                                                                            |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Model usage**   | Your model provider, directly, under your own account                                                                  |
| **Orchestration** | Zerve charges credits for running the agents, such as planning, coordination and context management, at a reduced rate |
| **Compute**       | Zerve charges credits for compute as normal, since it isn't covered by your provider's bill                            |

See [How credits are used](/zerve-docs/administration/how-credits-are-used.md).

## Routing everything through your own gateway

Organizations that need all model traffic to go through their own infrastructure, such as for an air-gapped install, can use an **LLM gateway** instead of individual keys. With a gateway, every agent request goes to your gateway's endpoint, and your gateway holds the provider credentials. This is set up as part of a [self-managed install](/zerve-docs/self-hosting/self-managed.md).


---

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zerve.ai/zerve-docs/administration/bring-your-own-api-keys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
