Nom généré













Endpoints Beta Libraries
(beta) API Libraries pour créer et gérer des bibliothèques - indexez vos documents pour enrichir les capacités des agents.












Exemples
Exemples réels de code
Lister toutes les bibliothèques auxquelles vous avez accès.
GET /v1/libraries
Liste toutes les bibliothèques que vous avez créées ou qui ont été partagées avec vous.
200
Réponse réussie
Playground
Testez les endpoints en direct
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.beta.libraries.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.beta.libraries.list();
console.log(result);
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.libraries.list()
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.libraries.list()
# Handle response
print(res)
curl https://api.mistral.ai/v1/libraries \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/libraries \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"data": [
{
"chunk_size": null,
"created_at": "2025-10-07T20:56:01.974Z",
"id": "ipsum eiusmod",
"name": "consequat do",
"nb_documents": 87,
"owner_id": null,
"owner_type": "reprehenderit ut dolore",
"total_size": 14,
"updated_at": "2025-10-07T20:56:01.974Z"
}
]
}{
"data": [
{
"chunk_size": null,
"created_at": "2025-10-07T20:56:01.974Z",
"id": "ipsum eiusmod",
"name": "consequat do",
"nb_documents": 87,
"owner_id": null,
"owner_type": "reprehenderit ut dolore",
"total_size": 14,
"updated_at": "2025-10-07T20:56:01.974Z"
}
]
}Créer une nouvelle bibliothèque.
POST /v1/libraries
Créez une nouvelle bibliothèque. Vous serez marqué comme propriétaire et vous seul aurez la possibilité de la partager avec d'autres. À sa création, elle ne sera accessible que par vous.
chunk_size
description
name
201
Réponse réussie
chunk_size
created_at
description
emoji
explicit_user_members_count
explicit_workspace_members_count
generated_description
generated_name
id
name
nb_documents
org_sharing_role
owner_id
owner_type
total_size
updated_at
Playground
Testez les endpoints en direct
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.beta.libraries.create({
name: "<value>",
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.beta.libraries.create({
name: "<value>",
});
console.log(result);
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.libraries.create(name="<value>")
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.libraries.create(name="<value>")
# Handle response
print(res)
curl https://api.mistral.ai/v1/libraries \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"name": "ipsum eiusmod"
}'curl https://api.mistral.ai/v1/libraries \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"name": "ipsum eiusmod"
}'201
{
"chunk_size": null,
"created_at": "2025-10-07T20:56:01.974Z",
"id": "ipsum eiusmod",
"name": "consequat do",
"nb_documents": 87,
"owner_id": null,
"owner_type": "reprehenderit ut dolore",
"total_size": 14,
"updated_at": "2025-10-07T20:56:01.974Z"
}{
"chunk_size": null,
"created_at": "2025-10-07T20:56:01.974Z",
"id": "ipsum eiusmod",
"name": "consequat do",
"nb_documents": 87,
"owner_id": null,
"owner_type": "reprehenderit ut dolore",
"total_size": 14,
"updated_at": "2025-10-07T20:56:01.974Z"
}Informations détaillées sur une bibliothèque spécifique.
GET /v1/libraries/{library_id}
Étant donné un identifiant de bibliothèque, renvoie les informations détaillées sur cette bibliothèque.
library_id
200
Réponse réussie
chunk_size
created_at
description
emoji
explicit_user_members_count
explicit_workspace_members_count
generated_description
generated_name
Nom généré
id
name
nb_documents
org_sharing_role
owner_id
owner_type
total_size
updated_at
Playground
Testez les endpoints en direct
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.beta.libraries.get({
libraryId: "d0d23a1e-bfe5-45e7-b7bb-22a4ea78d47f",
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.beta.libraries.get({
libraryId: "d0d23a1e-bfe5-45e7-b7bb-22a4ea78d47f",
});
console.log(result);
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.libraries.get(library_id="d0d23a1e-bfe5-45e7-b7bb-22a4ea78d47f")
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.libraries.get(library_id="d0d23a1e-bfe5-45e7-b7bb-22a4ea78d47f")
# Handle response
print(res)
curl https://api.mistral.ai/v1/libraries/{library_id} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/libraries/{library_id} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"chunk_size": null,
"created_at": "2025-10-07T20:56:01.974Z",
"id": "ipsum eiusmod",
"name": "consequat do",
"nb_documents": 87,
"owner_id": null,
"owner_type": "reprehenderit ut dolore",
"total_size": 14,
"updated_at": "2025-10-07T20:56:01.974Z"
}{
"chunk_size": null,
"created_at": "2025-10-07T20:56:01.974Z",
"id": "ipsum eiusmod",
"name": "consequat do",
"nb_documents": 87,
"owner_id": null,
"owner_type": "reprehenderit ut dolore",
"total_size": 14,
"updated_at": "2025-10-07T20:56:01.974Z"
}Mettre à jour une bibliothèque.
PUT /v1/libraries/{library_id}
À partir d'un identifiant de bibliothèque, vous pouvez mettre à jour le nom et la description.
library_id
description
name
200
Réponse réussie
chunk_size
created_at
description
emoji
explicit_user_members_count
explicit_workspace_members_count
generated_description
generated_name
Nom généré
id
name
nb_documents
org_sharing_role
owner_id
owner_type
total_size
updated_at
Playground
Testez les endpoints en direct
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.beta.libraries.update({
libraryId: "e01880c3-d0b5-4a29-8b1b-abdb8ce917e4",
libraryInUpdate: {},
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.beta.libraries.update({
libraryId: "e01880c3-d0b5-4a29-8b1b-abdb8ce917e4",
libraryInUpdate: {},
});
console.log(result);
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.libraries.update(library_id="e01880c3-d0b5-4a29-8b1b-abdb8ce917e4")
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.libraries.update(library_id="e01880c3-d0b5-4a29-8b1b-abdb8ce917e4")
# Handle response
print(res)
curl https://api.mistral.ai/v1/libraries/{library_id} \
-X PUT \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'curl https://api.mistral.ai/v1/libraries/{library_id} \
-X PUT \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'200
{
"chunk_size": null,
"created_at": "2025-10-07T20:56:01.974Z",
"id": "ipsum eiusmod",
"name": "consequat do",
"nb_documents": 87,
"owner_id": null,
"owner_type": "reprehenderit ut dolore",
"total_size": 14,
"updated_at": "2025-10-07T20:56:01.974Z"
}{
"chunk_size": null,
"created_at": "2025-10-07T20:56:01.974Z",
"id": "ipsum eiusmod",
"name": "consequat do",
"nb_documents": 87,
"owner_id": null,
"owner_type": "reprehenderit ut dolore",
"total_size": 14,
"updated_at": "2025-10-07T20:56:01.974Z"
}Supprimer une bibliothèque et tous ses documents.
DELETE /v1/libraries/{library_id}
Étant donné un identifiant de bibliothèque, supprime celle-ci ainsi que tous les documents qui y ont été chargés.
library_id
200
Réponse réussie
chunk_size
created_at
description
emoji
explicit_user_members_count
explicit_workspace_members_count
generated_description
generated_name
Nom généré
id
name
nb_documents
org_sharing_role
owner_id
owner_type
total_size
updated_at
Playground
Testez les endpoints en direct
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.beta.libraries.delete({
libraryId: "6cad0b6e-fd2e-4d11-a48b-21d30fb7c17a",
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.beta.libraries.delete({
libraryId: "6cad0b6e-fd2e-4d11-a48b-21d30fb7c17a",
});
console.log(result);
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.libraries.delete(library_id="6cad0b6e-fd2e-4d11-a48b-21d30fb7c17a")
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.libraries.delete(library_id="6cad0b6e-fd2e-4d11-a48b-21d30fb7c17a")
# Handle response
print(res)
curl https://api.mistral.ai/v1/libraries/{library_id} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'curl https://api.mistral.ai/v1/libraries/{library_id} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'200
{
"chunk_size": null,
"created_at": "2025-10-07T20:56:01.974Z",
"id": "ipsum eiusmod",
"name": "consequat do",
"nb_documents": 87,
"owner_id": null,
"owner_type": "reprehenderit ut dolore",
"total_size": 14,
"updated_at": "2025-10-07T20:56:01.974Z"
}{
"chunk_size": null,
"created_at": "2025-10-07T20:56:01.974Z",
"id": "ipsum eiusmod",
"name": "consequat do",
"nb_documents": 87,
"owner_id": null,
"owner_type": "reprehenderit ut dolore",
"total_size": 14,
"updated_at": "2025-10-07T20:56:01.974Z"
}