vllm serve meta-llama/Llama-3.1-8B-Instruct --api-key sk-my-secret-key

Category: AI/ML Tooling

vllm serve meta-llama/Llama-3.1-8B-Instruct --api-key sk-my-secret-key

Require an API key for requests

Protects the OpenAI-compatible endpoints with a bearer token: clients must send "Authorization: Bearer sk-my-secret-key" or requests are rejected with 401. Choose a long random key, since anyone who has it can use the model. The same key also gates /health and metrics.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.