Templates / vLLM (OpenAI-compatible API)
CUDA 12.8SSHJupyterAPIText generation
vLLM (OpenAI-compatible API)
High-throughput LLM serving. Loads any Hugging Face model and exposes an OpenAI-compatible API protected by your rental's API key.
What's inside
- ✓vLLM OpenAI-compatible server on port 8000
- ✓API key = your rental's app token
- ✓Model downloaded from Hugging Face on first start (set HF_TOKEN for gated models)
- ✓Logs: /var/log/onstart.log
How you connect
| Access | Where | Auth |
|---|---|---|
| SSH (root) | ssh -p <port> root@clearlayer.ca | Your SSH key |
| JupyterLab | https://r<id>-<random>.gpu.clearlayer.ca | Token in the link |
| OpenAI-compatible API (port 8000) | https://r<id>-<random>-app.gpu.clearlayer.ca |
Authorization: Bearer <app token> |
Environment variables
| Variable | Default |
|---|---|
MODEL_ID | Qwen/Qwen3-8B |
VLLM_ARGS | --max-model-len 16384 --gpu-memory-utilization 0.90 |
APP_TOKEN | random per rental |
HF_TOKEN | optional, for gated Hugging Face models |
Models from the model library set these for you.
Quick start
curl
curl https://r12-abcd1234-app.gpu.clearlayer.ca/v1/chat/completions \
-H "Authorization: Bearer <app-token>" \
-H "Content-Type: application/json" \
-d '{"model": "Qwen/Qwen3-8B", "messages": [{"role": "user", "content": "Hello!"}]}'Python
from openai import OpenAI
client = OpenAI(base_url="https://r12-abcd1234-app.gpu.clearlayer.ca/v1", api_key="<app-token>")
resp = client.chat.completions.create(
model="Qwen/Qwen3-8B",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)