Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Mistral AI

connector.mistral · connector.mistral_trigger · ai

Chat, embeddings, document OCR, moderation, files and batch jobs on La Plateforme.

Vendor API documentation: https://docs.mistral.ai/api/

Authentication

MethodCredential kindAuth kindFieldsTest request
API keymistral/api_keybearertoken (secret)yes

Actions

Node type connector.mistral. Choose a resource and an operation; each operation has its own parameters.

Chat

OperationIDEffectPaginatedCassette tests
Send chat messageschat.completewrites2

Send chat messages

Operation chat.complete. Generates the next assistant message for a conversation.

NameTypeDefaultRequiredShown whenDescription
modelresource_locator"mistral-small-latest"yesValues from lookup models.
messagesfixed_collectionyes
messages.roleoptions"user"One of system, user, assistant.
messages.contentstringyes
optionscollection
options.temperaturenumber
options.top_pnumberTop P.
options.max_tokensnumber
options.random_seednumberSeed.
options.stopstringStop sequences. Comma-separated.
options.presence_penaltynumber
options.frequency_penaltynumber
options.nnumberNumber of completions.
options.safe_promptbooleanfalsePrepend safety prompt.
options.response_formatoptionsOne of text, json_object.
options.json_schemajsonJSON schema. Forces the reply to match this schema. Overrides Response format.
simplifybooleantrueSimplify output. Return the reply text and usage only.

Embedding

OperationIDEffectPaginatedCassette tests
Create embeddingsembedding.createreads2

Create embeddings

Operation embedding.create. Returns one item per input text with its vector.

NameTypeDefaultRequiredShown whenDescription
modelresource_locator"mistral-embed"yesValues from lookup models.
input_modeoptions"single"Input. One of single, batch.
inputstringyesinput_mode = singleText.
inputsjsonyesinput_mode = batchTexts. JSON array of strings.
output_dimensionnumberOnly for models that support reduced dimensions.
output_dtypeoptions"float"Output data type. One of float, int8, uint8, binary, ubinary.

Document

Optical character recognition for PDFs, slides and images.

OperationIDEffectPaginatedCassette tests
Extract text from a URLdocument.ocrreads2
Extract text from a filedocument.ocr_binarywrites1

Extract text from a URL

Operation document.ocr. Runs OCR on a public document or image URL and returns Markdown.

NameTypeDefaultRequiredShown whenDescription
modelresource_locator"mistral-ocr-latest"yesValues from lookup models.
document_typeoptions"document_url"One of document_url, image_url.
urlstringyesURL.
optionscollection
options.pagesstringZero-based pages to process, for example 0,2-4.
options.include_image_base64booleanfalseInclude images.
options.image_limitnumberMax images.
options.image_min_sizenumberMin image size (px).
options.table_formatoptionsOne of markdown, html.
options.extract_headerbooleanfalseSeparate headers.
options.extract_footerbooleanfalseSeparate footers.
options.annotation_schemajsonDocument annotation schema. JSON Schema for structured data extracted from the whole document.
options.annotation_promptstringDocument annotation prompt.
output_modeoptions"document"Output. One of document, pages.

Extract text from a file

Operation document.ocr_binary. Uploads a binary file for OCR, runs OCR on it, and deletes the upload afterwards.

NameTypeDefaultRequiredShown whenDescription
modelresource_locator"mistral-ocr-latest"yesValues from lookup models.
binary_propertybinary_property"data"yesInput binary field.
optionscollection
options.pagesstringZero-based pages to process, for example 0,2-4.
options.include_image_base64booleanfalseInclude images.
options.image_limitnumberMax images.
options.image_min_sizenumberMin image size (px).
options.table_formatoptionsOne of markdown, html.
options.extract_headerbooleanfalseSeparate headers.
options.extract_footerbooleanfalseSeparate footers.
options.annotation_schemajsonDocument annotation schema. JSON Schema for structured data extracted from the whole document.
options.annotation_promptstringDocument annotation prompt.
output_modeoptions"document"Output. One of document, pages.
delete_afterbooleantrueDelete uploaded file.

Moderation

OperationIDEffectPaginatedCassette tests
Moderate textmoderation.classifyreads1

Moderate text

Operation moderation.classify. Scores text against Mistral’s moderation categories.

NameTypeDefaultRequiredShown whenDescription
modelresource_locator"mistral-moderation-latest"yesValues from lookup models.
inputstringyesText.

File

