Create & configure a gateway
This guide walks you through creating a gateway and wiring up everything it governs. For the conceptual model โ BYOK passthrough, context injection, policies, audit โ see Gateway.
1. Create the gateway
In the dashboard, go to Gateways and click Create Gateway.
- Name it (e.g.
Production API Gateway). The slug auto-generates from the name โ a URL-safe identifier you can override. - Add an optional description.
- Pick an environment: Production, Staging, or Development.
Click Create Gateway. You land on the gateway detail page, organized into tabs: General, Setup, Providers, Policies, Blueprints, API Keys, and Context.
Note
The environment only sets the gateway's base host โ production uses gateway.unyform.ai, staging uses gateway-staging.unyform.ai. It doesn't change behavior.
2. Enable a provider
Open the Providers tab and click Add Provider.
- Choose a Provider Type โ Anthropic and/or OpenAI are the common pair (Azure OpenAI, Google, and Custom are also available).
- Give it an optional Display Name.
- Paste an API key for that provider, pick a Default Model, and set a Priority (lower runs first).
- Toggle Allow passthrough on for BYOK.
Allow passthrough is a permission gate, not a billing switch. When it's on, clients may route through this provider using their own credentials โ the key their tool sends is forwarded verbatim and never stored. When it's off, only the stored key is used.
Tip
For a Claude Code / SDK setup where developers bring their own keys, enable the Anthropic provider with passthrough on.
Each provider row has its own enable/disable and passthrough toggles, so you can flip them later without removing the provider.
3. Attach blueprints
Open the Blueprints tab. Check the blueprints you want this gateway to inject, and set a Priority on each (lower priority injects first). Only blueprints that already exist in your org appear here โ analyze a repository first if the list is empty.
4. (Optional) Attach policies
Open the Policies tab and check any org policies you want enforced. For each attached policy, choose an enforcement level:
- Enforce โ block violating requests.
- Warn โ log the violation but pass the request through.
- Disabled โ attached but inactive.
Warning
A gateway with no policies still injects blueprints and context โ it just doesn't gate requests. Add policies when you need hard rules.
5. Get the gateway URL and a key
Your gateway is reachable at:
https://gateway.unyform.ai/gw/<gateway-id>
The Setup tab shows ready-to-paste snippets and auto-mints a gateway API
key (prefixed uny_gw_) the first time you open it โ copy it then, because the
plaintext is shown only once.
To mint additional keys for CI or key-authenticated endpoints, use the API Keys tab โ Generate Key. Revoke them there too.
Note
Gateway API keys (uny_gw_โฆ) authenticate to the gateway itself. They're separate from the provider keys your tools send for BYOK passthrough.
6. Point your tools at it
Set your tool's base URL to the gateway and run as usual:
The gateway speaks each provider's native protocol:
/gw/<gateway-id>/v1/messages/gw/<gateway-id>/v1/chat/completionsSee Point Claude Code at your gateway for
per-project config and the count_tokens preflight.
7. Verify and manage
Make a request that touches your codebase's domain, then check Dashboard โ Audit to confirm blueprints were injected and policies ran.
To take a gateway offline, deactivate or delete it from the General tab.
Warning
Deactivating a gateway 503s its traffic immediately. Deleting one removes all its providers, policies, blueprints, and API keys.