---
title: "Compute Rag Index."
method: POST
path: "/v1/convai/knowledge-base/{documentation_id}/rag-index"
tags: ["Agents Platform"]
---

# Compute Rag Index.

`POST /v1/convai/knowledge-base/{documentation_id}/rag-index`

In case the document is not RAG indexed, it triggers rag indexing task, otherwise it just returns the current status.

## Path parameters

- `documentation_id` string, required — The id of a document from the knowledge base. This is returned on document addition.

## 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

- RAGIndexRequestModel
  - `model` 'e5_mistral_7b_instruct' | 'multilingual_e5_large_instruct', required

## Response `200`

Successful Response

- RAGDocumentIndexResponseModel
  - `id` string, required
  - `model` 'e5_mistral_7b_instruct' | 'multilingual_e5_large_instruct', required
  - `status` 'new' | 'created' | 'processing' | 'failed' | 'succeeded' | 'rag_limit_exceeded' | 'document_too_small' | 'cannot_index_folder', required
  - `progress_percentage` number, required
  - `document_model_index_usage` RAGDocumentIndexUsage, required
    - `used_bytes` integer, required

## 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/versions/57d56f34628a/schema)
