> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbifrost.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Configure Bifrost using a config.json file - GitOps-friendly, no-UI deployments, and multinode OSS setups

> [!NOTE]
>
> **Full schema reference:** [`https://www.getbifrost.ai/schema`](https://www.getbifrost.ai/schema)

`config.json` lets you configure every aspect of Bifrost through a single declarative file. It is the right choice for GitOps workflows, CI/CD pipelines, headless deployments, and multinode OSS setups where a central configuration file is shared across all replicas.

***

## Configuration Sources

Bifrost stores runtime configuration in a config database by default, so settings can be edited through the Web UI or API. You can also provide a `config.json` file to seed or reconcile that database at startup. To run with only `config.json`, set `config_store.enabled: false`.

| Setup | When | Behaviour |
| - | - | - |
| **Web UI / database** | No `config.json` | Bifrost creates a default SQLite config store and runtime changes are saved through the UI or API |
| **DB-backed `config.json`** | `config.json` exists and `config_store` is omitted or enabled | File-backed sections seed or reconcile the config store at startup; UI/API edits remain available |
| **File-only `config.json`** | `config_store.enabled` is `false` | Config is loaded from file into memory at startup; config-backed UI/API changes are unavailable and file changes require restart |

> [!NOTE]
>
> By default, DB-backed `config.json` uses `source_of_truth: "split"`: unchanged file-backed rows preserve UI/API edits, while changed file-backed rows are applied on the next startup. Use `source_of_truth: "config.json"` only when explicitly present file sections should replace matching DB state. See [Source of Truth & Reconciliation](https://docs.getbifrost.ai/deployment-guides/config-json/source-of-truth.md) for the full rules, including missing-vs-empty section behavior.

***

## Minimal Working Example

This example uses file-only configuration for the smallest self-contained setup.

```json theme={null}
{
  "$schema": "https://www.getbifrost.ai/schema",
  "encryption_key": "env.BIFROST_ENCRYPTION_KEY",
  "client": {
    "drop_excess_requests": false,
    "enable_logging": true
  },
  "providers": {
    "openai": {
      "keys": [
        {
          "name": "openai-primary",
          "value": "env.OPENAI_API_KEY",
          "models": ["*"],
          "weight": 1.0
        }
      ]
    }
  },
  "config_store": {
    "enabled": false
  }
}
```

Save this as `config.json` in your app directory and start Bifrost:

```bash theme={null}
# NPX
npx -y @maximhq/bifrost -app-dir ./data

# Docker
docker run -p 8080:8080 \
  -v $(pwd)/data:/app/data \
  -e OPENAI_API_KEY=sk-... \
  -e BIFROST_ENCRYPTION_KEY=your-32-byte-key \
  maximhq/bifrost
```

Make your first call:

```bash theme={null}
curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

***

## Environment Variable References

Never put secrets directly in `config.json`. Use the `env.` prefix to reference any environment variable:

```json theme={null}
{
  "encryption_key": "env.BIFROST_ENCRYPTION_KEY",
  "providers": {
    "openai": {
      "keys": [
        {
          "name": "primary",
          "value": "env.OPENAI_API_KEY",
          "weight": 1.0
        }
      ]
    }
  }
}
```

Set the actual values through your deployment platform - shell environment, Docker `-e`, Kubernetes Secrets mounted as env vars, or a `.env` file.

For Enterprise deployments, `vault.<path>` references are also supported. See [Secret Management](https://docs.getbifrost.ai/deployment-guides/config-json/secret-management.md).

***

## Schema Validation

Add `$schema` to every `config.json` for IDE autocomplete and inline validation:

```json theme={null}
{
  "$schema": "https://www.getbifrost.ai/schema"
}
```

Editors (VS Code, JetBrains, Neovim with LSP) will show completions and flag invalid fields as you type.

***

## Production Example

A production-ready file with PostgreSQL storage, multi-provider setup, governance, and common plugins:

```json theme={null}
{
  "$schema": "https://www.getbifrost.ai/schema",
  "encryption_key": "env.BIFROST_ENCRYPTION_KEY",

  "client": {
    "initial_pool_size": 500,
    "drop_excess_requests": true,
    "enable_logging": true,
    "log_retention_days": 90,
    "enforce_auth_on_inference": true,
    "allowed_origins": ["https://app.yourcompany.com"]
  },

  "providers": {
    "openai": {
      "keys": [
        {
          "name": "openai-primary",
          "value": "env.OPENAI_API_KEY",
          "models": ["*"],
          "weight": 1.0
        }
      ],
      "network_config": {
        "default_request_timeout_in_seconds": 120,
        "max_retries": 3
      }
    },
    "anthropic": {
      "keys": [
        {
          "name": "anthropic-primary",
          "value": "env.ANTHROPIC_API_KEY",
          "models": ["*"],
          "weight": 1.0
        }
      ]
    }
  },

  "config_store": {
    "enabled": true,
    "type": "postgres",
    "config": {
      "host": "env.PG_HOST",
      "port": "5432",
      "user": "env.PG_USER",
      "password": "env.PG_PASSWORD",
      "db_name": "bifrost",
      "ssl_mode": "require"
    }
  },

  "logs_store": {
    "enabled": true,
    "type": "postgres",
    "config": {
      "host": "env.PG_HOST",
      "port": "5432",
      "user": "env.PG_USER",
      "password": "env.PG_PASSWORD",
      "db_name": "bifrost",
      "ssl_mode": "require"
    }
  }
}
```

***

## Enterprise Example: Postgres + etcd + Access Profiles

Use this pattern when you want enterprise access-profile configuration to be seeded directly from `config.json`, while running clustered nodes with etcd discovery.

```json theme={null}
{
  "$schema": "https://www.getbifrost.ai/schema",
  "cluster_config": {
    "enabled": true,
    "discovery": {
      "enabled": true,
      "type": "etcd",
      "service_name": "bifrost-cluster",
      "etcd_endpoints": ["http://localhost:2379"]
    }
  },
  "config_store": {
    "enabled": true,
    "type": "postgres",
    "config": {
      "host": "localhost",
      "port": "5432",
      "user": "postgres",
      "password": "env.PG_PASSWORD",
      "db_name": "bifrost-config",
      "ssl_mode": "disable"
    }
  },
  "logs_store": {
    "enabled": true,
    "type": "postgres",
    "config": {
      "host": "localhost",
      "port": "5432",
      "user": "postgres",
      "password": "env.PG_PASSWORD",
      "db_name": "bifrost-config",
      "ssl_mode": "disable"
    }
  },
  "mcp": {
    "client_configs": [
      {
        "client_id": "echo_http",
        "name": "echo_http",
        "connection_type": "http",
        "connection_string": "https://mcpplaygroundonline.com/mcp-echo-server",
        "auth_type": "none",
        "tools_to_execute": ["echo"]
      }
    ]
  },
  "access_profiles": [
    {
      "name": "platform-default",
      "description": "Default profile for enterprise access-profile testing",
      "is_active": true,
      "tags": ["platform", "test"],
      "provider_configs": [
        {
          "provider_name": "OpenAi",
          "all_models_allowed": false,
          "allowed_models": ["gpt-4o-mini"]
        }
      ]
    },
    {
      "name": "platform-readonly-mcp",
      "description": "Profile granting a Virtual MCP and a narrowed tool allowlist",
      "is_active": true,
      "tags": ["mcp", "test"],
      "virtual_mcps": [
        {
          "virtual_mcp_name": "Platform Tools"
        }
      ],
      "mcp_configs": [
        {
          "mcp_client_id": "echo_http",
          "tools_to_execute": ["*"]
        },
        {
          "mcp_client_id": "github",
          "tools_to_execute": ["list_issues"]
        }
      ]
    }
  ]
}
```

> [!NOTE]
>
> `access_profiles` is an enterprise capability. For OSS-only deployments, use `governance.virtual_keys` and related governance resources instead.

***

## Example Configs

Ready-to-use reference configurations from the [examples/configs](https://github.com/maximhq/bifrost/tree/main/examples/configs) directory on GitHub:

> [accordion] Minimal / File-only
>
> | Example | Description |
> | - | - |
> | [noconfigstorenologstore](https://github.com/maximhq/bifrost/blob/main/examples/configs/noconfigstorenologstore/config.json) | Bare-minimum file-only mode - no database, no UI, providers loaded from file |
> | [partial](https://github.com/maximhq/bifrost/blob/main/examples/configs/partial/config.json) | SQLite config store with a minimal provider setup |
> | [v1compat](https://github.com/maximhq/bifrost/blob/main/examples/configs/v1compat/config.json) | `"version": 1` for v1.4.x array semantics (empty = allow all) |

> [accordion] Storage
>
> | Example | Description |
> | - | - |
> | [withconfigstore](https://github.com/maximhq/bifrost/blob/main/examples/configs/withconfigstore/config.json) | SQLite config store (Web UI enabled) |
> | [withconfigstorelogsstorepostgres](https://github.com/maximhq/bifrost/blob/main/examples/configs/withconfigstorelogsstorepostgres/config.json) | PostgreSQL for both config store and logs store |
> | [withlogstore](https://github.com/maximhq/bifrost/blob/main/examples/configs/withlogstore/config.json) | SQLite logs store |
> | [withobjectstorages3](https://github.com/maximhq/bifrost/blob/main/examples/configs/withobjectstorages3/config.json) | S3 object storage offload for logs |
> | [withobjectstoragegcs](https://github.com/maximhq/bifrost/blob/main/examples/configs/withobjectstoragegcs/config.json) | GCS object storage offload for logs |
> | [withobjectstorageazure](https://github.com/maximhq/bifrost/blob/main/examples/configs/withobjectstorageazure/config.json) | Azure Blob Storage offload for logs using a connection string |
> | [withvectorstoreweaviate](https://github.com/maximhq/bifrost/blob/main/examples/configs/withvectorstoreweaviate/config.json) | Weaviate vector store (with [docker-compose](https://github.com/maximhq/bifrost/blob/main/examples/configs/withvectorstoreweaviate/docker-compose.yml)) |

> [accordion] Semantic Cache
>
> | Example | Description |
> | - | - |
> | [withsemanticcache](https://github.com/maximhq/bifrost/blob/main/examples/configs/withsemanticcache/config.json) | Semantic cache backed by Weaviate |
> | [withsemanticcachevalkey](https://github.com/maximhq/bifrost/blob/main/examples/configs/withsemanticcachevalkey/config.json) | Semantic cache backed by Valkey / Redis |

> [accordion] Governance
>
> | Example | Description |
> | - | - |
> | [withauth](https://github.com/maximhq/bifrost/blob/main/examples/configs/withauth/config.json) | Admin username/password auth (`governance.auth_config`) |
> | [withvirtualkeys](https://github.com/maximhq/bifrost/blob/main/examples/configs/withvirtualkeys/config.json) | Virtual keys with provider/model allowlists |
> | [withteamscustomers](https://github.com/maximhq/bifrost/blob/main/examples/configs/withteamscustomers/config.json) | Teams and customers with budgets and rate limits |
> | [withroutingrules](https://github.com/maximhq/bifrost/blob/main/examples/configs/withroutingrules/config.json) | CEL-based routing rules for dynamic provider/model selection |
> | [withpricingoverridesnostore](https://github.com/maximhq/bifrost/blob/main/examples/configs/withpricingoverridesnostore/config.json) | Pricing overrides in file-only mode |
> | [withpricingoverridessqlite](https://github.com/maximhq/bifrost/blob/main/examples/configs/withpricingoverridessqlite/config.json) | Pricing overrides with SQLite config store |

> [accordion] Observability
>
> | Example | Description |
> | - | - |
> | [withobservability](https://github.com/maximhq/bifrost/blob/main/examples/configs/withobservability/config.json) | Prometheus metrics (telemetry always active, custom labels via `client.prometheus_labels`) |
> | [withprompushgateway](https://github.com/maximhq/bifrost/blob/main/examples/configs/withprompushgateway/config.json) | Prometheus Push Gateway for multi-instance deployments |
> | [withotel](https://github.com/maximhq/bifrost/blob/main/examples/configs/withotel/config.json) | OpenTelemetry traces and metrics |

> [accordion] Plugins & Advanced
>
> | Example | Description |
> | - | - |
> | [withdynamicplugin](https://github.com/maximhq/bifrost/blob/main/examples/configs/withdynamicplugin/config.json) | Loading a custom `.so` plugin at startup |
> | [withcompat](https://github.com/maximhq/bifrost/blob/main/examples/configs/withcompat/config.json) | SDK compatibility shims (`should_drop_params`, `convert_text_to_chat`) |
> | [withframework](https://github.com/maximhq/bifrost/blob/main/examples/configs/withframework/config.json) | Custom model pricing catalog URL and sync interval |
> | [withlargepayload](https://github.com/maximhq/bifrost/blob/main/examples/configs/withlargepayload/config.json) | Large payload optimization (streaming without full materialisation) |
> | [withwebsocket](https://github.com/maximhq/bifrost/blob/main/examples/configs/withwebsocket/config.json) | WebSocket / Realtime API connection pool tuning |
> | [withnginxreverseproxy](https://github.com/maximhq/bifrost/blob/main/examples/configs/withnginxreverseproxy/config.json) | 3-node Bifrost behind NGINX reverse proxy (includes [docker-compose](https://github.com/maximhq/bifrost/blob/main/examples/configs/withnginxreverseproxy/docker-compose.yml), [nginx.conf](https://github.com/maximhq/bifrost/blob/main/examples/configs/withnginxreverseproxy/nginx.conf), [helm values](https://github.com/maximhq/bifrost/blob/main/examples/configs/withnginxreverseproxy/helm-values.yaml), and [k8s ingress](https://github.com/maximhq/bifrost/blob/main/examples/configs/withnginxreverseproxy/k8s-ingress.yaml)) |
> | [withpostgresmcpclientsinconfig](https://github.com/maximhq/bifrost/blob/main/examples/configs/withpostgresmcpclientsinconfig/config.json) | MCP client definitions seeded from config.json with PostgreSQL store |
> | [encryptionmigration](https://github.com/maximhq/bifrost/blob/main/examples/configs/encryptionmigration/config.json) | Migrating to a new encryption key |

***

## Configuration Guides

> [card] [Schema Reference](https://docs.getbifrost.ai/deployment-guides/config-json/schema-reference.md)
>
> Every top-level key, its type, default, and where it is documented

> [card] [Client Configuration](https://docs.getbifrost.ai/deployment-guides/config-json/client.md)
>
> Pool size, logging, CORS, header filtering, compat shims, MCP settings

> [card] [Provider Setup](https://docs.getbifrost.ai/deployment-guides/config-json/providers.md)
>
> OpenAI, Anthropic, Azure, Bedrock, Vertex, Groq, self-hosted

> [card] [Storage](https://docs.getbifrost.ai/deployment-guides/config-json/storage.md)
>
> config\_store, logs\_store, vector\_store - SQLite, PostgreSQL, ClickHouse, object storage

> [card] [Plugins](https://docs.getbifrost.ai/deployment-guides/config-json/plugins.md)
>
> Semantic cache, OTel, Maxim, Datadog, custom plugins

> [card] [Cluster](https://docs.getbifrost.ai/deployment-guides/config-json/cluster.md)
>
> Cluster mode with static peers or discovery backends (enterprise)

> [card] [Governance](https://docs.getbifrost.ai/deployment-guides/config-json/governance.md)
>
> Virtual keys, budgets, rate limits, routing rules, admin auth

> [card] [Alerting](https://docs.getbifrost.ai/deployment-guides/config-json/alerting.md)
>
> Alert channels, CEL rules, history retention, webhook network controls

> [card] [Guardrails](https://docs.getbifrost.ai/deployment-guides/config-json/guardrails.md)
>
> Content moderation providers and CEL-based rules (enterprise)

> [card] [Secret Management](https://docs.getbifrost.ai/deployment-guides/config-json/secret-management.md)
>
> AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault, Azure Key Vault - vault references in provider keys and credentials (enterprise)

***

## Next Steps

1. Configure [provider keys](https://docs.getbifrost.ai/providers/supported-providers/overview.md)
2. Enable [plugins](https://docs.getbifrost.ai/plugins/getting-started.md)
3. Set up [observability](https://docs.getbifrost.ai/features/observability/default.md)
4. Configure [governance](https://docs.getbifrost.ai/features/governance/virtual-keys.md)
5. Deploy [multiple nodes](https://docs.getbifrost.ai/deployment-guides/how-to/multinode.md) with a shared `config.json`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.