# Vllm bench serve + Bearer API key + HTTPS

**URL:** <https://discuss.vllm.ai/t/vllm-bench-serve-bearer-api-key-https/1322>\
**Category:** Benchmarking\
**Created:** [August 7, 2025, 8:33am UTC](https://discuss.vllm.ai/t/vllm-bench-serve-bearer-api-key-https/1322 "2025-08-07T08:33:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jklinkenberg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/jklinkenberg/32/577_2.png) [@jklinkenberg](https://discuss.vllm.ai/u/jklinkenberg)\
**Post date:** [August 7, 2025, 8:33am UTC](https://discuss.vllm.ai/t/vllm-bench-serve-bearer-api-key-https/1322/1 "2025-08-07T08:33:06Z")

</div>

I’m currently trying to run benchmarks against our LLM proxy that will forward requests to the vLLM backend instance.

As the proxy requires the specification of a Bearer API key, how can I specify an API Key that will then be integrated into the request by vllm bench serve?

Further, is it sufficient to specify port 443? Because the LLM proxy is only accessible via HTTPS.

Thanks.

---

<div class="post-metadata">

**Author:** ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)\
**Post date:** [August 7, 2025, 8:33am UTC](https://discuss.vllm.ai/t/vllm-bench-serve-bearer-api-key-https/1322/2 "2025-08-07T08:33:30Z")

</div>

You can specify an API key for `vllm bench serve` by setting the `OPENAI_API_KEY` environment variable before running the benchmark command. This will ensure the API key is included as a Bearer token in the Authorization header of each request. For example:

```bash
OPENAI_API_KEY=your_api_key vllm bench serve --backend openai-chat --base-url https://your-llm-proxy:443/v1 ...

```

This approach is confirmed in [this discussion](https://github.com/vllm-project/vllm/pull/11384) and is the recommended method in the vLLM community.

Specifying port 443 is sufficient for HTTPS, as it is the standard port for secure HTTP traffic. Just ensure your `--base-url` uses `https://` and the correct port, e.g., `https://your-llm-proxy:443/v1` ([docs reference](https://docs.vllm.ai/en/latest/api/vllm/entrypoints/cli/benchmark/serve.html)).

Would you like more detail or a full example command?

Sources:

- [GitHub PR: Adding API Key to the benchmark](https://github.com/vllm-project/vllm/pull/11384)
- [docs reference](https://docs.vllm.ai/en/latest/api/vllm/entrypoints/cli/benchmark/serve.html)
