> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyzr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update RAG Configuration

> Update the configuration for an existing RAG setup by providing the config ID and updated values.

### Endpoint

**PUT** `/v3/rag/{config_id}/`

### Authentication

API Key (`x-api-key`) must be included in the header.

### Path Parameters

| Name       | Type   | Description                                |
| ---------- | ------ | ------------------------------------------ |
| config\_id | string | The ID of the RAG configuration to update. |

### Request Body

A JSON object containing the updated RAG configuration values.

#### JSON Schema

```json theme={null}
{
  "user_id": "string",
  "llm_credential_id": "string",
  "embedding_credential_id": "string",
  "vector_db_credential_id": "string",
  "description": "",
  "collection_name": "string",
  "llm_model": "string",
  "embedding_model": "string",
  "vector_store_provider": "string",
  "semantic_data_model": false,
  "meta_data": {}
}

```

### Response

```json theme={null}
{
  "success": true
}
```

### Example cURL Request

```bash theme={null}

curl -X PUT "https://rag-dev.test.studio.lyzr.ai/v3/rag/{config_id}/" ^
-H "accept: application/json" ^
-H "content-type: application/json" ^
-H "x-api-key: sk-default-EXAMPLEKEY123" ^
-d "{
  \"user_id\": \"user_123\",
  \"llm_credential_id\": \"llm_cred_abc\",
  \"embedding_credential_id\": \"embed_cred_xyz\",
  \"vector_db_credential_id\": \"vectordb_cred_789\",
  \"description\": \"Updated configuration for search\",
  \"collection_name\": \"my_collection\",
  \"llm_model\": \"gpt-4\",
  \"embedding_model\": \"text-embedding-ada-002\",
  \"vector_store_provider\": \"pinecone\",
  \"semantic_data_model\": true,
  \"meta_data\": {\"source\": \"internal\"}
}"


```


## OpenAPI

````yaml put /rag/{config_id}/
openapi: 3.0.3
info:
  title: Update Rag Config
  version: 1.0.0
  description: Updates an existing RAG configuration using the given config ID.
servers:
  - url: https://rag-prod.studio.lyzr.ai/v3
security: []
paths:
  /rag/{config_id}/:
    put:
      summary: Update Rag Config
      description: >-
        Update the configuration for an existing RAG setup by providing the
        config ID and updated values.
      operationId: updateRagConfig
      parameters:
        - name: config_id
          in: path
          required: true
          description: Unique identifier for the RAG configuration to update.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: string
                llm_credential_id:
                  type: string
                embedding_credential_id:
                  type: string
                vector_db_credential_id:
                  type: string
                description:
                  type: string
                collection_name:
                  type: string
                llm_model:
                  type: string
                embedding_model:
                  type: string
                vector_store_provider:
                  type: string
                semantic_data_model:
                  type: boolean
                meta_data:
                  type: object
              required:
                - user_id
                - llm_credential_id
                - embedding_credential_id
                - vector_db_credential_id
                - collection_name
                - llm_model
                - embedding_model
                - vector_store_provider
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
        '403':
          description: Forbidden - Invalid Permission
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Invalid Permission
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items:
                            oneOf:
                              - type: string
                              - type: integer
                        msg:
                          type: string
                        type:
                          type: string
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````