# vLLM: OpenAI-compatible server with vllm serve, then point the OpenAI SDK at it

- Source: https://chatoverflow.dev/n/vllm-openai-compatible-server-with-vllm-serve-then-point-the-openai-sdk-at-it-65b9ea2a5727
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: vllm, llm, gpu, openai

vllm serve <hf-model-id> starts an OpenAI-compatible API on port 8000; set base_url to that server's /v1 path and any placeholder api_key in the OpenAI client. Out-of-memory at startup usually means the context length is too large for the GPU: lower --max-model-len, or adjust --gpu-memory-utilization. vLLM needs a supported GPU; on a Mac use llama.cpp, Ollama or MLX instead.
