Tree BG 1
Tree
Tree
TreeLeaves
TreeLeaves
Cat IdleGrassGrassRockRock

Beta Conversations Endpoints

(beta) Conversations API

List all created conversations.

GET /v1/conversations

Retrieve a list of conversation entities sorted by creation time.

200

Successful Response

ModelConversation

{object}

AgentConversation

{object}

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.conversations.list({});

  console.log(result);
}

run();
from mistralai import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.conversations.list(page=0, page_size=100)

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/conversations \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

[
  {
    "created_at": "2025-10-07T20:56:01.974Z",
    "id": "ipsum eiusmod",
    "model": "consequat do",
    "updated_at": "2025-10-07T20:56:01.974Z"
  }
]

Create a conversation and append entries to it.

POST /v1/conversations

Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation.

200

Successful Response

conversation_id
*string
object
"conversation.response"

Default Value: "conversation.response"

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.conversations.start({
    inputs: "<value>",
  });

  console.log(result);
}

run();
from mistralai import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.conversations.start(inputs="<value>", stream=False)

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/conversations \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -d '{
  "inputs": "ipsum eiusmod"
}'

200

{
  "conversation_id": "ipsum eiusmod",
  "outputs": [
    {
      "content": "consequat do"
    }
  ],
  "usage": {}
}

Retrieve a conversation information.

GET /v1/conversations/{conversation_id}

Given a conversation_id retrieve a conversation entity with its attributes.

200

Successful Response

ModelConversation

{object}

AgentConversation

{object}

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.conversations.get({
    conversationId: "<id>",
  });

  console.log(result);
}

run();
from mistralai import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.conversations.get(conversation_id="<id>")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/conversations/{conversation_id} \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "created_at": "2025-10-07T20:56:01.974Z",
  "id": "ipsum eiusmod",
  "model": "consequat do",
  "updated_at": "2025-10-07T20:56:01.974Z"
}

Append new entries to an existing conversation.

POST /v1/conversations/{conversation_id}

Run completion on the history of the conversation and the user entries. Return the new created entries.

200

Successful Response

conversation_id
*string
object
"conversation.response"

Default Value: "conversation.response"

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.conversations.append({
    conversationId: "<id>",
    conversationAppendRequest: {
      inputs: [],
    },
  });

  console.log(result);
}

run();
from mistralai import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.conversations.append(conversation_id="<id>", inputs=[], stream=False, store=True, handoff_execution="server")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/conversations/{conversation_id} \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -d '{
  "inputs": "ipsum eiusmod"
}'

200

{
  "conversation_id": "ipsum eiusmod",
  "outputs": [
    {
      "content": "consequat do"
    }
  ],
  "usage": {}
}

Delete a conversation.

DELETE /v1/conversations/{conversation_id}

Delete a conversation given a conversation_id.

Playground

Test the endpoints live

curl https://api.mistral.ai/v1/conversations/{conversation_id} \
 -X DELETE \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

Retrieve all entries in a conversation.

GET /v1/conversations/{conversation_id}/history

Given a conversation_id retrieve all the entries belonging to that conversation. The entries are sorted in the order they were appended, those can be messages, connectors or function_call.

200

Successful Response

conversation_id
*string
object
"conversation.history"

Default Value: "conversation.history"

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.conversations.getHistory({
    conversationId: "<id>",
  });

  console.log(result);
}

run();
from mistralai import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.conversations.get_history(conversation_id="<id>")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/conversations/{conversation_id}/history \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "conversation_id": "ipsum eiusmod",
  "entries": [
    {
      "content": "consequat do",
      "role": "assistant"
    }
  ]
}

Retrieve all messages in a conversation.

GET /v1/conversations/{conversation_id}/messages

Given a conversation_id retrieve all the messages belonging to that conversation. This is similar to retrieving all entries except we filter the messages only.

200

Successful Response

conversation_id
*string
object
"conversation.messages"

Default Value: "conversation.messages"

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.conversations.getMessages({
    conversationId: "<id>",
  });

  console.log(result);
}

