Overview
Relay supports three environment types: development, staging, and production. When you create an API target or an API key, you must assign it to one of these environments.
Currently, environments act primarily as metadata labels to help you organize your resources. You can filter resources by environment in the dashboard to clearly distinguish your production keys from your development keys.
API Keys and Environments
The environment field is required when generating a new API key. The prefix of the raw key generated reflects the environment to help you quickly identify it in your source code:
productiongenerates keys starting withrelay_live_staginggenerates keys starting withrelay_test_developmentgenerates keys starting withrelay_dev_
Routing and Enforcement
While environments help you organize keys, the Relay Gateway does not currently enforce strict routing isolations between environments out-of-the-box (e.g. automatically blocking a relay_test_ key from hitting a production API target). However, you can use these labels to manage separate API targets (e.g. my-api-prod vs my-api-dev) and issue the appropriately labeled keys for each.