# Source: https://docs.pipecat.ai/deployment/pipecat-cloud/guides/managed-api-keys.md

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

# Managed API Keys

> Using managed API keys for your Pipecat Cloud agents

## Overview

Pipecat Cloud provides API keys for some Pipecat services that you can use directly in your applications. These managed keys give you access to competitive pricing, higher rate limits, pre-signed BAAs and DPAs for compliance, and integrated billing with your Pipecat Cloud account.

<Note>
  Managed keys are currently in beta. We are planning to add more services based
  on demand. If you're interested in us supporting a specific service, let us
  know by emailing [pipecat-ai@daily.co](mailto:pipecat-ai@daily.co).
</Note>

## Supported Services

* **Deepgram Flux (STT)**

## Pricing

Usage of managed keys is billed through your Pipecat Cloud account. For detailed pricing information, visit our [pricing page](https://www.daily.co/pricing/pipecat-cloud/).

## How to Use Managed Keys

### Enable in Deployment Configuration

When deploying your agent, you need to enable managed keys in your configuration.

**Using pcc-deploy.toml:**

```toml  theme={null}
enable_managed_keys = true
```

**Using the CLI:**

```bash  theme={null}
pipecat cloud deploy --enable-managed-keys true
```

<Info>
  This setting is configured per agent deployment. Any changes require
  redeploying your agent to take effect.
</Info>

### Update Your Code

When initializing a supported service in your Pipecat application, use the special string `"PIPECATCLOUD"` as the API key. This tells Pipecat Cloud to use the managed key when your agent is deployed.

To ensure your code works both locally (with your own API key) and when deployed (with managed keys), use this pattern:

```python  theme={null}
import os
from pipecat.services.deepgram.flux.stt import DeepgramFluxSTTService

tts = DeepgramFluxSTTService(api_key=os.getenv("DEEPGRAM_API_KEY", "PIPECATCLOUD"))
```

This approach:

* Uses your local `DEEPGRAM_API_KEY` environment variable during development
* Automatically switches to the managed key when deployed to Pipecat Cloud

<Note>
  The `PIPECATCLOUD` key is only available for Deepgram Flux (STT) when there is
  no value for `DEEPGRAM_API_KEY` in your corresponding secrets set.
</Note>

## Getting Help

If you have any questions about using managed keys, reach out to us on [Discord](https://discord.gg/pipecat). Our community and team are happy to help!