run();
from mistralai import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.conversations.get_messages(conversation_id="<id>")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/conversations/{conversation_id}/messages \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "conversation_id": "ipsum eiusmod",
  "messages": [
    {
      "content": "consequat do",
      "role": "assistant"
    }
  ]
}

Restart a conversation starting from a given entry.

POST /v1/conversations/{conversation_id}/restart

Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned.

200

Successful Response

conversation_id
*string
object
"conversation.response"

Default Value: "conversation.response"

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.conversations.restart({
    conversationId: "<id>",
    conversationRestartRequest: {
      inputs: "<value>",
      fromEntryId: "<id>",
    },
  });

  console.log(result);
}

run();
from mistralai import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.conversations.restart(conversation_id="<id>", inputs="<value>", from_entry_id="<id>", stream=False, store=True, handoff_execution="server")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/conversations/{conversation_id}/restart \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -d '{
  "from_entry_id": "ipsum eiusmod",
  "inputs": "consequat do"
}'

200

{
  "conversation_id": "ipsum eiusmod",
  "outputs": [
    {
      "content": "consequat do"
    }
  ],
  "usage": {}
}

Create a conversation and append entries to it.

POST /v1/conversations#stream

Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation.

200

Successful Response

ConversationEvents

{object}

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.conversations.startStream({
    inputs: [
      {
        object: "entry",
        type: "agent.handoff",
        previousAgentId: "<id>",
        previousAgentName: "<value>",
        nextAgentId: "<id>",
        nextAgentName: "<value>",
      },
    ],
  });

  for await (const event of result) {
    // Handle the event
    console.log(event);
  }
}

run();
from mistralai import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.conversations.start_stream(inputs=[
        {
            "object": "entry",
            "type": "function.result",
            "tool_call_id": "<id>",
            "result": "<value>",
        },
    ], stream=True)

    with res as event_stream:
        for event in event_stream:
            # handle event
            print(event, flush=True)

curl https://api.mistral.ai/v1/conversations#stream \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -d '{
  "inputs": "ipsum eiusmod"
}'

200

null

Append new entries to an existing conversation.

POST /v1/conversations/{conversation_id}#stream

Run completion on the history of the conversation and the user entries. Return the new created entries.

200

Successful Response

ConversationEvents

{object}

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.conversations.appendStream({
    conversationId: "<id>",
    conversationAppendStreamRequest: {
      inputs: "<value>",
    },
  });

  for await (const event of result) {
    // Handle the event
    console.log(event);
  }
}

run();
from mistralai import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.conversations.append_stream(conversation_id="<id>", inputs="<value>", stream=True, store=True, handoff_execution="server")

    with res as event_stream:
        for event in event_stream:
            # handle event
            print(event, flush=True)

curl https://api.mistral.ai/v1/conversations/{conversation_id}#stream \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -d '{
  "inputs": "ipsum eiusmod"
}'

200

null

Restart a conversation starting from a given entry.

POST /v1/conversations/{conversation_id}/restart#stream

Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned.

200

Successful Response

ConversationEvents

{object}

Playground

Test the endpoints live

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: "MISTRAL_API_KEY",
});

async function run() {
  const result = await mistral.beta.conversations.restartStream({
    conversationId: "<id>",
    conversationRestartStreamRequest: {
      inputs: [
        {
          object: "entry",
          type: "message.input",
          role: "assistant",
          content: "<value>",
          prefix: false,
        },
      ],
      fromEntryId: "<id>",
    },
  });

  for await (const event of result) {
    // Handle the event
    console.log(event);
  }
}

run();
from mistralai import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.conversations.restart_stream(conversation_id="<id>", inputs=[
        {
            "object": "entry",
            "type": "message.input",
            "role": "assistant",
            "content": "<value>",
            "prefix": False,
        },
    ], from_entry_id="<id>", stream=True, store=True, handoff_execution="server")

    with res as event_stream:
        for event in event_stream:
            # handle event
            print(event, flush=True)

curl https://api.mistral.ai/v1/conversations/{conversation_id}/restart#stream \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -d '{
  "from_entry_id": "ipsum eiusmod",
  "inputs": "consequat do"
}'

200

null