The ID of the model to retrieve.













Models Endpoints
Model Management API












Examples
Real world code examples
List Models
GET /v1/models
List all models available to the user.
200
Successful Response
data
object
Default Value: "list"
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.models.list();
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.models.list();
console.log(result);
}
run();
from mistralai import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.models.list()
# Handle response
print(res)
from mistralai import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.models.list()
# Handle response
print(res)
curl https://api.mistral.ai/v1/models \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'
curl https://api.mistral.ai/v1/models \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'
200
[
{
"id": "<model_id>",
"capabilities": {
"completion_chat": true,
"completion_fim": false,
"function_calling": false,
"fine_tuning": false,
"vision": false,
"classification": false
},
"job": "<job_id>",
"root": "open-mistral-7b",
"object": "model",
"created": 1756746619,
"owned_by": "<owner_id>",
"name": null,
"description": null,
"max_context_length": 32768,
"aliases": [],
"deprecation": null,
"deprecation_replacement_model": null,
"default_model_temperature": null,
"TYPE": "fine-tuned",
"archived": false
}
]
[
{
"id": "<model_id>",
"capabilities": {
"completion_chat": true,
"completion_fim": false,
"function_calling": false,
"fine_tuning": false,
"vision": false,
"classification": false
},
"job": "<job_id>",
"root": "open-mistral-7b",
"object": "model",
"created": 1756746619,
"owned_by": "<owner_id>",
"name": null,
"description": null,
"max_context_length": 32768,
"aliases": [],
"deprecation": null,
"deprecation_replacement_model": null,
"default_model_temperature": null,
"TYPE": "fine-tuned",
"archived": false
}
]
Retrieve Model
GET /v1/models/{model_id}
Retrieve information about a model.
model_id
200
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.models.retrieve({
modelId: "ft:open-mistral-7b:587a6b29:20240514:7e773925",
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.models.retrieve({
modelId: "ft:open-mistral-7b:587a6b29:20240514:7e773925",
});
console.log(result);
}
run();
from mistralai 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)
from mistralai 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)
curl https://api.mistral.ai/v1/models/{model_id} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'
curl https://api.mistral.ai/v1/models/{model_id} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'
200
{
"id": "<your_model_id>",
"capabilities": {
"completion_chat": true,
"completion_fim": false,
"function_calling": false,
"fine_tuning": false,
"vision": false,
"classification": false
},
"job": "<job_id>",
"root": "open-mistral-7b",
"object": "model",
"created": 1756746619,
"owned_by": "<owner_id>",
"name": null,
"description": null,
"max_context_length": 32768,
"aliases": [],
"deprecation": null,
"deprecation_replacement_model": null,
"default_model_temperature": null,
"TYPE": "fine-tuned",
"archived": false
}
{
"id": "<your_model_id>",
"capabilities": {
"completion_chat": true,
"completion_fim": false,
"function_calling": false,
"fine_tuning": false,
"vision": false,
"classification": false
},
"job": "<job_id>",
"root": "open-mistral-7b",
"object": "model",
"created": 1756746619,
"owned_by": "<owner_id>",
"name": null,
"description": null,
"max_context_length": 32768,
"aliases": [],
"deprecation": null,
"deprecation_replacement_model": null,
"default_model_temperature": null,
"TYPE": "fine-tuned",
"archived": false
}
Delete Model
DELETE /v1/models/{model_id}
Delete a fine-tuned model.
model_id
The ID of the model to delete.
200
Successful Response
deleted
Default Value: true
The deletion status
id
The ID of the deleted model.
object
Default Value: "model"
The object type that was deleted
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.models.delete({
modelId: "ft:open-mistral-7b:587a6b29:20240514:7e773925",
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.models.delete({
modelId: "ft:open-mistral-7b:587a6b29:20240514:7e773925",
});
console.log(result);
}
run();
from mistralai 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)
from mistralai 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)
curl https://api.mistral.ai/v1/models/{model_id} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'
curl https://api.mistral.ai/v1/models/{model_id} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'
200
{
"id": "ft:open-mistral-7b:587a6b29:20240514:7e773925",
"object": "model",
"deleted": true
}
{
"id": "ft:open-mistral-7b:587a6b29:20240514:7e773925",
"object": "model",
"deleted": true
}
Update Fine Tuned Model
PATCH /v1/fine_tuning/models/{model_id}
Update a model name or description.
model_id
The ID of the model to update.
description
name
200
OK
CompletionFTModelOut
ClassifierFTModelOut
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.models.update({
modelId: "ft:open-mistral-7b:587a6b29:20240514:7e773925",
updateFTModelIn: {},
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.models.update({
modelId: "ft:open-mistral-7b:587a6b29:20240514:7e773925",
updateFTModelIn: {},
});
console.log(result);
}
run();
from mistralai 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)
from mistralai 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)
curl https://api.mistral.ai/v1/fine_tuning/models/{model_id} \
-X PATCH \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-d '{}'
curl https://api.mistral.ai/v1/fine_tuning/models/{model_id} \
-X PATCH \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-d '{}'
200
{
"archived": false,
"capabilities": {},
"created": 87,
"id": "ipsum eiusmod",
"job": "consequat do",
"owned_by": "reprehenderit ut dolore",
"root": "occaecat dolor sit",
"root_version": "nostrud",
"workspace_id": "aute aliqua aute commodo"
}
{
"archived": false,
"capabilities": {},
"created": 87,
"id": "ipsum eiusmod",
"job": "consequat do",
"owned_by": "reprehenderit ut dolore",
"root": "occaecat dolor sit",
"root_version": "nostrud",
"workspace_id": "aute aliqua aute commodo"
}
Archive Fine Tuned Model
POST /v1/fine_tuning/models/{model_id}/archive
Archive a fine-tuned model.
model_id
The ID of the model to archive.
200
OK
archived
Default Value: true
id
object
Default Value: "model"
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.models.archive({
modelId: "ft:open-mistral-7b:587a6b29:20240514:7e773925",
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.models.archive({
modelId: "ft:open-mistral-7b:587a6b29:20240514:7e773925",
});
console.log(result);
}
run();
from mistralai 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)
from mistralai 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)
curl https://api.mistral.ai/v1/fine_tuning/models/{model_id}/archive \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'
curl https://api.mistral.ai/v1/fine_tuning/models/{model_id}/archive \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'
200
{
"id": "ipsum eiusmod"
}
{
"id": "ipsum eiusmod"
}
Unarchive Fine Tuned Model
DELETE /v1/fine_tuning/models/{model_id}/archive
Un-archive a fine-tuned model.
model_id
The ID of the model to unarchive.
200
OK
archived
Default Value: false
id
object
Default Value: "model"
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.models.unarchive({
modelId: "ft:open-mistral-7b:587a6b29:20240514:7e773925",
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.models.unarchive({
modelId: "ft:open-mistral-7b:587a6b29:20240514:7e773925",
});
console.log(result);
}
run();
from mistralai 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)
from mistralai 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)
curl https://api.mistral.ai/v1/fine_tuning/models/{model_id}/archive \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'
curl https://api.mistral.ai/v1/fine_tuning/models/{model_id}/archive \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'
200
{
"id": "ipsum eiusmod"
}
{
"id": "ipsum eiusmod"
}