---
agentTools:
  projectIndex: https://preemo.readme.io/llms.txt
---

# List RAG collections

Lists all RAG collections associated with your workspace.

# OpenAPI definition

```json
{
  "externalDocs": {
    "description": "Gradient AI documentation",
    "url": "https://docs.gradient.ai"
  },
  "info": {
    "contact": {
      "email": "support@gradient.ai",
      "name": "Gradient AI Support",
      "url": "https://docs.gradient.ai/discuss"
    },
    "description": "Interface for interacting with Gradient AI.",
    "title": "Gradient AI API",
    "version": "1.0.0"
  },
  "openapi": "3.0.3",
  "security": [
    {
      "AccessToken": []
    }
  ],
  "servers": [
    {
      "description": "Production endpoint",
      "url": "https://api.gradient.ai/api"
    },
    {
      "url": "http://localhost:3026/api"
    }
  ],
  "x-readme": {
    "samples-languages": [
      "curl",
      "python",
      "node"
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "components": {
    "securitySchemes": {
      "AccessToken": {
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {
      "ListRagCollectionsSuccess": {
        "type": "object",
        "properties": {
          "ragCollections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "chunker": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "chunkerType": {
                          "type": "string",
                          "enum": [
                            "fileChunker"
                          ]
                        }
                      },
                      "required": [
                        "chunkerType"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "chunkerType": {
                          "type": "string",
                          "enum": [
                            "sentenceWithContextChunker"
                          ]
                        },
                        "contextSentences": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        },
                        "overlap": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        }
                      },
                      "required": [
                        "chunkerType",
                        "contextSentences",
                        "overlap",
                        "size"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "chunkerType": {
                          "type": "string",
                          "enum": [
                            "meaningBasedChunker"
                          ]
                        },
                        "overlap": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "sentenceGroupLength": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        },
                        "similiarityPercentThreshold": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        }
                      },
                      "required": [
                        "chunkerType",
                        "overlap",
                        "sentenceGroupLength",
                        "similiarityPercentThreshold",
                        "size"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "chunkerType": {
                          "type": "string",
                          "enum": [
                            "normalChunker"
                          ]
                        },
                        "overlap": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        }
                      },
                      "required": [
                        "chunkerType",
                        "overlap",
                        "size"
                      ]
                    }
                  ]
                },
                "creationTime": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "latestUpdateTime": {
                  "type": "string",
                  "format": "date-time"
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "slug": {
                  "type": "string",
                  "enum": [
                    "bge-large"
                  ]
                }
              },
              "required": [
                "chunker",
                "creationTime",
                "id",
                "latestUpdateTime",
                "name",
                "slug"
              ]
            }
          }
        },
        "required": [
          "ragCollections"
        ]
      },
      "ListRagCollectionsError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "message"
        ]
      }
    }
  },
  "paths": {
    "/rag-collections": {
      "get": {
        "description": "Lists all RAG collections associated with your workspace.",
        "operationId": "ListRagCollections",
        "summary": "List RAG collections",
        "tags": [
          "RAG"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "name": "x-gradient-workspace-id",
            "in": "header"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRagCollectionsSuccess"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRagCollectionsError"
                }
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 201,
      "2": 83,
      "3": 144,
      "4": 228,
      "5": 32,
      "6": 103,
      "7": 0,
      "8": 117,
      "9": 236,
      "10": 84,
      "11": 142
    }
  }
}
```