Serve LLMs with vLLM's OpenAI-compatible server

domain: docs.vllm.ai · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install vLLM: pip install vllm
  2. Start the server: vllm serve <model-id-or-local-path> --host 0.0.0.0 --port 8000 — the model-id can be a Hugging Face Hub identifier or a local directory; the server starts on port 8000 by default
  3. Optionally set a served model alias: add --served-model-name my-alias so existing OpenAI client code can reference the alias instead of the underlying model path
  4. Query the chat completions endpoint using any OpenAI-compatible client, pointing base_url to http://localhost:8000/v1 and api_key to any non-empty string (vLLM does not enforce the key by default)
  5. Tune throughput with --tensor-parallel-size to shard across multiple GPUs, --max-num-seqs to control concurrency, and --max-model-len to cap context length and reduce memory
  6. Check server health and loaded model metadata: GET http://localhost:8000/v1/models returns the list of served models and their context lengths

Known gotchas

Related routes

Serve an LLM through vLLM's OpenAI-compatible API server
docs.vllm.ai · 5 steps · unrated
Deploy an OpenAI-compatible LLM endpoint using Ray Serve LLM with LLMConfig
docs.ray.io · 6 steps · unrated
vLLM: serve a model behind an OpenAI-compatible HTTP API using `vllm serve`
ml-ops · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans