Skip to content
KeylayerDocs
Docs menu
PricingGet started

Keylayer docs

Keylayer turns one provider key into scoped Keylayer keys for your apps, agents, scripts and teammates. Each Keylayer key carries up to 8 limits, such as a spend cap, a rate limit or an expiry date, and works with 11 providers through the relay at https://relay.keylayer.dev: you change the base URL and the key, and the rest of your code stays the same.

Environment variables
export OPENAI_BASE_URL="https://relay.keylayer.dev/v1"
export OPENAI_API_KEY="$KEYLAYER_KEY"
  1. Your codesends a Keylayer key
  2. Keylayer relaychecks up to 8 limits
  3. 11 providersreceive your own key

Get started

Concepts

Providers

Reference

  • Keylayer error codes

    Every error code the Keylayer relay returns, with its HTTP status and fix, and how to tell a Keylayer refusal from a provider error in your code.

Updated

Create your first scoped key

Add a provider key once, then mint Keylayer keys with their own limits for each app, agent or teammate.

Get started