Skip to content

Configuration

Every setting of the gateway, its environment variable and its default.

Applies to Engine
View as Markdown
On this page
  1. SYPNIA_GATEWAY_DATABASE_URL
  2. SYPNIA_GATEWAY_ROOT_TOKEN
  3. SYPNIA_GATEWAY_PUBLIC_URL
  4. SYPNIA_GATEWAY_PORT
  5. SYPNIA_GATEWAY_OPENROUTER_KEY
  6. SYPNIA_GATEWAY_BEDROCK_REGION
  7. SYPNIA_GATEWAY_PROVIDERS
  8. SYPNIA_GATEWAY_ZERO_RETENTION_ONLY
  9. SYPNIA_GATEWAY_PRICES
  10. SYPNIA_GATEWAY_CURRENCY
  11. SYPNIA_GATEWAY_STORAGE_URL
  12. SYPNIA_GATEWAY_CALL_RETENTION_DAYS
  13. SYPNIA_GATEWAY_OTLP_ENDPOINT
  14. SYPNIA_GATEWAY_DATA_JWKS_URL
  15. SYPNIA_GATEWAY_FIRST_TOKEN_TIMEOUT_S
  16. SYPNIA_GATEWAY_REQUEST_TIMEOUT_S
  17. SYPNIA_GATEWAY_MAX_BODY_MB
  18. SYPNIA_GATEWAY_AUTO_MIGRATE
  19. SYPNIA_GATEWAY_MCP
  20. 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.

SYPNIA_GATEWAY_DATABASE_URL

Engine
Key
database_url
Type
string
Default
none (required)
Postgres 16 or newer.

SYPNIA_GATEWAY_ROOT_TOKEN

Engine
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.

SYPNIA_GATEWAY_PUBLIC_URL

Engine
Key
public_url
Type
URL
Default
http://localhost:8095
The address your apps and agents use.

SYPNIA_GATEWAY_PORT

Engine
Key
port
Type
number
Default
8095
The port the gateway listens on.

SYPNIA_GATEWAY_OPENROUTER_KEY

Engine
Key
openrouter_key
Type
string (secret)
Default
empty
Your OpenRouter key. Empty: OpenRouter is not used.

SYPNIA_GATEWAY_BEDROCK_REGION

Engine
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.

SYPNIA_GATEWAY_PROVIDERS

Engine
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>.

SYPNIA_GATEWAY_ZERO_RETENTION_ONLY

Engine
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.

SYPNIA_GATEWAY_PRICES

Engine
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.

SYPNIA_GATEWAY_CURRENCY

Engine
Key
currency
Type
string
Default
USD
The currency of the price table, used in usage.

SYPNIA_GATEWAY_STORAGE_URL

Engine
Key
storage_url
Type
URL
Default
empty
S3-compatible storage for kept questions and answers and the response cache. Empty: neither is available.

SYPNIA_GATEWAY_CALL_RETENTION_DAYS

Engine
Key
call_retention_days
Type
number
Default
90
How long call records are kept. Usage totals are kept regardless.

SYPNIA_GATEWAY_OTLP_ENDPOINT

Engine
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).

SYPNIA_GATEWAY_DATA_JWKS_URL

Engine
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.

SYPNIA_GATEWAY_FIRST_TOKEN_TIMEOUT_S

Engine
Key
first_token_timeout_s
Type
number
Default
20
How long to wait for a model’s first token before trying the next model.

SYPNIA_GATEWAY_REQUEST_TIMEOUT_S

Engine
Key
request_timeout_s
Type
number
Default
600
The longest a call may take, streams included.

SYPNIA_GATEWAY_MAX_BODY_MB

Engine
Key
max_body_mb
Type
number
Default
25
The largest request body.

SYPNIA_GATEWAY_AUTO_MIGRATE

Engine
Key
auto_migrate
Type
boolean
Default
false
Apply database migrations on start.

SYPNIA_GATEWAY_MCP

Engine
Key
mcp
Type
boolean
Default
true
Serve the MCP server at /mcp.

SYPNIA_GATEWAY_LOG

Engine
Key
log
Type
string
Default
info
error, warn, info or debug. No level ever logs what was asked or answered.
  1. SYPNIA_GATEWAY_DATABASE_URL
  2. SYPNIA_GATEWAY_ROOT_TOKEN
  3. SYPNIA_GATEWAY_PUBLIC_URL
  4. SYPNIA_GATEWAY_PORT
  5. SYPNIA_GATEWAY_OPENROUTER_KEY
  6. SYPNIA_GATEWAY_BEDROCK_REGION
  7. SYPNIA_GATEWAY_PROVIDERS
  8. SYPNIA_GATEWAY_ZERO_RETENTION_ONLY
  9. SYPNIA_GATEWAY_PRICES
  10. SYPNIA_GATEWAY_CURRENCY
  11. SYPNIA_GATEWAY_STORAGE_URL
  12. SYPNIA_GATEWAY_CALL_RETENTION_DAYS
  13. SYPNIA_GATEWAY_OTLP_ENDPOINT
  14. SYPNIA_GATEWAY_DATA_JWKS_URL
  15. SYPNIA_GATEWAY_FIRST_TOKEN_TIMEOUT_S
  16. SYPNIA_GATEWAY_REQUEST_TIMEOUT_S
  17. SYPNIA_GATEWAY_MAX_BODY_MB
  18. SYPNIA_GATEWAY_AUTO_MIGRATE
  19. SYPNIA_GATEWAY_MCP
  20. SYPNIA_GATEWAY_LOG

    Search pages, sections and terms