[Docs] Warn that --api-key does not gate all endpoints (#51999)
Signed-off-by: Russell Bryant <rbryant@redhat.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Russell Bryant committed
Aug 12, 2026 at 11:16 UTC
8151f2ad4366e3c3770be015ba949905c0a99f0c
2 files changed
+20
-1
docs/serving/online_serving/openai_compatible_server.md
+11
@@ -2,6 +2,17 @@
2
3
vLLM provides an HTTP server that implements OpenAI's [Completions API](https://platform.openai.com/docs/api-reference/completions), [Chat API](https://platform.openai.com/docs/api-reference/chat), and more! This functionality lets you serve models and interact with them using an HTTP client.
4
5
+!!! warning "API key authentication does not protect every endpoint"
6
+ The `--api-key` option (or `VLLM_API_KEY` environment variable) only
7
+ authenticates requests to endpoints under the `/v1`, `/v2`, and
8
+ `/inference` path prefixes. Other endpoints on the same HTTP server are
9
+ **not** authenticated — most notably `/invocations`, which exposes the same
10
+ inference capabilities as the `/v1` endpoints. Do not rely on `--api-key`
11
+ alone to secure vLLM. See
12
+ [API Key Authentication Limitations](../../usage/security.md#api-key-authentication-limitations)
13
+ for the full list of protected and unprotected endpoints and recommended
14
+ hardening, such as deploying behind a reverse proxy.
15
+
16
## Supported APIs
17
18
We currently support the following OpenAI APIs:
vllm/entrypoints/openai/cli_args.py
+9
-1
@@ -282,7 +282,15 @@ class FrontendArgs(BaseFrontendArgs):
282
"""Allowed headers."""
283
api_key: list[str] | None = None
284
"""If provided, the server will require one of these keys to be presented in
285
- the header."""
285
+ the header.
286
+
287
+ Warning: this only authenticates endpoints under the `/v1`, `/v2`, and
288
+ `/inference` path prefixes. Other endpoints on the same server, including
289
+ `/invocations` (which exposes the same inference capabilities as `/v1`),
290
+ remain unauthenticated. Do not rely on `--api-key` alone to secure vLLM;
291
+ see
292
+ https://docs.vllm.ai/en/latest/usage/security.html#api-key-authentication-limitations
293
+ for what it does and does not protect."""
294
ssl_keyfile: str | None = None
295
"""The file path to the SSL key file."""
296
ssl_certfile: str | None = None