Deployment
Environment Variables

Environment Variables

When connecting to Xilos or self-hosting the platform, you may need to configure the following environment variables. This reference covers the variables users and integrators typically need.

Info: This page covers user-facing environment variables only. Internal backend configuration variables are not documented here. For self-hosted deployments, Xilos provides a full configuration reference as part of the deployment package.

Connecting to Xilos

When integrating your agents or applications with Xilos, configure these variables in your application environment:

VariableDescriptionExample
XILOS_API_KEYYour Xilos API key. Used for Bearer token authentication.xilos_live_abc123...
XILOS_API_BASE_URLThe base URL for the Xilos API.https://api.xilos.ai/api/v1
XILOS_VIRTUAL_KEYA virtual key with budget and rate limits. Use instead of the master key for per-team access.xilos_vkey_def456...

Connecting via the OpenAI SDK

If you're using the OpenAI SDK with Xilos, set these variables:

VariableDescriptionExample
OPENAI_API_KEYSet to your Xilos API key or virtual key.xilos_live_abc123...
OPENAI_BASE_URLSet to the Xilos API base URL.https://api.xilos.ai/api/v1
import os
from openai import OpenAI
 
client = OpenAI(
    api_key=os.environ["OPENAI_API_KEY"],
    base_url=os.environ["OPENAI_BASE_URL"]
)

LLM Provider Keys

When self-hosting or when Xilos needs to call LLM providers on your behalf, configure provider API keys:

VariableDescriptionRequired For
OPENAI_API_KEYOpenAI API key.OpenAI models (GPT-4o, etc.)
ANTHROPIC_API_KEYAnthropic API key.Anthropic models (Claude, etc.)
GOOGLE_API_KEYGoogle AI API key.Google models (Gemini, etc.)
AZURE_OPENAI_API_KEYAzure OpenAI API key.Azure OpenAI deployments
AZURE_OPENAI_ENDPOINTAzure OpenAI endpoint URL.Azure OpenAI deployments

Warning: Never commit API keys to version control. Use a secrets manager or environment variable injection in your deployment pipeline.

Self-Hosted Deployments

For Private Cloud and On-Premise deployments, you may need to configure:

VariableDescriptionExample
DATABASE_URLPostgreSQL connection string for the Xilos database.postgresql://user:pass@db.internal:5432/xilos
XILOS_HOSTThe host address the Xilos application binds to.0.0.0.0
XILOS_PORTThe port the Xilos application listens on.8000
XILOS_ENVEnvironment label — production, staging, or development.production
MODEL_REGISTRY_PATHLocal path for model weights (on-premise only)./data/models

Webhook Verification

When receiving webhooks from Xilos, use this variable in your webhook handler:

VariableDescriptionExample
XILOS_WEBHOOK_SECRETThe secret used to verify webhook signatures.whsec_abc123...
import os, hmac, hashlib
 
def verify_signature(raw_body: bytes, signature: str) -> bool:
    secret = os.environ["XILOS_WEBHOOK_SECRET"].encode()
    expected = hmac.new(secret, raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature)

SIEM Integration

When forwarding events to your SIEM, configure:

VariableDescriptionExample
SIEM_ENDPOINTYour SIEM ingestion URL.https://splunk.company.com:8088/services/collector
SIEM_TOKENAuthentication token for your SIEM endpoint.splunk_token_abc123...