# ───────────────────────────────────────────────────────────────────────────── # MelodyMuse — server environment # # The Node server (`server.mjs`) reads these from `process.env`. It refuses to # start without `LLM_ENDPOINT` and `LLM_API_KEY`. Pass them in however you run # the server: # # • Bare-metal: LLM_ENDPOINT=… LLM_API_KEY=… node server.mjs # • Docker: -e LLM_ENDPOINT=… -e LLM_API_KEY=… # • docker-compose: put them in a `.env` file next to compose.yml # • Jannik-Cloud: AGE-encrypted `.env` generated by `generate-env.sh` # # Three things you set: # # LLM_ENDPOINT — base URL of an OpenAI-compatible /chat/completions route # LLM_API_KEY — provider secret (never sent to the browser) # LLM_MODEL — model name to send in each request # # Below the active config you'll find worked examples for several providers — # copy one of them into the active block above to switch. # ───────────────────────────────────────────────────────────────────────────── # ─── Active provider (uncomment ONE of the examples below to switch) ────────── LLM_ENDPOINT=https://api.minimax.io/v1 LLM_API_KEY= LLM_MODEL=MiniMax-M3 # ─── Server config ──────────────────────────────────────────────────────────── PORT=3000 CORS_ORIGIN=* # ╔═══════════════════════════════════════════════════════════════════════════╗ # ║ PROVIDER EXAMPLES — copy one block up to switch providers ║ # ╚═══════════════════════════════════════════════════════════════════════════╝ # ─── MiniMax (the default) ─────────────────────────────────────────────────── # https://api.minimax.io/v1 # Sign in at https://MiniMax.io to get a key. # # LLM_ENDPOINT=https://api.minimax.io/v1 # LLM_API_KEY=eyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # LLM_MODEL=MiniMax-M3 # ─── OpenAI ────────────────────────────────────────────────────────────────── # https://platform.openai.com/ # Keys look like: sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # Common models: gpt-4o, gpt-4o-mini, gpt-4-turbo, o1-mini, o1, … # # LLM_ENDPOINT=https://api.openai.com/v1 # LLM_API_KEY=sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # LLM_MODEL=gpt-4o-mini # ─── OpenRouter (Claude, Llama, Mistral, Gemini, …) ──────────────────────── # https://openrouter.ai/ # One OpenAI-compatible endpoint that fronts hundreds of models. Easiest way # to use Anthropic Claude, Meta Llama, Google Gemini, etc. without writing a # custom adapter. # # Keys look like: sk-or-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # Model names are namespaced: anthropic/claude-3.5-sonnet, openai/gpt-4o, # meta-llama/llama-3.1-405b-instruct, google/gemini-2.0-flash-exp, … # # LLM_ENDPOINT=https://openrouter.ai/api/v1 # LLM_API_KEY=sk-or-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # LLM_MODEL=anthropic/claude-3.5-sonnet # ─── Poe ───────────────────────────────────────────────────────────────────── # https://poe.com/ # Poe exposes an OpenAI-compatible API for the bots you've created in their # UI. Create a bot there first (free), then use its exact name as the model. # # LLM_ENDPOINT=https://api.poe.com/v1 # LLM_API_KEY=sk-poe-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # LLM_MODEL=Claude-3.5-Sonnet # ─── Anthropic Claude (DIRECT — needs a server adapter) ───────────────────── # https://console.anthropic.com/ # Anthropic's native API is NOT OpenAI-compatible — it lives at # POST /v1/messages with a different body shape (system message is a # top-level field, not a message) and a different response shape. # # MelodyMuse's server does not currently talk to Anthropic's native API # directly. Two options: # # 1. Use OpenRouter above — same model, OpenAI-compatible, zero code # changes. # 2. Add a small adapter to server.mjs that translates the request # to Anthropic's Messages API format. Roughly 30 lines of code. # # If you do add the adapter, the endpoint would be: # # LLM_ENDPOINT=https://api.anthropic.com # LLM_API_KEY=sk-ant-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # LLM_MODEL=claude-3-5-sonnet-latest # ───────────────────────────────────────────────────────────────────────────── # Vite dev environment (only used by `npm run dev`, not by the server) # ───────────────────────────────────────────────────────────────────────────── # Leave empty to use the dev proxy (see vite.config.ts). Set this if you want # the browser to talk to a server on a different origin. # VITE_API_BASE_URL=http://localhost:3000 # Video AI Links configuration (comma-separated Key=URL pairs) VIDEO_AI_LINKS="Kling AI=https://klingai.com,Luma=https://lumalabs.ai,Runway=https://runwayml.com"