Mistral

App · AI Models · 15 actions

Ask Mistral to write or answer, read documents and pull data out of them, transcribe recordings, check text for harmful content, create embeddings, ask your Mistral agents and store files.

Actions

ActionWhat it does
Ask a Mistral agentSend a message to an agent you made in Mistral's console or Le Chat, and get its reply.
Ask MistralAsk Mistral to write, summarize or answer something, and get its reply.
Check text for harmful contentCheck text for harmful content, such as hate, violence, self-harm, personal data or attempts to trick an AI, and get back which kinds it contains, with a score for each.
Create embeddingsTurn texts into embeddings, lists of numbers that capture their meaning, for searching by meaning or finding similar items.
Delete a fileDelete a file stored with Mistral for good.
Extract data from a documentPull the fields you name, such as an invoice's number, date and total, out of a PDF, Word or PowerPoint file, or a photo or scan.
Extract text from a documentRead a PDF, Word or PowerPoint file, or a photo or scan, with Mistral OCR and get its text back as Markdown, page by page, with tables and headings kept.
Get a file's detailsGet the name, size, type and use of a file stored with Mistral.
Get a file's download linkGet a temporary link to download a file stored with Mistral.
Get a model's detailsGet what one Mistral model can do, how much text it takes in, and when Mistral plans to retire it.
List agentsList the agents made in your Mistral workspace.
List filesList the files stored with Mistral, newest first.
List modelsList the Mistral models you can use, including your fine-tuned ones, with what each can do, how much text it takes in, and when Mistral plans to retire it.
Transcribe audioTurn a recording, such as a call, meeting or voice note, into text with Mistral's Voxtral, optionally labeled by speaker and timestamped.
Upload a fileStore a file with Mistral, from an upload, a file an earlier step produced, or a link.

Ask a Mistral agent

Send a message to an agent you made in Mistral's console or Le Chat, and get its reply. The agent answers with its own model, instructions and tools.

Inputs

Agentagent_idtextRequired
The agent to ask: pick it, or give its ID.
MessagemessagetextRequired
What to ask or tell the agent.
Maximum response lengthmax_tokensnumber
The most tokens the reply may use. Leave blank for the agent's own setting.From 1 to 128000.

Outputs

agent_idtext
The agent that replied.
finish_reasontext
Why the reply ended: 'stop' when it was complete, 'length' when it hit the maximum length.
modeltext
The model the agent used.
response_texttext
The agent's reply.
total_tokensnumber
Tokens the message and reply used together.
Example output
{
  "agent_id": "ag_0198a3c2f1d47e8b9c0a1b2c3d4e5f60",
  "finish_reason": "stop",
  "model": "mistral-medium-2508",
  "response_text": "Your order ships within two working days.",
  "total_tokens": 64
}

Ask Mistral

Ask Mistral to write, summarize or answer something, and get its reply.

Inputs

PromptprompttextRequired
The message or question to send to Mistral.
System instructionssystem_prompttext
Optional instructions that set the model's role, tone, or output format for this request (e.g. 'You are a concise support agent. Reply in two sentences.').
Modelmodeltext
Which Mistral model to use. Defaults to mistral-large-latest. Mistral's free plan leaves out Mistral Large, Medium and Small; Ministral and Codestral work on it.One of: mistral-large-latest (Mistral Large (most capable, recommended)), mistral-medium-latest (Mistral Medium (balanced quality and cost)), mistral-small-latest (Mistral Small (fast and low cost)), ministral-8b-latest (Ministral 8B (smallest and cheapest)), codestral-latest (Codestral (writing and explaining code)). Default: mistral-large-latest.
Maximum response lengthmax_tokensnumber
Maximum number of tokens Mistral may generate in its response. Raise it for longer replies. Leave blank to use the model's own default.
Creativity (temperature)temperaturenumber
How varied the response should be, from 0 (focused and predictable) to 1.5 (more creative). Mistral recommends staying between 0 and 0.7. Leave blank to use the model's own default.

Outputs

completion_tokensnumber
Number of tokens the response used.
finish_reasontext
Why the model stopped generating, e.g. 'stop' when it finished or 'length' when it hit the response limit.
modeltext
The Mistral model that produced the response.
prompt_tokensnumber
Number of tokens the prompt used.
response_texttext
The text Mistral generated for your prompt.
total_tokensnumber
Total tokens billed for this request.
Example output
{
  "completion_tokens": 121,
  "finish_reason": "stop",
  "model": "mistral-large-latest",
  "prompt_tokens": 24,
  "response_text": "Here is a thoughtful response to your question about artificial intelligence and its applications in modern software development.",
  "total_tokens": 145
}

Check text for harmful content

Check text for harmful content, such as hate, violence, self-harm, personal data or attempts to trick an AI, and get back which kinds it contains, with a score for each.

Inputs

TexttexttextRequired
The text to check, such as a customer message, a review or an AI-written reply.
In reply toin_reply_totext
Optional: the message the text answers, such as the question an AI-written reply responds to. Mistral then judges the text in that context, so a reply can be flagged for what it helps with, not just what it says.

Outputs

categoriesobject
Every category, true when the text falls into it.
category_scoresobject
Every category's score, from 0 (unlikely) to 1 (likely).
flaggedtrue/false
Whether the text falls into any category.
flagged_categorieslist
The categories the text falls into, like 'pii' or 'violence_and_threats'.
highest_categorytext
The category with the highest score.
highest_scorenumber
That category's score, from 0 to 1.
modeltext
The moderation model that checked the text.
Example output
{
  "categories": {
    "criminal": false,
    "dangerous": false,
    "financial": false,
    "hate_and_discrimination": false,
    "health": false,
    "jailbreaking": false,
    "law": false,
    "pii": true,
    "selfharm": false,
    "sexual": false,
    "violence_and_threats": false
  },
  "category_scores": {
    "criminal": 0.0021,
    "dangerous": 0.0002,
    "financial": 0.0315,
    "hate_and_discrimination": 0.0011,
    "health": 0.0007,
    "jailbreaking": 0.0002,
    "law": 0.0009,
    "pii": 0.91,
    "selfharm": 0.0001,
    "sexual": 0.0004,
    "violence_and_threats": 0.0003
  },
  "flagged": true,
  "flagged_categories": [
    "pii"
  ],
  "highest_category": "pii",
  "highest_score": 0.91,
  "model": "mistral-moderation-2603"
}

Create embeddings

Turn texts into embeddings, lists of numbers that capture their meaning, for searching by meaning or finding similar items. Store them in a vector database.

Inputs

TextstextslistRequired
The texts to embed, one per entry. Each comes back as one vector, in the same order.
Modelmodeltext
Which embedding model to use. Defaults to mistral-embed.One of: mistral-embed (Mistral Embed (text, recommended)), codestral-embed (Codestral Embed (code)). Default: mistral-embed.
Dimensionsdimensionsnumber
How many numbers each vector has, for a vector database that expects a set size. Only Codestral Embed can change it, up to 3,072. Leave blank for the model's own size.

Outputs

countnumber
How many vectors there are.
dimensionsnumber
How many numbers each vector has.
embeddinglist
The first text's vector.
embeddingslist
One vector per text, in the same order.
modeltext
The embedding model used.
total_tokensnumber
Tokens billed for the request.
Example output
{
  "count": 2,
  "dimensions": 3,
  "embedding": [
    0.012,
    -0.043,
    0.031
  ],
  "embeddings": [
    [
      0.012,
      -0.043,
      0.031
    ],
    [
      0.018,
      -0.039,
      0.027
    ]
  ],
  "model": "mistral-embed",
  "total_tokens": 12
}

Delete a file

Delete a file stored with Mistral for good.

Inputs

Filefile_idtextRequired
The file stored with Mistral: pick it, or give its ID, such as one 'Upload a file' returned.

Outputs

deletedtrue/false
True once the file is gone.
file_idtext
The ID of the deleted file.
Example output
{
  "deleted": true,
  "file_id": "3b6d45eb-e30b-416f-8019-f47e2e93d930"
}

Extract data from a document

Pull the fields you name, such as an invoice's number, date and total, out of a PDF, Word or PowerPoint file, or a photo or scan. A field the document doesn't contain comes back empty rather than guessed.

Inputs

DocumentdocumenttextRequired
The document to read: upload a file, pick one an earlier step produced, or paste a link to one. PDFs, Word and PowerPoint files, and images such as photos or scans all work, up to 50 MB and 1,000 pages.
Fields to fillfieldslistRequired
The pieces of information you want back, one per entry. Add what each means after a colon to steer it: 'total: the amount due, with its currency'.
Instructionsinstructionstext
Optional guidance on how to fill the fields, such as 'Write dates as YYYY-MM-DD' or 'Give amounts without a currency symbol'.
Pagespagestext
Which pages to read, counting from 1, such as '1-3, 5'. Leave blank to read every page.

Outputs

dataobject
Each field you named, with its value from the document, or empty when the document doesn't contain it.
found_fieldslist
The fields that were found.
missing_fieldslist
The fields the document doesn't contain.
modeltext
The Mistral OCR model that read the document.
page_countnumber
How many pages were read.
texttext
The text of every page read, as Markdown, from the same pass.
Example output
{
  "data": {
    "invoice date": "2026-09-14",
    "invoice number": "INV-2041",
    "purchase order": null,
    "total": "$1,200.00"
  },
  "found_fields": [
    "invoice number",
    "invoice date",
    "total"
  ],
  "missing_fields": [
    "purchase order"
  ],
  "model": "mistral-ocr-4-1",
  "page_count": 1,
  "text": "# Invoice INV-2041\n\nDate: 2026-09-14\nBilled to: Acme Corp\n\n| Item | Amount |\n| --- | --- |\n| Consulting | $1,200.00 |\n\n**Total due: $1,200.00**"
}

Extract text from a document

Read a PDF, Word or PowerPoint file, or a photo or scan, with Mistral OCR and get its text back as Markdown, page by page, with tables and headings kept.

Inputs

DocumentdocumenttextRequired
The document to read: upload a file, pick one an earlier step produced, or paste a link to one. PDFs, Word and PowerPoint files, and images such as photos or scans all work, up to 50 MB and 1,000 pages.
Pagespagestext
Which pages to read, counting from 1, such as '1-3, 5'. Leave blank to read every page.
Leave out page headers and footersremove_headers_and_footerstrue/false
Drop the text repeated at the top and bottom of each page, such as running titles and page numbers, so it doesn't interrupt the body text.Default: false.

Outputs

modeltext
The Mistral OCR model that read the document.
page_countnumber
How many pages were read.
pageslist
Each page read, in order.
texttext
The text of every page read, as Markdown, with a blank line between pages.
Example output
{
  "model": "mistral-ocr-4-1",
  "page_count": 1,
  "pages": [
    {
      "page_number": 1,
      "text": "# Invoice INV-2041\n\nDate: 2026-09-14\nBilled to: Acme Corp\n\n| Item | Amount |\n| --- | --- |\n| Consulting | $1,200.00 |\n\n**Total due: $1,200.00**"
    }
  ],
  "text": "# Invoice INV-2041\n\nDate: 2026-09-14\nBilled to: Acme Corp\n\n| Item | Amount |\n| --- | --- |\n| Consulting | $1,200.00 |\n\n**Total due: $1,200.00**"
}

Get a file's details

Get the name, size, type and use of a file stored with Mistral.

Inputs

Filefile_idtextRequired
The file stored with Mistral: pick it, or give its ID, such as one 'Upload a file' returned.

Outputs

created_attext
When it was uploaded (ISO 8601).
file_idtext
The file's ID.
filenametext
The file's name.
mime_typetext
The kind of file, such as application/pdf, or empty.
purposetext
What Mistral uses it for: 'ocr' (reading documents), 'batch' or 'fine-tune'.
size_bytesnumber
The file's size in bytes.
Example output
{
  "created_at": "2026-11-30T09:00:00Z",
  "file_id": "3b6d45eb-e30b-416f-8019-f47e2e93d930",
  "filename": "invoice.pdf",
  "mime_type": "application/pdf",
  "purpose": "ocr",
  "size_bytes": 48213
}

