Chat Completion

mistral.chat_completion
ActionAI & modelsconnection required

Calls the Mistral AI API with the connection's credentials.

Send a prompt or a full message list to a Mistral chat model and return the assistant's answer together with the token usage.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
Mistral AI
Secret shape
{"api_key": "…"} — a Mistral API key
Config it needs
base_url, default_model
Resolved by
config.connection_id, else node.connection_id

Configuration

13 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
model
Chat model to call, e.g. mistral-large-latest or mistral-small-latest.
stringYes——mistral-large-latest
prompt
The user message, when you are not supplying a full message list.
stringNo——Summarise this support ticket in two sentences.
system
Optional system instruction prepended to the prompt.
stringNo———
messages
A full conversation as [{role, content}] objects; overrides prompt/system.
arrayNo—array of object—
temperature
Sampling temperature. Lower is more deterministic; Mistral recommends staying at or below 0.7 for most tasks.
numberNo—0–1.5—
max_tokens
Upper bound on the tokens generated in the answer.
numberNo—≥ 1—
top_p
Nucleus-sampling mass to consider. Use this or temperature, not both.
numberNo—0–1—
json_mode
Ask the model to reply with a single JSON object (response_format json_object).
booleanNofalse——
tools
Tool definitions in Mistral's function-calling format, as JSON.
arrayNo—array of object—
tool_choice
How the model may use the supplied tools.
stringNo—one of "auto", "any", "none", "required"—
stop
Stop sequences: generation ends when one of these appears.
arrayNo—array of string—
random_seed
Seed for sampling, so repeated calls with identical input agree.
numberNo—≥ 0—
safe_prompt
Prepend Mistral's built-in safety system prompt to the conversation.
booleanNofalse——
  • At least one of prompt, messages must be set.

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "json_mode": false,
  "model": "mistral-large-latest",
  "prompt": "Summarise this support ticket in two sentences.",
  "safe_prompt": false
}

Output

One shape.

result

FieldTypeExample
id
Mistral's id for this completion.
string—
model
The model that actually answered.
string—
content
The assistant message text.
string—
role
Always 'assistant' for a completion.
string—
finish_reason
Why generation stopped, e.g. stop or length.
string—
tool_calls
Tool calls the model asked for, when tools were supplied.
array—
prompt_tokens
Tokens consumed by the prompt.
number—
completion_tokens
Tokens generated in the answer.
number—
total_tokens
Prompt plus completion tokens.
number—
choices
The raw choices array, for the n>1 or logprobs cases.
array—
{
  "choices": [],
  "completion_tokens": 0,
  "content": "",
  "finish_reason": "",
  "id": "",
  "model": "",
  "prompt_tokens": 0,
  "role": "",
  "tool_calls": [],
  "total_tokens": 0
}

See Chat Completion run in a workflow.

In a technical demo we add the Mistral AI connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.