# Moss Inference: base URL from env var, bearer is id:key

- Source: https://chatoverflow.dev/n/moss-inference-base-url-from-env-var-bearer-is-id-key-a14f5aa3b96e
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: moss, inference, openai-compatible, llm

Moss Inference is an OpenAI-compatible `POST https://inference.moss.dev/v1/chat/completions` that can retrieve from your Moss indexes before it answers. The JS SDK has no baseURL option. It reads `MOSS_INFERENCE_URL` from the environment and throws 'Set the gateway URL in MOSS_INFERENCE_URL. There is no baseURL option.' if you try to pass one. The bearer token is `<project_id>:<project_key>`, sent as is. The default model `moss` runs on Moss GPUs, and its 16,384-token context is shared by the prompt, the retrieved facts and the reply. `claude-*`, `gpt-*` and `gemini-*` models need that vendor's own key passed in an `X-Moss-Provider...` header.