OperationIDEffectPaginatedCassette tests
Upload a filefile.uploadwrites1
List filesfile.listreadsyes1
Get a filefile.getreads1
Delete a filefile.deletewrites1
Download a filefile.downloadreads1
Get a download linkfile.get_signed_urlreads1

Upload a file

Operation file.upload.

NameTypeDefaultRequiredShown whenDescription
binary_propertybinary_property"data"yesInput binary field.
purposeoptions"ocr"yesOne of ocr, batch, fine-tune.
visibilityoptions"workspace"One of workspace, user.

List files

Operation file.list.

NameTypeDefaultRequiredShown whenDescription
return_allbooleanfalse
limitnumber50return_all = false
purposeoptionsOne of ocr, batch, fine-tune.
searchstringName contains.

Get a file

Operation file.get.

NameTypeDefaultRequiredShown whenDescription
file_idresource_locatoryesFile. Values from lookup files.

Delete a file

Operation file.delete.

NameTypeDefaultRequiredShown whenDescription
file_idresource_locatoryesFile. Values from lookup files.

Download a file

Operation file.download.

NameTypeDefaultRequiredShown whenDescription
file_idresource_locatoryesFile. Values from lookup files.
output_propertystring"data"Output binary field.

Operation file.get_signed_url.

NameTypeDefaultRequiredShown whenDescription
file_idresource_locatoryesFile. Values from lookup files.
expiry_hoursnumber24Expires after (hours). 1 to 168.

Model

OperationIDEffectPaginatedCassette tests
List modelsmodel.listreads1
Get a modelmodel.getreads1

List models

Operation model.list.

This node has no parameters.

Get a model

Operation model.get.

NameTypeDefaultRequiredShown whenDescription
modelresource_locatoryesValues from lookup models.

Batch job

Run many requests asynchronously at reduced cost.

OperationIDEffectPaginatedCassette tests
Create a batch jobbatch_job.createwrites1
Get a batch jobbatch_job.getreads1
List batch jobsbatch_job.listreadsyes1
Cancel a batch jobbatch_job.cancelwrites1

Create a batch job

Operation batch_job.create.

NameTypeDefaultRequiredShown whenDescription
modelresource_locatoryesValues from lookup models.
endpointoptions"/v1/chat/completions"yesOne of /v1/chat/completions, /v1/embeddings, /v1/fim/completions, /v1/moderations, /v1/chat/moderations, /v1/ocr, /v1/classifications, /v1/chat/classifications, /v1/conversations, /v1/audio/transcriptions.
sourceoptions"file"Requests from. One of file, inline.
input_fileresource_locatoryessource = fileValues from lookup files.
requestsjsonyessource = inlineJSON array of {custom_id, body} objects.
metadatajson
timeout_hoursnumber24Timeout (hours).

Get a batch job

Operation batch_job.get.

NameTypeDefaultRequiredShown whenDescription
job_idresource_locatoryesBatch job. Values from lookup batch_jobs.

List batch jobs

Operation batch_job.list.

NameTypeDefaultRequiredShown whenDescription
return_allbooleanfalse
limitnumber50return_all = false
statusmulti_optionsOne of QUEUED, RUNNING, SUCCESS, FAILED, TIMEOUT_EXCEEDED, CANCELLATION_REQUESTED, CANCELLED.
modelstring

Cancel a batch job

Operation batch_job.cancel.

NameTypeDefaultRequiredShown whenDescription
job_idresource_locatoryesBatch job. Values from lookup batch_jobs.

Lookups

Lookups fill dropdowns and resource pickers in the editor from the vendor API.

LookupDepends onSearchDescription
modelsclient-side{{ item.description }}
filesserver-side
batch_jobsclient-side

Triggers

Node type connector.mistral_trigger.

TriggerIDKindDeduplication keySignatureWebhook registrationCassette tests
On batch job finishedbatch_job_finishedpoll{{ item.id }}0

Trigger: On batch job finished

Emits a batch job once it reaches a final state.

NameTypeDefaultRequiredShown whenDescription
statusesmulti_options["SUCCESS","FAILED","TIMEOUT_EXCEEDED","CANCELLED"]Final states. One of SUCCESS, FAILED, TIMEOUT_EXCEEDED, CANCELLED.

Import

Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.

Source typeVersion rangeStatusFixtures
n8n-nodes-base.mistralAi>=1 <2unverified

Provenance

Written from the vendor’s documentation: