curl -s http://localhost:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{"model":"meta-llama/Llama-3.1-8B-Instruct","messages":[{"role":"user","content":"Hello"}]}'

Category: AI/ML Tooling

curl -s http://localhost:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{"model":"meta-llama/Llama-3.1-8B-Instruct","messages":[{"role":"user","content":"Hello"}]}'

Send a chat completion request

Calls vLLM's chat endpoint with one user message, exactly like OpenAI's API, and prints the assistant's reply as JSON. The messages array carries the whole conversation history on multi-turn calls. Add "stream":true to receive tokens incrementally instead of one big response.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.