# Freeway — copy to `.env` and fill in whatever you have. # # Nothing here is required. Every provider you leave blank renders in the # dashboard as a card telling you which variable to set and where to get a key. # # A single variable may hold SEVERAL comma-separated keys — that is the key # pool. Quota is tracked per key, so a 429 on one benches only that one and the # request retries on the next. # MISTRAL_API_KEY=key-one,key-two,key-three # --------------------------------------------------------------------------- # Gateway # --------------------------------------------------------------------------- # Virtual keys your apps present. Real provider keys never leave the gateway. # EMPTY = open, and the gateway then REFUSES to bind anything but 127.0.0.1. # Generate one with: node -e "console.log('fw-'+crypto.randomUUID())" FREEWAY_KEYS= # FULL ACCESS. Everything under /api/*: reading stored conversations, writing # provider credentials, spending quota. The keys above grant INFERENCE ONLY. # Required to use the dashboard on anything but localhost — without it, /api/* # is refused entirely on a non-loopback bind. # node -e "console.log('fw-admin-'+crypto.randomUUID())" FREEWAY_ADMIN_KEY= # Browser origins allowed to call this gateway, comma-separated. Empty (the # default) sends no CORS headers at all, which is correct for the bundled # dashboard since it is same-origin. "*" is rejected: it would let any page you # happen to visit drive your gateway from your own browser. # FREEWAY_CORS_ORIGINS=https://myapp.example,https://staging.myapp.example FREEWAY_CORS_ORIGINS= HOST=127.0.0.1 PORT=8787 # priority | round-robin | least-used | fastest FREEWAY_STRATEGY=priority # Paths. Docker compose sets these; you rarely need them locally. # FREEWAY_ROOT=/app # FREEWAY_PROVIDERS=/app/providers # FREEWAY_DATA=/app/data # FREEWAY_CONFIG=/app/freeway.config.json # --------------------------------------------------------------------------- # Providers — verified free tiers # --------------------------------------------------------------------------- # Mistral — https://console.mistral.ai/api-keys # Free "Experiment" plan. Phone verification, no card. ~1B tokens/month. # Note: Mistral no longer publishes exact rps/tpm, so providers/mistral.json # carries nulls and the gateway learns the real numbers from response headers. MISTRAL_API_KEY= MISTRAL_API_KEY_2= # Cloudflare Workers AI — https://dash.cloudflare.com/profile/api-tokens # 10,000 neurons/day free. BOTH variables are required: the account id is # interpolated into the base URL. CLOUDFLARE_ACCOUNT_ID= CLOUDFLARE_API_TOKEN= # --------------------------------------------------------------------------- # Providers — bundled, waiting for a key # --------------------------------------------------------------------------- # Groq — https://console.groq.com/keys ~30 rpm / 14.4k rpd, very fast GROQ_API_KEY= GROQ_API_KEY_2= # Cerebras — https://cloud.cerebras.ai/platform ~1M tokens/day, no card CEREBRAS_API_KEY= # Google AI Studio — https://aistudio.google.com/apikey # ~15 rpm / 1500 rpd on Flash. Native multimodal. # NOTE: the free tier is not available in the EU, UK or Switzerland. GOOGLE_AI_API_KEY= # OpenRouter — https://openrouter.ai/keys only :free models cost nothing OPENROUTER_API_KEY= # GitHub Models — https://github.com/settings/tokens needs the models:read scope GITHUB_MODELS_TOKEN= # Together AI — https://api.together.xyz/settings/api-keys only -Free models TOGETHER_API_KEY= # Hugging Face — https://huggingface.co/settings/tokens small free credits HF_TOKEN= # NVIDIA NIM — https://build.nvidia.com/ free credits, not a free tier NVIDIA_API_KEY= # Scaleway — https://console.scaleway.com/iam/api-keys EU-hosted (Paris) SCALEWAY_API_KEY= # Ollama — your own machine, no key. Set the host to enable it. # OLLAMA_HOST=http://127.0.0.1:11434