> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valkyrieapp.azumo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API keys

> Create and manage the keys applications and agents use to call Valkyrie.

The **API keys** screen is where you manage the keys that authenticate machine
access to Valkyrie: keys for calling your endpoints from code, and one for
connecting agents over MCP. It has two tabs: **MCP Key** and **Deployment Keys**.

![Valkyrie API Keys screen](https://mintcdn.com/valkyrie-azumo/n5A0w3djfSi-SEkH/images/dashboard/api-keys.png?fit=max\&auto=format\&n=n5A0w3djfSi-SEkH\&q=85\&s=149c3d9c8abee5893de3e566e1928df9)

The API keys screen, MCP Key tab.

## MCP key

You have a single **MCP server key** (prefixed `vk_mcp_`) used to connect the
[MCP server](https://docs.valkyrieapp.azumo.com/mcp/overview.md). It acts in your personal workspace. Rather than creating many, you **rotate** it when you
need a fresh secret, the old value stops working once rotated. The **MCP
Configuration** button gives you the ready-to-paste connection settings for your
client. Your client must send the key in an `X-API-Key` or
`Authorization: Bearer` header on every request. See
[Set up the MCP server](https://docs.valkyrieapp.azumo.com/mcp/setup.md) for client-specific examples.

## Deployment keys

The **Deployment Keys** tab holds the keys (prefixed `vk_dep_`) that call your
[endpoints](https://docs.valkyrieapp.azumo.com/dashboard/endpoints.md). Create one with **Create API key**, or from an
endpoint's page with **Create a key for this endpoint**, which also gives you a
ready-to-paste config with the base URL, the key and the model name. See
[Create a key for an endpoint](https://docs.valkyrieapp.azumo.com/dashboard/endpoints.md#create-a-key-for-an-endpoint).

A deployment key belongs to the workspace you create it in: it reaches only that
workspace's models, and stops working if you leave the workspace. The create page
names the workspace. See [Workspaces and teams](https://docs.valkyrieapp.azumo.com/guides/workspaces.md#api-keys-and-mcp).

When you create a key, choose its scope:

* **One endpoint.** The list offers endpoints that run now or come back: active
  ones (pending, starting, or running), paused ones, and ones off on their
  schedule. Terminated and failed endpoints are not offered.
* **Account-wide.** The key is not tied to a single endpoint.

If no endpoint is running, paused or off on its schedule, only **Account-wide** is
offered, with a hint that links to [Endpoints](https://docs.valkyrieapp.azumo.com/dashboard/endpoints.md) so you can
deploy or resume one.

> [!WARNING]
>
> A key's full value is shown only once, at creation. Copy it into your secret
> manager or environment immediately, you can't view it again, only rotate or
> revoke it.

## Using a key

Send the key in the `X-API-Key` header (the OpenAI SDKs send it as a bearer token,
which is also accepted):

```bash theme={null}
curl https://valkyrie-back.azumo.com/{deployment_slug}/v1/chat/completions \
  -H "X-API-Key: $VALKYRIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "{deployment_slug}", "messages": [{"role":"user","content":"Hi"}]}'
```

> [!NOTE]
>
> Keys are environment-specific, a key issued in one environment won't work against
> another.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.