conf.json file placed in the project root. The file is loaded at startup. All self-hosted deployments — Node.js, Docker, and EC2 — use this same format.
Example
conf.json
Top-level fields
List of guardrail and integration plugin identifiers to enable. The
default plugin is always required. Additional plugins correspond to third-party guardrail providers.Available values: default, portkey, qualifire, aporia, sydelabs, pillar, patronus, pangea, promptsecurity, panw-prisma-airs, walledaiTop-level credentials for enabled plugins that require API keys (e.g. Portkey itself). Each key is a plugin identifier and its value is a credentials object.
Enable in-memory response caching. When
true, the gateway intercepts repeated identical requests and returns cached responses without forwarding to the upstream provider.For persistent caching across restarts or multiple instances, use the REDIS_CONNECTION_STRING environment variable instead.Array of provider integration configurations. Each entry registers a named provider integration with its own credentials, rate limits, and model list.See the integrations fields section below for full details.
Integrations fields
Each object in theintegrations array supports the following fields:
The AI provider identifier. Examples:
anthropic, openai, azure, cohere, mistral.A unique human-readable name for this integration. Used to reference this integration in routing configs and logs.
Provider-specific credentials. For most providers this is an
apiKey string:Optional array of rate limit rules applied to this integration. Each rule has three fields:
| Field | Type | Description |
|---|---|---|
type | "requests" | "tokens" | Whether to limit by request count or token count |
unit | "rph" | Rate limit window. Currently rph (requests/tokens per hour) |
value | number | Maximum allowed requests or tokens within the window |
Optional list of models available through this integration. Each entry has the following fields:
| Field | Type | Description |
|---|---|---|
slug | string | Model identifier as expected by the provider API (e.g. claude-3-7-sonnet-20250219) |
status | "active" | "inactive" | Whether the model is available for routing |
pricing_config | object | null | Optional custom pricing configuration |
Environment variables
Redis connection string for persistent, distributed response caching. When set (Node.js runtime only), the gateway connects to Redis on startup and uses it as the cache backend instead of in-memory storage.
Redis caching is only supported on the Node.js runtime. It is not available on Cloudflare Workers.
Mounting conf.json in Docker
When running via Docker, mount your localconf.json into the container at /app/conf.json: