the native ID in the underlying index













Beta Rag Search Indexes Endpoints
(beta) RAG API - search indexes.












Examples
Real world code examples
Register (or re-register) a search index
PUT /v1/rag/indexes
Register (or re-register) a search index
name
status
Default Value: "offline"
200
Successful Response
id
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.rag.searchIndexes.register({
name: "<value>",
index: {
type: "vespa",
k8sCluster: "<value>",
k8sNamespace: "<value>",
vespaInstanceName: "<value>",
vespaVersion: "<value>",
schemas: [
{
name: "<value>",
fields: [],
sd: "<value>",
},
],
queryUrl: "https://shiny-range.com/",
},
});
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.rag.searchIndexes.register({
name: "<value>",
index: {
type: "vespa",
k8sCluster: "<value>",
k8sNamespace: "<value>",
vespaInstanceName: "<value>",
vespaVersion: "<value>",
schemas: [
{
name: "<value>",
fields: [],
sd: "<value>",
},
],
queryUrl: "https://shiny-range.com/",
},
});
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.rag.search_indexes.register(name="<value>", index={
"type": "vespa",
"k8s_cluster": "<value>",
"k8s_namespace": "<value>",
"vespa_instance_name": "<value>",
"vespa_version": "<value>",
"schemas": [
{
"name": "<value>",
"fields": [],
"sd": "<value>",
},
],
"query_url": "https://shiny-range.com/",
}, status="offline")
# 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.rag.search_indexes.register(name="<value>", index={
"type": "vespa",
"k8s_cluster": "<value>",
"k8s_namespace": "<value>",
"vespa_instance_name": "<value>",
"vespa_version": "<value>",
"schemas": [
{
"name": "<value>",
"fields": [],
"sd": "<value>",
},
],
"query_url": "https://shiny-range.com/",
}, status="offline")
# Handle response
print(res)
curl https://api.mistral.ai/v1/rag/indexes \
-X PUT \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"index": {
"k8s_cluster": "production-cluster",
"k8s_namespace": "search",
"query_url": "reprehenderit ut dolore",
"schemas": [
{
"fields": [
{
"index_type": "ann",
"multidimensional": false,
"name": "My resource",
"ranking": "count",
"storage": "in_memory",
"type": "int"
}
],
"name": "My resource",
"sd": "aute aliqua aute commodo"
}
],
"vespa_instance_name": "mistral-search",
"vespa_version": "dolor"
},
"name": "My resource"
}'curl https://api.mistral.ai/v1/rag/indexes \
-X PUT \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"index": {
"k8s_cluster": "production-cluster",
"k8s_namespace": "search",
"query_url": "reprehenderit ut dolore",
"schemas": [
{
"fields": [
{
"index_type": "ann",
"multidimensional": false,
"name": "My resource",
"ranking": "count",
"storage": "in_memory",
"type": "int"
}
],
"name": "My resource",
"sd": "aute aliqua aute commodo"
}
],
"vespa_instance_name": "mistral-search",
"vespa_version": "dolor"
},
"name": "My resource"
}'200
{
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}{
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}Get Index Summaries
GET /v1/rag/indexes/summary
Fetch summary view of all indexes available to a user
200
Successful Response
GetSearchIndexSummaryResponseIndex
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.rag.searchIndexes.getIndexSummaries();
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.rag.searchIndexes.getIndexSummaries();
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.rag.search_indexes.get_index_summaries()
# 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.rag.search_indexes.get_index_summaries()
# Handle response
print(res)
curl https://api.mistral.ai/v1/rag/indexes/summary \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/rag/indexes/summary \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
[
{
"created_at": "2025-12-17T10:25:07.818693Z",
"creator_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"document_count": 87,
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"index": {
"k8s_cluster": "production-cluster",
"k8s_namespace": "search",
"schemas": [
{
"document_count": null,
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"name": "My resource"
}
],
"vespa_instance_name": "mistral-search"
},
"modified_at": "2025-12-17T10:41:03.469341Z",
"name": "My resource",
"status": "online"
}
][
{
"created_at": "2025-12-17T10:25:07.818693Z",
"creator_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"document_count": 87,
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"index": {
"k8s_cluster": "production-cluster",
"k8s_namespace": "search",
"schemas": [
{
"document_count": null,
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"name": "My resource"
}
],
"vespa_instance_name": "mistral-search"
},
"modified_at": "2025-12-17T10:41:03.469341Z",
"name": "My resource",
"status": "online"
}
]Unregister Search Index
DELETE /v1/rag/indexes/index/{index_id}
Delete all information about an index
index_id
200
Successful 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.rag.searchIndexes.unregister({
indexId: "0e59f390-f2e4-428e-a81c-c9c2f2ced09e",
});
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.rag.searchIndexes.unregister({
indexId: "0e59f390-f2e4-428e-a81c-c9c2f2ced09e",
});
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.rag.search_indexes.unregister(index_id="0e59f390-f2e4-428e-a81c-c9c2f2ced09e")
# 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.rag.search_indexes.unregister(index_id="0e59f390-f2e4-428e-a81c-c9c2f2ced09e")
# Handle response
print(res)
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'200
nullnullUpdate Index Metrics
PUT /v1/rag/indexes/index/{index_id}/metrics
Update the metrics for a given index
index_id
UpdateIndexMetricsRequestIndexMetricsOnline
UpdateIndexMetricsRequestIndexMetricsOffline
200
Successful 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.rag.searchIndexes.updateIndexMetrics({
indexId: "cb562a81-38ce-49a7-86ec-592676de32a8",
requestBody: {
status: "online",
documentCount: 864436,
schemaMetrics: [
{
name: "<value>",
documentCount: 109412,
},
],
},
});
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.rag.searchIndexes.updateIndexMetrics({
indexId: "cb562a81-38ce-49a7-86ec-592676de32a8",
requestBody: {
status: "online",
documentCount: 864436,
schemaMetrics: [
{
name: "<value>",
documentCount: 109412,
},
],
},
});
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.rag.search_indexes.update_index_metrics(index_id="cb562a81-38ce-49a7-86ec-592676de32a8", request_body={
"status": "online",
"document_count": 864436,
"schema_metrics": [
{
"name": "<value>",
"document_count": 109412,
},
],
})
# 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.rag.search_indexes.update_index_metrics(index_id="cb562a81-38ce-49a7-86ec-592676de32a8", request_body={
"status": "online",
"document_count": 864436,
"schema_metrics": [
{
"name": "<value>",
"document_count": 109412,
},
],
})
# Handle response
print(res)
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/metrics \
-X PUT \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"document_count": 87,
"schema_metrics": [
{
"document_count": 14,
"name": "My resource"
}
],
"status": "consequat do"
}'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/metrics \
-X PUT \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"document_count": 87,
"schema_metrics": [
{
"document_count": 14,
"name": "My resource"
}
],
"status": "consequat do"
}'200
nullnullGet Index Details
GET /v1/rag/indexes/index/{index_id}/detail
Get a detailed view of the stored data for a single index
index_id
200
Successful Response
created_at
creator_id
document_count
modified_at
name
status
vespa_version
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.rag.searchIndexes.getIndexDetail({
indexId: "f6ffec01-1f00-47ec-bf94-a08bdc049edc",
});
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.rag.searchIndexes.getIndexDetail({
indexId: "f6ffec01-1f00-47ec-bf94-a08bdc049edc",
});
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.rag.search_indexes.get_index_detail(index_id="f6ffec01-1f00-47ec-bf94-a08bdc049edc")
# 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.rag.search_indexes.get_index_detail(index_id="f6ffec01-1f00-47ec-bf94-a08bdc049edc")
# Handle response
print(res)
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/detail \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/detail \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"created_at": "2025-12-17T10:25:07.818693Z",
"creator_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"document_count": 87,
"modified_at": "2025-12-17T10:41:03.469341Z",
"name": "My resource",
"schemas": [
{
"document_count": null,
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"last_modified": "2025-12-17T10:25:07.818693Z",
"latency_p95_s_threshold": null,
"name": "My resource"
}
],
"status": "online",
"vespa_version": null
}{
"created_at": "2025-12-17T10:25:07.818693Z",
"creator_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"document_count": 87,
"modified_at": "2025-12-17T10:41:03.469341Z",
"name": "My resource",
"schemas": [
{
"document_count": null,
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"last_modified": "2025-12-17T10:25:07.818693Z",
"latency_p95_s_threshold": null,
"name": "My resource"
}
],
"status": "online",
"vespa_version": null
}Get Index Summary
GET /v1/rag/indexes/index/{index_id}/summary_field/{language}
Retrieve the summary field for an index if it exists
index_id
language
200
Successful Response
content
status
translated
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/summary_field/{language} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/summary_field/{language} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"content": "Example content.",
"status": "handwritten",
"translated": false
}{
"content": "Example content.",
"status": "handwritten",
"translated": false
}Set Index Summary
PUT /v1/rag/indexes/index/{index_id}/summary_field/{language}
Update the summary field for an index
index_id
language
content
status
translated
200
Successful Response
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/summary_field/{language} \
-X PUT \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"content": "Example content.",
"status": "handwritten",
"translated": false
}'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/summary_field/{language} \
-X PUT \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"content": "Example content.",
"status": "handwritten",
"translated": false
}'200
nullnullGenerate a summary field for an index
POST /v1/rag/indexes/index/{index_id}/summary_field/{language}
Streams a summary for the index in chunks of json.
The first chunk contains metadata for the summary, the following contain chunks of 'content' that should be joined together to form a full summary.
index_id
language
200
Successful Response
SummaryMetadata
SummaryChunk
SummaryError
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/summary_field/{language} \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/summary_field/{language} \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'200
"{}""{}"Get Schema Summary
GET /v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field/{language}
Retrieve the summary field for a schema if it exists
index_id
schema_id
language
200
Successful Response
content
status
translated
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field/{language} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field/{language} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"content": "Example content.",
"status": "handwritten",
"translated": false
}{
"content": "Example content.",
"status": "handwritten",
"translated": false
}Set Schema Summary
PUT /v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field/{language}
Update the summary field for an index
index_id
schema_id
language
content
status
translated
200
Successful Response
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field/{language} \
-X PUT \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"content": "Example content.",
"status": "handwritten",
"translated": false
}'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field/{language} \
-X PUT \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"content": "Example content.",
"status": "handwritten",
"translated": false
}'200
nullnullGenerate a summary field for a schema
POST /v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field/{language}
Streams a summary for the schema in chunks of json.
The first chunk contains metadata for the summary, the following contain chunks of 'content' that should be joined together to form a full summary.
index_id
schema_id
language
200
Successful Response
InlineSummaryMetadata1
InlineSummaryChunk1
InlineSummaryError1
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field/{language} \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/summary_field/{language} \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'200
"{}""{}"Get Index Schema Detail
GET /v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/detail
Get a detailed view of the stored information for a schema
index_id
schema_id
200
Successful 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.rag.searchIndexes.getIndexSchemaDetail({
indexId: "af850b81-3290-4f41-83af-f0d2ac1b070d",
schemaId: "fc2825a7-a8ef-4bec-9729-f7486e8327cb",
});
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.rag.searchIndexes.getIndexSchemaDetail({
indexId: "af850b81-3290-4f41-83af-f0d2ac1b070d",
schemaId: "fc2825a7-a8ef-4bec-9729-f7486e8327cb",
});
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.rag.search_indexes.get_index_schema_detail(index_id="af850b81-3290-4f41-83af-f0d2ac1b070d", schema_id="fc2825a7-a8ef-4bec-9729-f7486e8327cb")
# 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.rag.search_indexes.get_index_schema_detail(index_id="af850b81-3290-4f41-83af-f0d2ac1b070d", schema_id="fc2825a7-a8ef-4bec-9729-f7486e8327cb")
# Handle response
print(res)
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/detail \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/detail \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"embedding_dimensions": null,
"fields": [
{
"index_type": "ann",
"name": "My resource",
"storage": "in_memory",
"type": "int"
}
],
"name": "My resource"
}{
"embedding_dimensions": null,
"fields": [
{
"index_type": "ann",
"name": "My resource",
"storage": "in_memory",
"type": "int"
}
],
"name": "My resource"
}Get Index Schema File
GET /v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/file
Get Index Schema File
index_id
schema_id
200
Successful Response
content
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.rag.searchIndexes.getIndexSchemaFile({
indexId: "252c6de5-4c9b-43b5-8c30-54524a59cb57",
schemaId: "93166e46-2e3c-4b20-b9a5-8607304372d2",
});
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.rag.searchIndexes.getIndexSchemaFile({
indexId: "252c6de5-4c9b-43b5-8c30-54524a59cb57",
schemaId: "93166e46-2e3c-4b20-b9a5-8607304372d2",
});
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.rag.search_indexes.get_index_schema_file(index_id="252c6de5-4c9b-43b5-8c30-54524a59cb57", schema_id="93166e46-2e3c-4b20-b9a5-8607304372d2")
# 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.rag.search_indexes.get_index_schema_file(index_id="252c6de5-4c9b-43b5-8c30-54524a59cb57", schema_id="93166e46-2e3c-4b20-b9a5-8607304372d2")
# Handle response
print(res)
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/file \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/file \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"content": null
}{
"content": null
}Document Lookup
GET /v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/retrievables/retrievable/{document_id}
Fetch stored information about a retrievable element stored in an index
index_id
schema_id
document_id
200
Successful Response
fields
id
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.rag.searchIndexes.documentLookup({
indexId: "77308a24-2d8e-4392-9ab4-38770b2bb993",
schemaId: "1fe735e7-4ec0-4264-b715-12a944fe2b87",
documentId: "<id>",
});
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.rag.searchIndexes.documentLookup({
indexId: "77308a24-2d8e-4392-9ab4-38770b2bb993",
schemaId: "1fe735e7-4ec0-4264-b715-12a944fe2b87",
documentId: "<id>",
});
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.rag.search_indexes.document_lookup(index_id="77308a24-2d8e-4392-9ab4-38770b2bb993", schema_id="1fe735e7-4ec0-4264-b715-12a944fe2b87", document_id="<id>")
# 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.rag.search_indexes.document_lookup(index_id="77308a24-2d8e-4392-9ab4-38770b2bb993", schema_id="1fe735e7-4ec0-4264-b715-12a944fe2b87", document_id="<id>")
# Handle response
print(res)
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/retrievables/retrievable/{document_id} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/retrievables/retrievable/{document_id} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"fields": [
null
],
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}{
"fields": [
null
],
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}Document Fetch
GET /v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/retrievables
Fetch a few stored retrievable elements from the index/schema
index_id
schema_id
group_id
Only retrieve from this group
200
Successful Response
VespaGetRetrievableResponseRetrievable
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.rag.searchIndexes.documentsFetch({
indexId: "7c9f7007-1a54-48fd-b6da-93e91f31f6aa",
schemaId: "7eb7703c-1b80-4ecc-8a8b-288b43e1f30e",
});
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.rag.searchIndexes.documentsFetch({
indexId: "7c9f7007-1a54-48fd-b6da-93e91f31f6aa",
schemaId: "7eb7703c-1b80-4ecc-8a8b-288b43e1f30e",
});
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.rag.search_indexes.documents_fetch(index_id="7c9f7007-1a54-48fd-b6da-93e91f31f6aa", schema_id="7eb7703c-1b80-4ecc-8a8b-288b43e1f30e")
# 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.rag.search_indexes.documents_fetch(index_id="7c9f7007-1a54-48fd-b6da-93e91f31f6aa", schema_id="7eb7703c-1b80-4ecc-8a8b-288b43e1f30e")
# Handle response
print(res)
curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/retrievables \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/rag/indexes/index/{index_id}/schemas/schema/{schema_id}/retrievables \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
[
{
"fields": [
null
],
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}
][
{
"fields": [
null
],
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}
]