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
| Method | Credential kind | Auth kind | Fields | Test request |
|---|---|---|---|---|
| API key | mistral/api_key | bearer | token (secret) | yes |
Actions
Node type connector.mistral. Choose a resource and an operation; each operation has its own parameters.
Chat
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Send chat messages | chat.complete | writes | 2 |
Send chat messages
Operation chat.complete. Generates the next assistant message for a conversation.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | "mistral-small-latest" | yes | Values from lookup models. | |
messages | fixed_collection | yes | |||
messages.role | options | "user" | One of system, user, assistant. | ||
messages.content | string | yes | |||
options | collection | ||||
options.temperature | number | ||||
options.top_p | number | Top P. | |||
options.max_tokens | number | ||||
options.random_seed | number | Seed. | |||
options.stop | string | Stop sequences. Comma-separated. | |||
options.presence_penalty | number | ||||
options.frequency_penalty | number | ||||
options.n | number | Number of completions. | |||
options.safe_prompt | boolean | false | Prepend safety prompt. | ||
options.response_format | options | One of text, json_object. | |||
options.json_schema | json | JSON schema. Forces the reply to match this schema. Overrides Response format. | |||
simplify | boolean | true | Simplify output. Return the reply text and usage only. |
Embedding
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Create embeddings | embedding.create | reads | 2 |
Create embeddings
Operation embedding.create. Returns one item per input text with its vector.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | "mistral-embed" | yes | Values from lookup models. | |
input_mode | options | "single" | Input. One of single, batch. | ||
input | string | yes | input_mode = single | Text. | |
inputs | json | yes | input_mode = batch | Texts. JSON array of strings. | |
output_dimension | number | Only for models that support reduced dimensions. | |||
output_dtype | options | "float" | Output data type. One of float, int8, uint8, binary, ubinary. |
Document
Optical character recognition for PDFs, slides and images.
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Extract text from a URL | document.ocr | reads | 2 | |
| Extract text from a file | document.ocr_binary | writes | 1 |
Extract text from a URL
Operation document.ocr. Runs OCR on a public document or image URL and returns Markdown.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | "mistral-ocr-latest" | yes | Values from lookup models. | |
document_type | options | "document_url" | One of document_url, image_url. | ||
url | string | yes | URL. | ||
options | collection | ||||
options.pages | string | Zero-based pages to process, for example 0,2-4. | |||
options.include_image_base64 | boolean | false | Include images. | ||
options.image_limit | number | Max images. | |||
options.image_min_size | number | Min image size (px). | |||
options.table_format | options | One of markdown, html. | |||
options.extract_header | boolean | false | Separate headers. | ||
options.extract_footer | boolean | false | Separate footers. | ||
options.annotation_schema | json | Document annotation schema. JSON Schema for structured data extracted from the whole document. | |||
options.annotation_prompt | string | Document annotation prompt. | |||
output_mode | options | "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.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | "mistral-ocr-latest" | yes | Values from lookup models. | |
binary_property | binary_property | "data" | yes | Input binary field. | |
options | collection | ||||
options.pages | string | Zero-based pages to process, for example 0,2-4. | |||
options.include_image_base64 | boolean | false | Include images. | ||
options.image_limit | number | Max images. | |||
options.image_min_size | number | Min image size (px). | |||
options.table_format | options | One of markdown, html. | |||
options.extract_header | boolean | false | Separate headers. | ||
options.extract_footer | boolean | false | Separate footers. | ||
options.annotation_schema | json | Document annotation schema. JSON Schema for structured data extracted from the whole document. | |||
options.annotation_prompt | string | Document annotation prompt. | |||
output_mode | options | "document" | Output. One of document, pages. | ||
delete_after | boolean | true | Delete uploaded file. |
Moderation
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Moderate text | moderation.classify | reads | 1 |
Moderate text
Operation moderation.classify. Scores text against Mistral’s moderation categories.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | "mistral-moderation-latest" | yes | Values from lookup models. | |
input | string | yes | Text. |
File
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Upload a file | file.upload | writes | 1 | |
| List files | file.list | reads | yes | 1 |
| Get a file | file.get | reads | 1 | |
| Delete a file | file.delete | writes | 1 | |
| Download a file | file.download | reads | 1 | |
| Get a download link | file.get_signed_url | reads | 1 |
Upload a file
Operation file.upload.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
binary_property | binary_property | "data" | yes | Input binary field. | |
purpose | options | "ocr" | yes | One of ocr, batch, fine-tune. | |
visibility | options | "workspace" | One of workspace, user. |
List files
Operation file.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
return_all | boolean | false | |||
limit | number | 50 | return_all = false | ||
purpose | options | One of ocr, batch, fine-tune. | |||
search | string | Name contains. |
Get a file
Operation file.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
file_id | resource_locator | yes | File. Values from lookup files. |
Delete a file
Operation file.delete.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
file_id | resource_locator | yes | File. Values from lookup files. |
Download a file
Operation file.download.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
file_id | resource_locator | yes | File. Values from lookup files. | ||
output_property | string | "data" | Output binary field. |
Get a download link
Operation file.get_signed_url.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
file_id | resource_locator | yes | File. Values from lookup files. | ||
expiry_hours | number | 24 | Expires after (hours). 1 to 168. |
Model
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| List models | model.list | reads | 1 | |
| Get a model | model.get | reads | 1 |
List models
Operation model.list.
This node has no parameters.
Get a model
Operation model.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | yes | Values from lookup models. |
Batch job
Run many requests asynchronously at reduced cost.
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Create a batch job | batch_job.create | writes | 1 | |
| Get a batch job | batch_job.get | reads | 1 | |
| List batch jobs | batch_job.list | reads | yes | 1 |
| Cancel a batch job | batch_job.cancel | writes | 1 |
Create a batch job
Operation batch_job.create.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | yes | Values from lookup models. | ||
endpoint | options | "/v1/chat/completions" | yes | One 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. | |
source | options | "file" | Requests from. One of file, inline. | ||
input_file | resource_locator | yes | source = file | Values from lookup files. | |
requests | json | yes | source = inline | JSON array of {custom_id, body} objects. | |
metadata | json | ||||
timeout_hours | number | 24 | Timeout (hours). |
Get a batch job
Operation batch_job.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
job_id | resource_locator | yes | Batch job. Values from lookup batch_jobs. |
List batch jobs
Operation batch_job.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
return_all | boolean | false | |||
limit | number | 50 | return_all = false | ||
status | multi_options | One of QUEUED, RUNNING, SUCCESS, FAILED, TIMEOUT_EXCEEDED, CANCELLATION_REQUESTED, CANCELLED. | |||
model | string |
Cancel a batch job
Operation batch_job.cancel.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
job_id | resource_locator | yes | Batch job. Values from lookup batch_jobs. |
Lookups
Lookups fill dropdowns and resource pickers in the editor from the vendor API.
| Lookup | Depends on | Search | Description |
|---|---|---|---|
models | client-side | {{ item.description }} | |
files | server-side | ||
batch_jobs | client-side |
Triggers
Node type connector.mistral_trigger.
| Trigger | ID | Kind | Deduplication key | Signature | Webhook registration | Cassette tests |
|---|---|---|---|---|---|---|
| On batch job finished | batch_job_finished | poll | {{ item.id }} | 0 |
Trigger: On batch job finished
Emits a batch job once it reaches a final state.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
statuses | multi_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 type | Version range | Status | Fixtures |
|---|---|---|---|
n8n-nodes-base.mistralAi | >=1 <2 | unverified |
Provenance
Written from the vendor’s documentation:
- https://docs.mistral.ai/api/
- https://docs.mistral.ai/api/endpoint/chat
- https://docs.mistral.ai/api/endpoint/embeddings
- https://docs.mistral.ai/api/endpoint/ocr
- https://docs.mistral.ai/api/endpoint/files
- https://docs.mistral.ai/api/endpoint/models
- https://docs.mistral.ai/api/endpoint/classifiers
- https://docs.mistral.ai/api/endpoint/batch