K2 Think
AI-generatedSummary
Send a prompt to the K2 Think chat completions API and return the model’s answer for each input item. You can add a system message and configure token limits, reasoning cleanup, temperature, and output fields.
Inputs
- Model (required) — Model ID sent to the gateway; defaults to MBZUAI-IFM/K2-Think-v2.
- System Prompt — Optional system message placed before the user prompt.
- Prompt (required) — User message sent to the model. An empty prompt raises an error.
- Options — Max Completion Tokens (default 1024) and Reasoning Headroom (default 8000) are added together for the API’s max_completion_tokens setting. Temperature defaults to 0.7. Strip Think Reasoning defaults to true; when the response contains , the output keeps the text after its last occurrence. Put Output In Field sets the answer property name (default response). Include Full API Response adds the complete API response under raw.
Output shape
One n8n item per input item, each containing a JSON object with the answer under the configured output field.
If Include Full API Response is enabled, the JSON object also includes raw with the full API response. On failure, the node throws an error unless Continue On Fail is enabled; then it returns an item with an error field.