Models

March 9, 2026 ยท View on GitHub

Overview

Model Management API

Available Operations

list

List all models available to the user.

Example Usage

from mistralai.client import Mistral
import os


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

    res = mistral.models.list()

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescription
providerOptionalNullable[str]:heavy_minus_sign:N/A
modelOptionalNullable[str]:heavy_minus_sign:N/A
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.ModelList

Errors

Error TypeStatus CodeContent Type
errors.HTTPValidationError422application/json
errors.SDKError4XX, 5XX*/*

retrieve

Retrieve information about a model.

Example Usage

from mistralai.client import Mistral
import os


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

    res = mistral.models.retrieve(model_id="ft:open-mistral-7b:587a6b29:20240514:7e773925")

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescriptionExample
model_idstr:heavy_check_mark:The ID of the model to retrieve.ft:open-mistral-7b:587a6b29:20240514:7e773925
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.ResponseRetrieveModelV1ModelsModelIDGet

Errors

Error TypeStatus CodeContent Type
errors.HTTPValidationError422application/json
errors.SDKError4XX, 5XX*/*

delete

Delete a fine-tuned model.

Example Usage

from mistralai.client import Mistral
import os


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

    res = mistral.models.delete(model_id="ft:open-mistral-7b:587a6b29:20240514:7e773925")

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescriptionExample
model_idstr:heavy_check_mark:The ID of the model to delete.ft:open-mistral-7b:587a6b29:20240514:7e773925
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.DeleteModelResponse

Errors

Error TypeStatus CodeContent Type
errors.HTTPValidationError422application/json
errors.SDKError4XX, 5XX*/*

update

Update a model name or description.

Example Usage

from mistralai.client import Mistral
import os


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

    res = mistral.models.update(model_id="ft:open-mistral-7b:587a6b29:20240514:7e773925")

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescriptionExample
model_idstr:heavy_check_mark:The ID of the model to update.ft:open-mistral-7b:587a6b29:20240514:7e773925
nameOptionalNullable[str]:heavy_minus_sign:N/A
descriptionOptionalNullable[str]:heavy_minus_sign:N/A
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.JobsAPIRoutesFineTuningUpdateFineTunedModelResponse

Errors

Error TypeStatus CodeContent Type
errors.SDKError4XX, 5XX*/*

archive

Archive a fine-tuned model.

Example Usage

from mistralai.client import Mistral
import os


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

    res = mistral.models.archive(model_id="ft:open-mistral-7b:587a6b29:20240514:7e773925")

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescriptionExample
model_idstr:heavy_check_mark:The ID of the model to archive.ft:open-mistral-7b:587a6b29:20240514:7e773925
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.ArchiveModelResponse

Errors

Error TypeStatus CodeContent Type
errors.SDKError4XX, 5XX*/*

unarchive

Un-archive a fine-tuned model.

Example Usage

from mistralai.client import Mistral
import os


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

    res = mistral.models.unarchive(model_id="ft:open-mistral-7b:587a6b29:20240514:7e773925")

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescriptionExample
model_idstr:heavy_check_mark:The ID of the model to unarchive.ft:open-mistral-7b:587a6b29:20240514:7e773925
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.UnarchiveModelResponse

Errors

Error TypeStatus CodeContent Type
errors.SDKError4XX, 5XX*/*