Skip to main content

Mistral AI

Mistral AI provides advanced large language model capabilities through their API, enabling businesses to leverage cutting-edge AI technology for natural language processing, text generation, and intelligent automation tasks with high-performance language models.

Mistral AI icon

Power end-to-end data operations for your Mistral AI API with Nexla. Our bi-directional Mistral AI connector is purpose-built for Mistral AI, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Mistral AI or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Mistral AI workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating a Mistral AI credential, you need to obtain your API key, model name, and base URL from your Mistral AI account. Mistral AI uses API key authentication for all API requests, with the API key sent in the Authorization header with the Bearer prefix.

To obtain your Mistral AI API credentials, follow these steps:

  1. Sign in to your Mistral AI account using your administrator credentials, or create a new account at Mistral AI.

  2. Navigate to your account dashboard or settings section.

  3. Look for the API Keys or API section in your account settings.

  4. If you don't have an API key yet, click Generate API Key or Create API Key to create a new API key.

  5. Copy the API key immediately after it's generated, as it may not be accessible again after you navigate away from the page.

  6. Identify the model name you want to use (e.g., mistral-small-latest, mistral-medium-latest, mistral-large-latest). Model names are available in the Mistral AI documentation and may vary based on your account type and available models.

  7. Identify the base URL for the LLM API endpoint. The base URL is typically https://api.mistral.ai/v1/chat/completions for chat completion endpoints, but may vary based on your specific use case and endpoint requirements.

  8. Store all credentials securely, as you will need them to configure your Nexla credential. The API key is sensitive information and should be kept confidential.

The API key is sent in the Authorization header with the Bearer prefix (e.g., Authorization: Bearer {api_key}) for all API requests to the Mistral AI API. The model name determines which Mistral AI model will be used for processing requests. The base URL specifies the endpoint for LLM API calls. The API key authenticates your requests and grants access to Mistral AI resources based on your account permissions. If your API key is compromised, you should immediately revoke it in your Mistral AI account settings and generate a new one. For detailed information about obtaining API keys, API authentication, available models, and API endpoints, refer to the Mistral AI API documentation.

Authenticate

Credentials required

FieldRequiredSecretDescription
API Key ValueYesYesYour API KEY for this model
Model NameYesNoThe name of the model you want to use (Ex.: mistral-small-latest).
Base Url for the LLM CallYesNoProvide the full endpoint to the LLM call on Mistral ex : https://api.mistral.ai/v1/chat/completions

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – Mistral AI

MistralAICred.png
  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  2. Mistral AI uses API key authentication for all API requests. The API key is sent in the Authorization header with the Bearer prefix to authenticate API requests to the Mistral AI API. Enter your Mistral AI API key in the API Key Value field. This is the API key you obtained from your Mistral AI account settings (API Keys section). The API key is sensitive information and must be kept confidential.

  3. Enter the model name in the Model Name field. This should be the name of the Mistral AI model you want to use (e.g., mistral-small-latest, mistral-medium-latest, mistral-large-latest). The model name determines which Mistral AI model will be used for processing requests. Model names are available in the Mistral AI documentation and may vary based on your account type and available models.

  4. Enter the base URL for the LLM API endpoint in the Base Url for the LLM Call field. This should be the complete endpoint URL for the LLM API call on Mistral AI (e.g., https://api.mistral.ai/v1/chat/completions). The base URL specifies the endpoint for LLM API calls and may vary based on your specific use case and endpoint requirements.

    Your Mistral AI API key can be found in your Mistral AI account settings under the API Keys section. The API key is sent in the Authorization: Bearer {api_key} header for all API requests to the Mistral AI API. The model name determines which Mistral AI model will be used for processing requests, and the base URL specifies the endpoint for LLM API calls.

    If your API key is compromised, you should immediately revoke it in your Mistral AI account settings and generate a new one. The API key provides access to your Mistral AI account and should be treated as sensitive information. Keep your API key secure and do not share it publicly.

    For detailed information about obtaining API keys, API authentication, available models, and API endpoints, see the Mistral AI API documentation.

  5. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Mistral AI connector tile, then select the credential that will be used to connect to your Mistral AI account, and click Next; or, create a new Mistral AI credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to interact with common Mistral AI endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

Chat Completion

This endpoint template sends a chat completion request to the Mistral AI API and retrieves the AI-generated response. Use this template when you need to interact with Mistral AI's language models to generate text, answer questions, or perform natural language processing tasks.

  • Enter your message or prompt in the Message field. This should be the text you want to send to the Mistral AI model for processing. The message is sent as part of a chat completion request with the role set to "user" and the content set to your message. The Mistral AI model will process this message and generate an appropriate response.

This endpoint sends a POST request to the Mistral AI chat completion endpoint with your message in the request body. The request body format is {"messages":[{"role":"user","content":"{your_message}"}]}. The endpoint returns the AI-generated response from the Mistral AI model configured in your credential.

The model used for processing is determined by the Model Name configured in your credential. Different models may have different capabilities, response times, and costs. For detailed information about available models, chat completion formats, API endpoints, and response structures, see the Mistral AI API documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

Mistral AI data sources can also be manually configured to interact with any valid Mistral AI API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

The Mistral AI API typically uses the POST method for chat completion and other LLM operations. The request body must be valid JSON matching the Mistral AI API's expected format — for chat completion endpoints, this is a messages array containing objects with role and content properties, e.g. {"messages":[{"role":"user","content":"{your_message}"}]}. For the Response Data Path, use a JSONPath expression such as $ to extract the entire response object, or $.choices[*] to extract all choices from a chat completion response.

Once all of the relevant settings have been configured, click the Next button to proceed with the rest of the data flow configuration, or click Save to save the new Mistral AI data source.