Mistral ai API

Give your agents access to Mistral ai API. Bring your own Mistral ai key, or skip the signup and pay per call from your Composio balance with Composio Instant.

Mistral ai logoMistral ai
Instant

Mistral ai is a research lab offering cutting-edge open-source language models and developer APIs. It empowers teams to add state-of-the-art natural language capabilities to any app or workflow.

105 Tools
COMPOSIO INSTANT

What is Composio Instant?

Composio Instant lets your agent use paid APIs like Mistral ai without a separate account or API key for each one. New accounts start with $2 of free credit.

No Mistral ai account or key

Your agent calls Mistral ai through Composio, so there is nothing to sign up for, store, or rotate.

Pay per call, at cost

$0.004 per standard OCR 4.1 page, paid from your Composio balance with zero markup.

Works in any agent

Claude, ChatGPT, Cursor, and other MCP clients, or your own code with the Composio SDK.

Works with your apps

Use Mistral ai with Gmail, Slack, Google Sheets, and 1,700+ other apps you connect.

AI ASSISTANTS

Connect the Mistral ai API to your AI assistant

Use Mistral ai from the AI assistant you already work in. Connect Composio once, then paste the prompt.

  1. 1

    Open the Connectors menu

    Use the button to open Claude's Add connector dialog with Composio filled in. Or click + in the message box, then Connectors, Add connector and Add custom connector.
    Add Composio to Claude
  2. 2

    Add the Composio MCP server

    Name it Composio, paste the MCP server URL and click Add.
    https://connect.composio.dev/mcp
  3. 3

    Authorize in your browser

    A browser window opens. Sign in to Composio to approve the connection.
  4. 4

    Paste the prompt

    Start a new chat and paste the prompt. Claude runs the call on Composio Instant.
  1. 1

    Install the Composio plugin

    Open Composio's plugin page in ChatGPT and click Install. Sign in to ChatGPT first if it asks.
    Install in ChatGPT
  2. 2

    Authorize in your browser

    Connect the plugin, then sign in to Composio to approve the connection.
  3. 3

    Turn on Composio in your chat

    In a new chat, click +, then More, and select Composio.
  4. 4

    Paste the prompt

    Paste the prompt into that chat. ChatGPT runs the call on Composio Instant.
  1. 1

    Install the Composio plugin

    Open Composio in the Cursor marketplace, click Install Composio Plugin for Cursor and approve the connection in your browser.
    Install in Cursor
  2. 2

    Paste the prompt

    Open the Agent chat and paste the prompt. Cursor runs the call on Composio Instant.
  1. 1

    Add the Composio plugin

    Open Composio's listing on x.ai and click Add to Grok Bot. When Grok Bot opens the plugin, click Add.
    Add to Grok Bot
  2. 2

    Authenticate

    Go to Installed, open Composio and click Authenticate. Sign in to Composio and click Authorize.
  3. 3

    Paste the prompt

    Paste the prompt into your bot's chat. Grok Bot runs the call on Composio Instant.
  1. 1

    Paste the setup prompt

    Copy this into your Hermes chat. Hermes adds the Composio MCP server for you.
    Set up Composio from composio.dev/hermes
  2. 2

    Authorize in your browser

    A browser window opens. Sign in to Composio to approve the connection.
  3. 3

    Paste the prompt

    Start a new chat and paste the prompt. Hermes runs the call on Composio Instant.
ClaudeNew chat

Paste this prompt

Use Mistral AI through Composio Instant to extract text and tables in Markdown from page 1 (page index 0) of the public paper at https://arxiv.org/pdf/1706.03762. Return the extracted page text and any tables.

What success looks like

MISTRAL_AI_CREATE_OCR

Your assistant runs Mistral AI and replies with the first page's extracted text and any tables in Markdown.

Runs on Composio Instant
SDK

Use the Mistral ai API in your code

Call Mistral ai from your own agent with the Composio SDK. Four steps and one tool call.

  1. 1

    Set up Composio

    Turn on Instant Toolkits in your project settings and check your prepaid balance in Billing. Then set your API key.
    export COMPOSIO_API_KEY="your_composio_api_key"
  2. 2

    Install the SDK

    The Python SDK needs Python 3.11 through 3.15.
    pip install composio
  3. 3

    Run the call

    Create a session that keeps Instant to this toolkit and reports the charge, then run the tool on the Instant account.
    MISTRAL_AI_CREATE_OCR
  4. 4

    Read the response

    When the call runs on Instant, the response includes its charge: the amount as an exact USD decimal string, the currency and charged_by.
agent.py
from composio import Composio

composio = Composio()

session = composio.sessions.create(
    user_id="user_123",
    toolkits=["mistral_ai"],
    instant={
        "toolkits": {"enable": ["mistral_ai"]},
        "return_instant_charge": True,
    },
)

result = session.execute(
    "MISTRAL_AI_CREATE_OCR",
    arguments={
        "model": "mistral-ocr-latest",
        "pages": [
            0,
        ],
        "document": {
            "type": "document_url",
            "document_url": "https://arxiv.org/pdf/1706.03762",
        },
        "table_format": "markdown",
    },
    account="instant_account",
)
print(result)
print("Instant charge:", result.instant_charge)
TOOLS

Available Mistral ai API tools

1 Mistral ai tool runs on Instant, priced per call with no Mistral ai key. Tools marked Your key need your own Mistral ai account.

ActionTool slugWhat it doesAvailability
Extract Document TextMISTRAL_AI_CREATE_OCRExtract text and structured data from images and documents.
Instant$0.004 per standard OCR 4.1 page
Create Chat CompletionMISTRAL_AI_CREATE_CHAT_COMPLETIONGenerate conversational responses with Mistral AI models.Your key
Transcribe AudioMISTRAL_AI_CREATE_AUDIO_TRANSCRIPTIONTurn audio files into text with Voxtral models.Your key
Generate EmbeddingsMISTRAL_AI_CREATE_EMBEDDINGSCreate vector embeddings for input text.Your key
Moderate TextMISTRAL_AI_CREATE_MODERATIONClassify text content across nine moderation categories.Your key
Complete CodeMISTRAL_AI_CREATE_FIM_COMPLETIONGenerate code completions with fill-in-the-middle.Your key
Generate SpeechMISTRAL_AI_CREATE_SPEECHGenerate JSON-encoded speech audio from text.Your key

Instant prices are Mistral ai's list prices with 0% markup, paid from your Composio balance and updated every hour. Instant calls also count toward your plan's tool calls. See all plans on the pricing page.

USE CASES

Mistral ai API use cases and example prompts

Copy a prompt into your agent. Each one uses Mistral ai with apps you connect through Composio.

  • Build an invoice tracker

    Use Mistral AI to extract the vendor, invoice number, invoice date, and total from the invoices in my Accounts Payable folder in Google Drive. Add the extracted details to my Invoice Tracker in Google Sheets, with one row per invoice.

    Apps used: Mistral ai, Google Drive, Google Sheets

  • Turn call recordings into notes

    Use Mistral AI to transcribe the customer call recordings in my Acme Interviews folder in Google Drive. Summarize the main requests, decisions, and follow-up actions, then save them as a page in my Customer Research space in Notion.

    Apps used: Mistral ai, Google Drive, Notion

  • Create a launch FAQ

    Use Mistral AI to turn the launch details in my Product Launch Brief in Google Docs into a customer FAQ with clear answers. Save the FAQ in my Launch Materials folder in Google Docs, then post a link in Slack's #product-launch channel.

    Apps used: Mistral ai, Google Docs, Slack

  • Complete a CSV parser fix

    Use Mistral AI to complete the missing input validation in the parser code from my GitHub issue about malformed CSV uploads. Add the suggested code and a brief explanation to the existing issue for the engineering team to review.

    Apps used: Mistral ai, GitHub

TROUBLESHOOTING

Mistral ai API troubleshooting

Still stuck? The Instant tools docs cover limits, charges and session settings.

Start with Mistral ai.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Mistral ai tool your agent needs.Free to start.

Start building