---
title: "Compute Rag Indexes In Batch"
method: POST
path: "/v1/convai/knowledge-base/rag-index"
tags: ["Agents Platform"]
---

# Compute Rag Indexes In Batch

`POST /v1/convai/knowledge-base/rag-index`

Retrieves and/or creates RAG indexes for multiple knowledge base documents in a single request. Maximum 100 items per request.

## Headers

- `xi-api-key` string, nullable — Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- BodyComputeRAGIndexesInBatchV1ConvaiKnowledgeBaseRagIndexPost
  - `items` GetOrCreateRAGIndexRequestModel[], required — List of requested RAG indexes. Minimum 1, maximum 100 items.
    - `document_id` string, required — ID of the knowledgebase document for which to retrieve the index
    - `create_if_missing` boolean, required — Whether to create the RAG index if it does not exist
    - `model` 'e5_mistral_7b_instruct' | 'multilingual_e5_large_instruct', required

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation.md) · [All operations](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elevenlabs/elevenlabs-api-documentation/revisions/f053c821dc18/schema)
