Mistral AI API's chat completion endpoint in ComfyUI
This node provides a straightforward way to interact with the Mistral AI API for single-turn chat completion requests. It's designed for quickly sending prompts to Mistral's language models and receiving a single response.
The node doesn't introduce any hidden prompt additions. You have complete control over the instruction and the request sent to the API.
For Pixtral models, you can input images directly. The image will be downscaled to have a longest side of 1024 pixels before being processed.
A companion node lets you easily prepend content from files within a /prompts
folder to your main prompt. This makes it convenient to save and load your own instruction sets for consistent prompting strategies. Keep in mind that no formatting validation is performed on the template content.
The node provides the raw text response from the API, allowing you to parse and utilize the output as needed in your workflow. For instance, you can request both plain text and structured information like tag prompts in a single request.
API-key.txt
within the node's directory for it to function correctly.For visual clarity in the examples, the following nodes are used to display the output: