For the complete documentation index, see llms.txt. This page is also available as Markdown.

Mistral AI

Run Mistral AI vision models via OpenRouter.

Run Mistral AI vision-language models via OpenRouter.

Supported models: Mistral Large 4.

You can specify arbitrary text prompts or predefined ones. The block supports:

  • Open Prompt (unconstrained) - Use any prompt to generate a raw response

  • Text Recognition (OCR) (ocr) - Model recognizes text in the image

  • Visual Question Answering (visual-question-answering) - Model answers the question you submit in the prompt

  • Captioning (short) (caption) - Model provides a short description of the image

  • Captioning (detailed-caption) - Model provides a long description of the image

  • Single-Label Classification (classification) - Model classifies the image content as one of the provided classes

  • Multi-Label Classification (multi-label-classification) - Model classifies the image content as one or more of the provided classes

  • Unprompted Object Detection (object-detection) - Model detects and returns the bounding boxes for prominent objects in the image

  • Structured Output Generation (structured-answering) - Model returns a JSON response with the specified fields

Object detection asks for a JSON list of box_2d / label entries with [x_min, y_min, x_max, y_max] integer coordinates normalized to 0-999, the convention Mistral documents for its models, and decodes them on the same 0-999 grid.

The block decodes the model answer inside the block, adding predictions, error_status and inference_id outputs next to the raw output string:

  • predictions holds object detections for the object-detection task and a classification prediction for the classification / multi-label-classification tasks - the kind of the output follows the selected task type.

  • predictions is None for every other task (unconstrained prompting, OCR, captioning, structured answering, visual question answering).

  • error_status is True when the answer could not be decoded.

  • inference_id is generated per image.

Every request sends the image before the instruction text in a single user message. Mistral exposes extended reasoning as on or off only; the block disables it by default (the benchmarked configuration) and reasoning_effort set to high turns it on. max_tokens is unset by default: your own OpenRouter key gets the model's own output limit, the managed key gets the Roboflow proxy maximum of 16384. When you do cap it with reasoning on, leave room for a thinking trace of 8k-26k tokens.

By default the block uses the Roboflow-managed OpenRouter key and bills your Roboflow credits. Paste your own sk-or-... key to call OpenRouter directly.

Type identifier

Use the following identifier in step "type" field: roboflow_core/mistral_vlm@v1 to add the block as a step in your workflow.

Properties

Name

Type

Description

Refs

name

str

Enter a unique identifier for this step..

❌

api_key

str

OpenRouter API key. Defaults to Roboflow's managed key. Provide your own sk-or-... key to call OpenRouter directly without Roboflow billing..

✅

privacy_level

str

Provider privacy filter. Stricter levels reduce the pool of providers and may increase per-call cost on the managed key..

❌

max_tokens

int

Maximum number of tokens the model can generate in its response. If not specified, the model's own limit applies with your own OpenRouter key and 16384 (the Roboflow proxy maximum) with the managed key. When set with reasoning_effort high, keep it well above the reasoning trace (8k-26k tokens) or the answer comes back empty..

❌

temperature

float

Sampling temperature. Left unset by default so the provider default applies. Range 0.0-2.0..

✅

max_concurrent_requests

int

Number of concurrent requests for batches of images. If not given - block defaults to value configured globally in Workflows Execution Engine. Restrict if you hit rate limits..

❌

model_version

str

Mistral AI model to run..

✅

task_type

str

Task type to be performed by model. Value determines required parameters and output response..

❌

prompt

str

Text prompt to send to the model..

✅

output_structure

Dict[str, str]

Dictionary with structure of expected JSON response..

❌

classes

List[str]

List of classes to be used..

✅

reasoning_effort

str

Extended reasoning. Mistral exposes it as on or off only: none (the default) disables it, matching the configuration validated in the vlm-exam benches; high turns it on..

❌

The Refs column marks possibility to parametrise the property with dynamic values available in workflow runtime. See Bindings for more info.

Runtime compatibility

requires_internet - air-gapped / offline deployments : This block depends on a service that is not reachable from fully offline / air-gapped deployments.

Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds Mistral AI in version v1 has.

Input and output bindings
  • input

    • api_key (Union[ROBOFLOW_MANAGED_KEY, secret, string]): OpenRouter API key. Defaults to Roboflow's managed key. Provide your own sk-or-... key to call OpenRouter directly without Roboflow billing..

    • temperature (float): Sampling temperature. Left unset by default so the provider default applies. Range 0.0-2.0..

    • images (image): The image to infer on..

    • model_version (string): Mistral AI model to run..

    • prompt (string): Text prompt to send to the model..

    • classes (list_of_values): List of classes to be used..

  • output

Example JSON definition

Last updated

Was this helpful?