Skip to main content
vLLM workers use the same /run and /runsync operations as other Runpod Serverless endpoints. The difference is the input format: vLLM expects prompts, messages, and sampling parameters for text generation.

Input formats

Messages (chat models)

Use for instruction-tuned models. The worker automatically applies the model’s chat template.

Prompt (text completion)

Use for base models or when providing raw text without a chat template.
To apply the model’s chat template to a prompt, add "apply_chat_template": true.

Send requests

Submit a job that processes in the background. Poll /status/{job_id} for results.
For more on request operations, see Send requests to Serverless endpoints.

Streaming

Receive tokens as they’re generated instead of waiting for the complete response.
See streaming documentation for more details.

Sampling parameters

Add parameters to control how the model generates text. Include these in the sampling_params object in your request.

Error handling

Implement retry logic with exponential backoff to handle network issues, rate limits, and cold starts.