Get a temporary link to download a file stored with Mistral. Anyone with the link can download the file until it expires.

Inputs

Filefile_idtextRequired
The file stored with Mistral: pick it, or give its ID, such as one 'Upload a file' returned.
Link lasts (hours)expiry_hoursnumber
How many hours the link works for, from 1 to 168. Leave blank for 24.From 1 to 168.

Outputs

expiry_hoursnumber
How many hours the link works for.
file_idtext
The file's ID.
urltext
The link to download the file from.
Example output
{
  "expiry_hours": 24,
  "file_id": "3b6d45eb-e30b-416f-8019-f47e2e93d930",
  "url": "https://mistralaifilesapiprodswe.blob.core.windows.net/fine-tune/invoice.pdf?se=2026-12-01&sig=abc"
}

Get a model's details

Get what one Mistral model can do, how much text it takes in, and when Mistral plans to retire it.

Inputs

Modelmodel_idtextRequired
The model's ID, such as `mistral-large-latest`, or one 'List models' returned.

Outputs

aliaseslist
Other ids for the same model, such as its '-latest' alias.
capabilitieslist
What it can do, like 'chat', 'vision' or 'ocr'.
deprecation_datetext
When Mistral plans to retire it, or empty.
descriptiontext
What the model is for.
idtext
The id to use the model by.
max_context_lengthnumber
How many tokens it can take in at once.
nametext
The model's name.
replacement_modeltext
The model Mistral suggests moving to, or empty.
typetext
'base' for Mistral's own models, 'fine-tuned' for yours.
Example output
{
  "aliases": [
    "mistral-large-2512"
  ],
  "capabilities": [
    "chat",
    "function_calling",
    "vision"
  ],
  "deprecation_date": "",
  "description": "Official mistral-large-2512 Mistral AI model",
  "id": "mistral-large-latest",
  "max_context_length": 262144,
  "name": "mistral-large-2512",
  "replacement_model": "",
  "type": "base"
}

List agents

List the agents made in your Mistral workspace.

Inputs

Limitlimitnumber
The most to list, up to 100. Leave blank for 50.From 1 to 100.

Outputs

agentslist
The agents.
countnumber
How many agents were listed.
Example output
{
  "agents": [
    {
      "agent_id": "ag_0198a3c2f1d47e8b9c0a1b2c3d4e5f60",
      "description": "Answers questions about orders.",
      "model": "mistral-medium-latest",
      "name": "Customer support"
    }
  ],
  "count": 1
}

List files

List the files stored with Mistral, newest first.

Inputs

Used forpurposetext
Only list files stored for this use.One of: any (Anything), ocr (Reading documents), batch (Batch jobs), fine-tune (Fine-tuning). Default: any.
Searchsearchtext
Only list files whose name contains this text.
Limitlimitnumber
The most to list, up to 100. Leave blank for 50.From 1 to 100.

Outputs

countnumber
How many files were listed.
fileslist
The files, newest first.
Example output
{
  "count": 1,
  "files": [
    {
      "created_at": "2026-11-30T09:00:00Z",
      "file_id": "3b6d45eb-e30b-416f-8019-f47e2e93d930",
      "filename": "invoice.pdf",
      "mime_type": "application/pdf",
      "purpose": "ocr",
      "size_bytes": 48213
    }
  ]
}

List models

List the Mistral models you can use, including your fine-tuned ones, with what each can do, how much text it takes in, and when Mistral plans to retire it.

Inputs

Can docapabilitytext
Only list models that can do this, such as read images or transcribe audio. Leave on 'Anything' for every model.One of: all (Anything), chat, vision (Reads images), reasoning (Reasons step by step), function_calling (Calls tools), code_completion (Completes code), ocr (Reads documents (OCR)), audio (Understands audio in a chat), audio_transcription (Transcribes audio), speech (Reads text aloud), and 3 more. Default: all.

Outputs

