Skip to main content

Create proxy secret keys

Proxy secret keys are used to monitor and optionally impose limits on your LLM usage. You can decide how you want to create and distribute these keys to your projects and users. Some example use cases include:

  • Creating a proxy secret key for each environment (e.g. development, staging, production).
  • Creating a proxy secret key for each project.
  • Creating a proxy secret key for each user.

Available settings

When you create a secret key, you have the option to configure the following properties.

Basic settings

PropertyDescription
NameA descriptive name for the proxy secret key. Can be any string.
Key retrieval methodConfigure how many times can the key be viewed after creation. See more details here.
ExpiryHow long before the proxy secret key is expired and unusable.
Rate limitConfigure how often this proxy secret key can be used to send a request.
Spend limit per monthThe total amount of money you can spend using the secret key per month. Refreshes at the start of each month.
Spend limit over lifetimeThe total amount of money you can spend using the secret key. Never refreshes.

Key retrieval method

ValueDescription
Once after key creationA proxy secret key is viewable once immediately after its creation. No one will be able to retrieve it afterwards.
Once per viewerA proxy secret key is viewable anytime by owners, but only once per viewer.
Anytime by a viewerA proxy secret key is viewable anytime by owners and viewers.

Provider settings

PropertyDescription
Provider settingsConfigure which LLM provider API key(s) this secret key can access. When more than one provider API key is selected for the same provider (e.g. choosing multiple OpenAI API keys), BricksAI will randomly distribute traffic between them

Advanced settings

PropertyDescription
Store request bodySpecify whether BricksAI should store request body in its logs.
Store response bodySpecify whether BricksAI should store response body in its logs.
Policy (beta)Specify which policy applies to this secret key.