Configuration
Every setting of the gateway, its environment variable and its default.
On this page
- SYPNIA_GATEWAY_DATABASE_URL
- SYPNIA_GATEWAY_ROOT_TOKEN
- SYPNIA_GATEWAY_PUBLIC_URL
- SYPNIA_GATEWAY_PORT
- SYPNIA_GATEWAY_OPENROUTER_KEY
- SYPNIA_GATEWAY_BEDROCK_REGION
- SYPNIA_GATEWAY_PROVIDERS
- SYPNIA_GATEWAY_ZERO_RETENTION_ONLY
- SYPNIA_GATEWAY_PRICES
- SYPNIA_GATEWAY_CURRENCY
- SYPNIA_GATEWAY_STORAGE_URL
- SYPNIA_GATEWAY_CALL_RETENTION_DAYS
- SYPNIA_GATEWAY_OTLP_ENDPOINT
- SYPNIA_GATEWAY_DATA_JWKS_URL
- SYPNIA_GATEWAY_FIRST_TOKEN_TIMEOUT_S
- SYPNIA_GATEWAY_REQUEST_TIMEOUT_S
- SYPNIA_GATEWAY_MAX_BODY_MB
- SYPNIA_GATEWAY_AUTO_MIGRATE
- SYPNIA_GATEWAY_MCP
- SYPNIA_GATEWAY_LOG
Settings are environment variables. They start with SYPNIA_GATEWAY_, so they never mix with the Telemetry engine’s own SYPNIA_AI_ settings when both run side by side.
- Key
database_url- Type
- string
- Default
none (required)
Postgres 16 or newer.
- Key
root_token- Type
- string (secret)
- Default
none (required)
The token that can do everything: create projects, keys and routes. Keep it in a secret store.
- Key
public_url- Type
- URL
- Default
http://localhost:8095
The address your apps and agents use.
- Key
port- Type
- number
- Default
8095
The port the gateway listens on.
- Key
openrouter_key- Type
- string (secret)
- Default
empty
Your OpenRouter key. Empty: OpenRouter is not used.
- Key
bedrock_region- Type
- string
- Default
empty
The AWS region of the Bedrock models. Credentials come from the usual AWS chain (environment, profile, instance role); set
SYPNIA_GATEWAY_BEDROCK_ROLE_ARN to assume a role. Empty: Bedrock is not used.- Key
providers- Type
- string
- Default
empty
OpenAI-compatible endpoints, as
name=url separated by commas, with ;key=… when one needs a key: local=http://models:11434/v1. In routes they are <name>/<model>.- Key
zero_retention_only- Type
- boolean
- Default
true
Send OpenRouter requests only to endpoints that keep nothing and train on nothing. Endpoints of your own are not affected.
- Key
prices- Type
- path
- Default
the built-in table
A YAML price table, per model, per million tokens read, written and read from cache. The built-in table covers OpenRouter and Bedrock and is updated with every release.
- Key
currency- Type
- string
- Default
USD
The currency of the price table, used in usage.
- Key
storage_url- Type
- URL
- Default
empty
S3-compatible storage for kept questions and answers and the response cache. Empty: neither is available.
- Key
call_retention_days- Type
- number
- Default
90
How long call records are kept. Usage totals are kept regardless.
- Key
otlp_endpoint- Type
- URL
- Default
empty
Where spans go: Sypnia Telemetry, or any OpenTelemetry endpoint. Add headers with
SYPNIA_GATEWAY_OTLP_HEADERS (name=value, separated by commas).- Key
data_jwks_url- Type
- URL
- Default
empty
Your Sypnia Data engine’s published keys, to accept people’s sessions for browser tokens. Empty: only your server can create browser tokens.
- Key
first_token_timeout_s- Type
- number
- Default
20
How long to wait for a model’s first token before trying the next model.
- Key
request_timeout_s- Type
- number
- Default
600
The longest a call may take, streams included.
- Key
max_body_mb- Type
- number
- Default
25
The largest request body.
- Key
auto_migrate- Type
- boolean
- Default
false
Apply database migrations on start.
- Key
mcp- Type
- boolean
- Default
true
Serve the MCP server at
/mcp.- Key
log- Type
- string
- Default
info
error, warn, info or debug. No level ever logs what was asked or answered.