Actions8
- Chat Actions
- Completion Actions
- Embedding Actions
- Image Actions
- Audio Actions
- Model Actions
- Moderation Actions
Completion → Text Completion
AI-generatedSummary
Sends a text completion request to the LiteLLM gateway using a model and prompt, with optional sampling controls. Returns the gateway response as one n8n item.
Inputs
- Model (required) — Model identifier for the completion request; must not be empty or whitespace.
- Prompt (required) — Text prompt to complete; must not be empty or whitespace.
- Temperature — Sampling temperature, UI range 0–2; defaults to 1 and is sent when defined.
- Max Tokens — Maximum tokens to generate, UI minimum 1; defaults to 256 and is sent when defined.
- Top P — Nucleus sampling value, UI range 0–1; defaults to 1 and is sent when defined.
- Stop — Comma-separated stop sequences; when non-empty, the operation splits this value on commas, trims each sequence, and sends them as an array.
- Seed — Seed for deterministic sampling; defaults to 0 and is sent when defined.
Output shape
A single n8n item containing the LiteLLM completion response in its json field.
Makes an authenticated POST request to the configured gateway's /completions endpoint. The response fields depend on the gateway/API. Validation or request errors fail the operation unless Continue On Fail is enabled, in which case an item with error and statusCode fields is returned.