countnumber
How many models were listed.
model_idslist
Every model's id, in the same order.
modelslist
Each model, sorted by id.
Example output
{
  "count": 1,
  "model_ids": [
    "mistral-ocr-latest"
  ],
  "models": [
    {
      "aliases": [
        "mistral-ocr-4-1"
      ],
      "capabilities": [
        "ocr"
      ],
      "deprecation_date": "",
      "description": "Official mistral-ocr-4-1 Mistral AI model",
      "id": "mistral-ocr-latest",
      "max_context_length": 16384,
      "name": "mistral-ocr-4-1",
      "replacement_model": "",
      "type": "base"
    }
  ]
}

Transcribe audio

Turn a recording, such as a call, meeting or voice note, into text with Mistral's Voxtral, optionally labeled by speaker and timestamped.

Inputs

AudioaudiotextRequired
The recording to transcribe: upload a file, pick one an earlier step produced, or paste a link to one. Recordings of up to about three hours work.
Languagelanguagetext
The language being spoken. Leave it on automatic detection unless the recording is short or noisy enough to fool it.One of: auto (Detect automatically), en (English), zh (Chinese), hi (Hindi), es (Spanish), ar (Arabic), fr (French), pt (Portuguese), ru (Russian), de (German), and 4 more. Default: auto.
Identify speakersidentify_speakerstrue/false
Label who said what, so the transcript reads as a conversation. Mistral then times the transcript by segment.Default: false.
Timestampstimestampstext
Note when each part was said, by segment (a phrase or sentence) or by word. With speakers identified, only segments can be timed.One of: none, segment (For each segment), word (For each word). Default: none.
Words to listen forwords_to_listen_forlist
Names, jargon or product terms the recording uses, so they're spelled right: one per entry, up to 100 words. A phrase is listened for word by word.

Outputs

duration_secondsnumber
How long the recording is, in seconds.
languagetext
The language spoken, as a code like 'en', when Mistral reports it or you set it.
modeltext
The Voxtral model that transcribed it.
segmentslist
The transcript in timed stretches (segments, or single words with word timestamps), each with who said it when speakers were identified. Filled when you ask for speakers or timestamps.
speakerslist
Each speaker, in the order they first spoke.
texttext
Everything that was said.
transcript_by_speakertext
The transcript with one line per turn, like 'speaker_1: …', when speakers were identified.
Example output
{
  "duration_seconds": 7,
  "language": "en",
  "model": "voxtral-mini-2602",
  "segments": [
    {
      "end": 3.1,
      "speaker": "speaker_1",
      "start": 0.4,
      "text": "Thanks for calling Acme support, this is Dana."
    },
    {
      "end": 6.2,
      "speaker": "speaker_2",
      "start": 3.6,
      "text": "Hi Dana, my invoice shows the wrong total."
    }
  ],
  "speakers": [
    "speaker_1",
    "speaker_2"
  ],
  "text": "Thanks for calling Acme support, this is Dana. Hi Dana, my invoice shows the wrong total.",
  "transcript_by_speaker": "speaker_1: Thanks for calling Acme support, this is Dana.\nspeaker_2: Hi Dana, my invoice shows the wrong total."
}

Upload a file

Store a file with Mistral, from an upload, a file an earlier step produced, or a link.

Inputs

FilefiletextRequired
The file: upload it, pick one an earlier step produced, or paste a link to it. Up to 100 MB.
Used forpurposetext
What Mistral will use the file for.One of: ocr (Reading documents), batch (Batch jobs), fine-tune (Fine-tuning). Default: ocr.

Outputs

created_attext
When it was uploaded (ISO 8601).
file_idtext
The file's ID.
filenametext
The file's name.
mime_typetext
The kind of file, such as application/pdf, or empty.
purposetext
What Mistral uses it for: 'ocr' (reading documents), 'batch' or 'fine-tune'.
size_bytesnumber
The file's size in bytes.
Example output
{
  "created_at": "2026-11-30T09:00:00Z",
  "file_id": "3b6d45eb-e30b-416f-8019-f47e2e93d930",
  "filename": "invoice.pdf",
  "mime_type": "application/pdf",
  "purpose": "ocr",
  "size_bytes": 48213
}

On this page