Skip to main content
Technical Preview

Overview

A client-mode connector for a curated slice of the Mistral AI API, which uses OpenAI-compatible request shapes. Use it for IIoT / edge alarm text, operator notes and scanned shop-floor documents: Default BASE_ADDRESS is https://api.mistral.ai (no trailing slash). Topics use ai/mistral-ai/<object>/<verb>. See the base guide: REST API Connectors.
Auth: Authorization: Bearer &lt;Mistral API key&gt;. Prefer Hub secrets (GET SECRET "MISTRAL_API_KEY") mapped into MQTT api_token. Never commit real keys.
Request body: Mistral rejects unknown fields in request bodies. The connector sends {value.json.body} as the JSON body, so publish {"api_token": "...", "body": { ... }}. The body has the same shape as the OpenAI chat and embeddings requests.
Factory live smoke is blocked until a Mistral API key is supplied. Point secrets / MQTT JSON at your workspace before production use.

EU data residency

  • api.mistral.ai is Mistral’s global endpoint. Mistral does not commit to an inference location for it.
  • For inference processed in the EU, set BASE_ADDRESS to https://api.eu.mistral.ai (data centers in EU and EFTA countries). https://api.us.mistral.ai is the US option.
  • Regional inference costs 1.1× list price, serves only models hosted in that region and does not offer Agents, Batch or Files. Call GetModels on the regional host before you send production traffic.
  • Account data such as API keys, billing and usage analytics is not regional. See Regional inference and the Mistral Help Center.

Basic Syntax

Full deployable file: MistralAiRestApi.lot in the factory package (8 events, no ADD METADATA).

Topics

Example Payloads

Alarm triage on ai/mistral-ai/chat/completions/post:
Embeddings on ai/mistral-ai/embeddings/post:
OCR of a delivery note on ai/mistral-ai/ocr/post:
Model lookup on ai/mistral-ai/models/get:

Configuration

  1. Set BASE_ADDRESS to https://api.mistral.ai, or to https://api.eu.mistral.ai when inference must stay in the EU.
  2. Store a Mistral API key in Hub secrets (MISTRAL_API_KEY); map it into MQTT api_token.
  3. For alarm classification: publish to ai/mistral-ai/chat/completions/post with response_format json_object or json_schema.
  4. For semantic search / similarity: publish to ai/mistral-ai/embeddings/post with mistral-embed.
  5. For scanned documents or camera snapshots: publish to ai/mistral-ai/ocr/post with a document_url or an image_url data URL.
  6. Keep "stream": false (the default). Streamed replies are not split into MQTT messages.
  7. Use GetModels as a cheap auth smoke before production workloads.

References

Last modified on October 21, 2026