Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Using any-llm-gateway

any-llm-gateway is an OpenAI-compatible proxy server that provides production-grade cost controls, budget management, and usage tracking across multiple LLM providers (OpenAI, Anthropic, Google, etc.).

Setting up any-llm-gateway

  1. Installation: Install and configure the gateway following the Quick Start guide. This involves creating a directory, downloading the docker-compose.yml, and setting up your config.yml.

  2. Generate a master key:

python -c "import secrets; print(secrets.token_urlsafe(32))"
  1. Configuration: Configure your providers in config.yml with your API keys and model pricing.

  2. Start the gateway: Navigate you your gateway directory and run:

docker compose up -d
  1. Verify the gateway is running:

curl http://localhost:8000/health
# Expected: {"status": "healthy"}

Configuring jupyterlite-ai to use any-llm-gateway

Configure the Generic provider (OpenAI-compatible) with the following settings: