베타 RAG 검색 인덱스 엔드포인트
베타 RAG 검색 인덱스 엔드포인트 (Beta Rag Search Indexes Endpoints)
(beta) RAG API - search indexes입니다. 벡터 검색 인덱스(deployment)를 등록·조회·해제하고 메트릭을 갱신하는 엔드포인트예요.
출처: 문서
본문
검색 인덱스를 관리하는 베타 엔드포인트 모음이에요. Vespa 기반 deployment를 등록해두면 RAG 검색에 쓸 수 있고, 상태·문서 수 같은 메트릭을 갱신하며, 필요 없어지면 해제할 수 있답니다.
GET /v1/rag/deployments — Get Deployment Summaries (배포 요약 조회)
사용자에게 제공되는 모든 인덱스를 가져옵니다.
응답 필드 (200 Successful Response):
deployments#array<GetDeploymentSummariesResponseDeployment>(필수) — 배포 요약 목록.
curl:
curl https://api.mistral.ai/v1/rag/deployments \
-X GET \
-H 'Authorization: Bearer ***'
TypeScript:
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: proces...EY"] ?? "",
});
async function run() {
const result = await mistral.beta.rag.searchIndexes.getDeploymentSummaries();
console.log(result);
}
run();
응답 예시 (200):
{
"deployments": [
{
"created_at": "2025-12-17T10:25:07.818693Z",
"creator_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"deployment": {
"indexes": [
{
"document_count": null,
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"name": "My resource"
}
]
},
"document_count": 87,
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"modified_at": "2025-12-17T10:41:03.469341Z",
"name": "My resource",
"status": "online"
}
]
}
PUT /v1/rag/deployments — Register (or re-register) a search index (검색 인덱스 등록·재등록)
검색 인덱스를 등록(또는 재등록)합니다.
요청 본문:
deployment#RegisterDeploymentRequestVespaDeployment(필수) — Vespa 배포 설정.name#string(필수) — 인덱스 이름.status#"online"|"offline"— 기본값"offline"— 배포 상태.
응답 필드 (200 Successful Response):
id#string(필수)
curl:
curl https://api.mistral.ai/v1/rag/deployments \
-X PUT \
-H 'Authorization: Bearer ***' \
-H 'Content-Type: application/json' \
-d '{
"deployment": {
"indexes": [
{
"fields": [
{
"index_type": "ann",
"multidimensional": false,
"name": "My resource",
"ranking": "count",
"storage": "in_memory",
"type": "int"
}
],
"name": "My resource",
"sd": "reprehenderit ut dolore"
}
],
"query_url": "occaecat dolor sit",
"vespa_version": "nostrud"
},
"name": "My resource"
}'
TypeScript:
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: proces...EY"] ?? "",
});
async function run() {
const result = await mistral.beta.rag.searchIndexes.registerDeployment({
name: "<value>",
deployment: {
type: "vespa",
vespaVersion: "<value>",
indexes: [],
queryUrl: "https://joyful-granny.info",
},
});
console.log(result);
}
run();
응답 예시 (200):
{
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}
DELETE /v1/rag/deployments/{deployment_id} — Unregister Deployment (배포 해제)
배포에 대한 모든 정보를 삭제합니다.
경로 파라미터:
deployment_id#string(필수)
응답 (200): 타입 any.
curl:
curl https://api.mistral.ai/v1/rag/deployments/{deployment_id} \
-X DELETE \
-H 'Authorization: Bearer ***' \
-H 'Content-Type: application/json'
TypeScript:
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: proces...EY"] ?? "",
});
async function run() {
const result = await mistral.beta.rag.searchIndexes.unregisterDeployment({
deploymentId: "240a5e63-fd68-4806-8290-04cce22b4c37",
});
console.log(result);
}
run();
PUT /v1/rag/deployments/{deployment_id}/metrics — Update Index Metrics (인덱스 메트릭 갱신)
주어진 인덱스의 메트릭(문서 수, 상태 등)을 갱신합니다.
경로 파라미터:
deployment_id#string(필수)
요청 본문: UpdateMetricsRequestDeploymentMetricsOnline|UpdateMetricsRequestDeploymentMetricsOffline
UpdateMetricsRequestDeploymentMetricsOnline—{object}UpdateMetricsRequestDeploymentMetricsOffline—{object}
응답 (200): 타입 any.
curl:
curl https://api.mistral.ai/v1/rag/deployments/{deployment_id}/metrics \
-X PUT \
-H 'Authorization: Bearer ***' \
-H 'Content-Type: application/json' \
-d '{
"document_count": 87,
"index_metrics": [
{
"document_count": 14,
"name": "My resource"
}
],
"status": "consequat do"
}'
TypeScript:
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: proces...EY"] ?? "",
});
async function run() {
const result = await mistral.beta.rag.searchIndexes.updateIndexMetrics({
deploymentId: "b0c2f463-8aef-437d-83ac-d4bfae874584",
requestBody: {
status: "offline",
clearMetrics: false,
},
});
console.log(result);
}
run();
더 알아보기 (Learn more)
- Beta Rag Search Indexes Endpoints — 공식 API 문서
- RAG — RAG 안내