Skip to main content
The gateway is configured via a 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

string[]
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, walledai
object
Top-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.
boolean
default:"false"
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.
object[]
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 the integrations array supports the following fields:
string
required
The AI provider identifier. Examples: anthropic, openai, azure, cohere, mistral.
string
required
A unique human-readable name for this integration. Used to reference this integration in routing configs and logs.
object
required
Provider-specific credentials. For most providers this is an apiKey string:
object[]
Optional array of rate limit rules applied to this integration. Each rule has three fields:
object[]
Optional list of models available through this integration. Each entry has the following fields:

Environment variables

string
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 local conf.json into the container at /app/conf.json: