// guide
Serve an OpenAI-compatible API with vLLM
vLLM's OpenAI-compatible server is an HTTP server that implements OpenAI's Completions API, Chat API and more, so an OpenAI client talks to your own model by changing its base_url to the vLLM server's /v1 address.
Updated
Published
On this page
What is the vLLM OpenAI-compatible server?
vllm serve MODEL starts vLLM's HTTP server. The vLLM documentation (external site) lists these endpoints:
| Path | Purpose |
|---|---|
/v1/completions | Completions API |
/v1/chat/completions | Chat Completions API |
/v1/chat/completions/batch | Chat Completions batch API |
/v1/responses | Responses API |
/v1/embeddings | Embeddings API |
/v1/audio/transcriptions | Transcriptions API |
/v1/audio/translations | Translation API |
The documented start command with an API key is vllm serve NousResearch/Meta-Llama-3-8B-Instruct --dtype auto --api-key token-abc123.
How do I start the server and call it from my machine?
Start the server on the instance with
vllm serve MODELand the--api-keyoption.On NVIDIA Brev, forward the server's port to your own machine with
brev port-forward my-instance --port 8000:8000.Create an
OpenAIclient whosebase_urlis the server's/v1address on port8000of your own machine.Set the client's
api_keyto the key given to--api-key.Send requests to one of the endpoints in the table above, such as
/v1/chat/completions.
The vLLM documentation's Python example creates an OpenAI client whose base_url is the server's /v1 address on port 8000 and whose api_key is the key given to --api-key.
The Brev CLI connectivity reference (external site) describes brev port-forward as forwarding a TCP port from your instance to your own machine over SSH; its example is brev port-forward my-instance --port 8888:8888.
For a vLLM server on port 8000, the same form is --port 8000:8000. With the port forwarded, port 8000 on your machine reaches the server on the instance, and the client's base_url points at that port's /v1 path.
How do I set a vLLM API key and call it?
Start the server with
--api-key YOUR_KEY, or set theVLLM_API_KEYenvironment variable instead.In the OpenAI client, set
api_keyto the same value andbase_urlto the server's/v1address.Without the key, requests to
/v1endpoints are refused; with it, they are served.
Pick your own long random value for the key, keep it out of your code, and pass it to the client from an environment variable. The option and the variable are documented in the vLLM OpenAI-compatible server (external site) page.
Which vllm-openai Docker image do our Launchables use?
As of 2026-11-28, our vLLM Launchables pin the image vllm/vllm-openai:v0.33.0.
| Item | Open WebUI + vLLM Launchable | Open Notebook on Nemotron Launchable |
|---|---|---|
| Image | vllm/vllm-openai:v0.33.0 | vllm/vllm-openai:v0.33.0, pinned by digest |
| GPU | 1x NVIDIA L40S 48GB | 1x NVIDIA L40S 48GB |
| Instance type | AWS g6e.xlarge | AWS g6e.xlarge |
| Price | about $2.25/hr (Brev deploy page, 2026-12-03) | about $2.26/hr (Brev console, 2026-11-19) |
| Default model | Qwen/Qwen3-8B | nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-FP8 |
| API port | 8000, bound to the instance | 8000, bound to the instance |
What did our test of a vLLM API show?
Our fresh-deploy test of the Open Notebook on Nemotron Launchable on AWS g6e.xlarge, 2026-11-15, called its vLLM chat API on the instance:
/v1/modelslisted the chat model 28.0 minutes after create.A chat completion asking for "OK" returned
"content":"OK"withfinish_reasonstop.After a stop and start, the model was listed and chat answered again about 9.3 minutes after start.
How do I keep the API private?
Three controls work together:
- Bind the API to the instance. In the Open WebUI + vLLM Launchable, the vLLM API is bound to the instance itself and is not exposed publicly; you reach it through the port forward.
- Set an API key. The
--api-keyoption, or theVLLM_API_KEYenvironment variable, authenticates requests to endpoints under the/v1,/v2,/inferenceand/coherepath prefixes. - Choose how a port is exposed. On NVIDIA Brev, Secure Links protect HTTP services with Brev authentication, and TCP/UDP ports are exposed to all IP addresses or only to the deployer's IP address (NVIDIA Brev Launchables (external site)).
How do I run it on NVIDIA Brev?
Deploy the Open WebUI + vLLM Launchable. It runs vLLM v0.33.0 (image vllm/vllm-openai:v0.33.0) with Qwen/Qwen3-8B on one NVIDIA L40S 48GB GPU, and Open WebUI as a chat interface on the same API. The deploy steps are in how to deploy a Launchable on NVIDIA Brev.
Next steps for a vLLM API on NVIDIA Brev:
Run Open WebUI with vLLM on a cloud GPU explains how Open WebUI connects to the vLLM API.
Serve NVIDIA Nemotron with vLLM calls a Nemotron checkpoint through the same OpenAI-compatible API.
NVIDIA L4 vs L40S for LLM inference compares GPU memory and model fit.
Ollama vs vLLM compares a single-user model server with one built for many concurrent users.
Stop, start and delete an NVIDIA Brev instance ends GPU charges when you are done.
What if vLLM will not start because of GPU memory?
If the server stops at startup with ValueError: No available memory for the cache blocks, read what we saw with two vLLM servers on a shared GPU. It covers two vLLM servers on one GPU, the --gpu-memory-utilization share and the settings the vLLM docs name.
Built your own vLLM stack? Can NightKeeper package it as a Launchable?
NightKeeper packages your repository as an NVIDIA Brev Launchable, proves it on a fresh GPU and keeps it running. Point NightKeeper at your repository, review the pull request whose GitHub Actions workflow smoke-tests the stack on a fresh NVIDIA Brev instance, then create the Launchable in the Brev console with the settings NightKeeper provides. Your Brev API key stays in your repository's GitHub secrets. NightKeeper never sees it.
Sources: where do these facts come from?
vLLM OpenAI-compatible server (external site), read 2026-11-16
Brev CLI connectivity reference (external site), read 2026-11-16
NVIDIA Brev Launchables (external site), read 2026-11-16
Launchable records for Open WebUI + vLLM and Open Notebook on Nemotron (images, GPU, prices), read 2026-11-28
9owls fresh-deploy test record for the Open Notebook on Nemotron Launchable, 2026-11-15
How was this page made?
9owls published this page. The server, endpoint and API key facts come from the vLLM documentation, and the port-forward facts from the NVIDIA Brev documentation, read on the dates above. The image, GPU and price rows come from our Launchable records, each with its own date. The test values come from our fresh-deploy test on 2026-11-15. Found an error? Tell us on the company page.
What changed on 2026-11-28: added the API key steps, the pinned image and hardware table, our recorded test values and the link to the cache-blocks error page.