openapi: 3.1.0 info: title: LlamaIndex LlamaCloud Index API description: >- The LlamaCloud Index API provides a fully automated document ingestion pipeline with built-in retrieval capabilities. It allows developers to create and manage indexes (pipelines), upload documents for automatic parsing and embedding, and perform retrieval queries against indexed content. The API supports customizable pipeline configurations and integrates with various vector stores, making it suitable for building production RAG applications without managing infrastructure. version: '1.0' contact: name: LlamaIndex Support url: https://www.llamaindex.ai/contact termsOfService: https://www.llamaindex.ai/terms-of-service externalDocs: description: Index API and Clients Guide url: https://developers.llamaindex.ai/python/cloud/llamacloud/guides/api_sdk/ servers: - url: https://api.cloud.llamaindex.ai/api/v1 description: US Production Server - url: https://api.cloud.llamaindex.eu/api/v1 description: EU Production Server tags: - name: Index Data Sources description: >- Connect and manage external data sources for automatic document ingestion into an index. - name: Index Files description: >- Manage files within an index, including upload, listing, and status monitoring. - name: Index Retrieval description: >- Query indexed content using configurable retrieval modes and parameters. - name: Index Status description: >- Monitor the processing status and health of an index. - name: Indexes description: >- Create and manage indexes that serve as automated document ingestion pipelines with retrieval capabilities. security: - bearerAuth: [] paths: /pipelines: get: operationId: listIndexes summary: List indexes description: >- Retrieve a list of all indexes (pipelines) for the specified project. Each index represents an automated document ingestion pipeline with retrieval capabilities. tags: - Indexes parameters: - name: project_id in: query description: >- Filter indexes by project identifier. required: true schema: type: string responses: '200': description: Successfully retrieved list of indexes content: application/json: schema: type: array items: $ref: '#/components/schemas/Index' '401': description: Unauthorized - invalid or missing API key post: operationId: createIndex summary: Create an index description: >- Create a new index with specified configuration for document ingestion, parsing, embedding, and vector storage. The index automatically handles processing uploaded documents into a queryable format. tags: - Indexes requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateIndexRequest' responses: '201': description: Index created successfully content: application/json: schema: $ref: '#/components/schemas/Index' '400': description: Bad request - invalid index configuration '401': description: Unauthorized - invalid or missing API key /pipelines/{pipelineId}: get: operationId: getIndex summary: Get an index description: >- Retrieve detailed information about a specific index including its configuration, processing status, and file counts. tags: - Indexes parameters: - $ref: '#/components/parameters/pipelineId' responses: '200': description: Successfully retrieved index details content: application/json: schema: $ref: '#/components/schemas/Index' '401': description: Unauthorized - invalid or missing API key '404': description: Index not found delete: operationId: deleteIndex summary: Delete an index description: >- Delete an index and its associated processed data. tags: - Indexes parameters: - $ref: '#/components/parameters/pipelineId' responses: '200': description: Index deleted successfully '401': description: Unauthorized - invalid or missing API key '404': description: Index not found /pipelines/{pipelineId}/sync: post: operationId: syncIndex summary: Sync an index description: >- Trigger an incremental sync of the index, processing any new or modified documents from connected data sources and uploaded files. tags: - Indexes parameters: - $ref: '#/components/parameters/pipelineId' responses: '200': description: Index sync initiated successfully content: application/json: schema: $ref: '#/components/schemas/IndexJob' '401': description: Unauthorized - invalid or missing API key '404': description: Index not found /pipelines/{pipelineId}/files: get: operationId: listIndexFiles summary: List index files description: >- Retrieve a list of files in the index along with their processing status. Use this endpoint to monitor which files have been successfully indexed. tags: - Index Files parameters: - $ref: '#/components/parameters/pipelineId' responses: '200': description: Successfully retrieved list of index files content: application/json: schema: type: array items: $ref: '#/components/schemas/IndexFile' '401': description: Unauthorized - invalid or missing API key '404': description: Index not found put: operationId: addFilesToIndex summary: Add files to an index description: >- Add previously uploaded files to the index for automatic processing. Files can include optional custom metadata that is preserved through the indexing pipeline. tags: - Index Files parameters: - $ref: '#/components/parameters/pipelineId' requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/IndexFileInput' responses: '200': description: Files added to index successfully '400': description: Bad request - invalid file references '401': description: Unauthorized - invalid or missing API key '404': description: Index not found /pipelines/{pipelineId}/files/count: get: operationId: getIndexFileCounts summary: Get index file counts description: >- Retrieve file processing counts for an index, broken down by status. Use this endpoint to determine when an index is ready to query by checking that files have been successfully processed. tags: - Index Status parameters: - $ref: '#/components/parameters/pipelineId' responses: '200': description: Successfully retrieved file counts content: application/json: schema: $ref: '#/components/schemas/IndexFileCounts' '401': description: Unauthorized - invalid or missing API key '404': description: Index not found /pipelines/{pipelineId}/data-sources: get: operationId: listIndexDataSources summary: List index data sources description: >- Retrieve data sources connected to a specific index for automatic document ingestion. tags: - Index Data Sources parameters: - $ref: '#/components/parameters/pipelineId' responses: '200': description: Successfully retrieved list of data sources content: application/json: schema: type: array items: $ref: '#/components/schemas/DataSource' '401': description: Unauthorized - invalid or missing API key '404': description: Index not found put: operationId: addDataSourcesToIndex summary: Add data sources to an index description: >- Connect external data sources to an index for automatic document ingestion. The index will sync content from these sources based on the configured schedule. tags: - Index Data Sources parameters: - $ref: '#/components/parameters/pipelineId' requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/DataSourceInput' responses: '200': description: Data sources added to index successfully '400': description: Bad request - invalid data source configuration '401': description: Unauthorized - invalid or missing API key '404': description: Index not found /pipelines/{pipelineId}/retrieve: post: operationId: retrieveFromIndex summary: Retrieve from index description: >- Execute a retrieval query against the indexed content. Supports multiple retrieval modes (fast, accurate, advanced) and configurable parameters for controlling the number of results and re-ranking behavior. tags: - Index Retrieval parameters: - $ref: '#/components/parameters/pipelineId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RetrievalRequest' responses: '200': description: Retrieval results returned successfully content: application/json: schema: $ref: '#/components/schemas/RetrievalResponse' '400': description: Bad request - invalid query parameters '401': description: Unauthorized - invalid or missing API key '404': description: Index not found components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API Key description: >- LlamaCloud API key obtained from the LlamaCloud dashboard. Include as a Bearer token in the Authorization header. parameters: pipelineId: name: pipelineId in: path description: >- Unique identifier of the index (pipeline). required: true schema: type: string schemas: Index: type: object description: >- An index representing an automated document ingestion pipeline with built-in retrieval capabilities. properties: id: type: string description: >- Unique identifier of the index. name: type: string description: >- Human-readable name of the index. project_id: type: string description: >- Identifier of the project the index belongs to. status: type: string enum: - active - syncing - error - idle description: >- Current status of the index. embedding_model: type: string description: >- Name of the embedding model used for vectorization. sync_interval: type: integer description: >- Scheduled sync frequency in seconds, if configured. created_at: type: string format: date-time description: >- Timestamp when the index was created. updated_at: type: string format: date-time description: >- Timestamp when the index was last updated. CreateIndexRequest: type: object description: >- Request body for creating a new index. required: - name - project_id properties: name: type: string description: >- Human-readable name for the new index. project_id: type: string description: >- Identifier of the project to create the index in. embedding_model: type: string description: >- Name of the embedding model to use for vectorization. sync_interval: type: integer description: >- Optional scheduled sync frequency in seconds. IndexFile: type: object description: >- A file within an index, including its processing status. properties: file_id: type: string description: >- Unique identifier of the file. name: type: string description: >- Original file name. status: type: string enum: - pending - processing - completed - error description: >- Processing status of the file within the index. metadata: type: object additionalProperties: true description: >- Custom metadata associated with the file. IndexFileInput: type: object description: >- Input for adding a file to an index. required: - file_id properties: file_id: type: string description: >- Identifier of the file to add to the index. metadata: type: object additionalProperties: true description: >- Optional custom metadata to associate with the file. IndexFileCounts: type: object description: >- File processing counts for an index, broken down by status. properties: total: type: integer description: >- Total number of files in the index. pending: type: integer description: >- Number of files pending processing. processing: type: integer description: >- Number of files currently being processed. completed: type: integer description: >- Number of files successfully processed. error: type: integer description: >- Number of files that encountered processing errors. IndexJob: type: object description: >- A sync job for an index tracking the processing of documents. properties: id: type: string description: >- Unique identifier of the job. pipeline_id: type: string description: >- Identifier of the index the job belongs to. status: type: string enum: - pending - running - completed - failed description: >- Current status of the job. created_at: type: string format: date-time description: >- Timestamp when the job was created. completed_at: type: string format: date-time description: >- Timestamp when the job completed, if applicable. DataSource: type: object description: >- A data source connected to an index for automatic document ingestion. properties: id: type: string description: >- Unique identifier of the data source. name: type: string description: >- Human-readable name of the data source. source_type: type: string description: >- Type of the data source. config: type: object additionalProperties: true description: >- Configuration specific to the data source type. DataSourceInput: type: object description: >- Input for connecting a data source to an index. required: - name - source_type properties: name: type: string description: >- Human-readable name for the data source. source_type: type: string description: >- Type of the data source. config: type: object additionalProperties: true description: >- Configuration specific to the data source type. RetrievalRequest: type: object description: >- Request body for running a retrieval query against an index. required: - query properties: query: type: string description: >- The search query to run against the indexed content. mode: type: string enum: - fast - accurate - advanced description: >- Retrieval mode controlling the trade-off between speed and accuracy. top_k: type: integer minimum: 1 description: >- Maximum number of results to return after re-ranking. RetrievalResponse: type: object description: >- Response containing retrieval results from an index query. properties: results: type: array description: >- List of retrieval results ranked by relevance. items: $ref: '#/components/schemas/RetrievalResult' RetrievalResult: type: object description: >- A single retrieval result with matched content and metadata. properties: text: type: string description: >- The retrieved text content. score: type: number format: float description: >- Relevance score for the result. metadata: type: object additionalProperties: true description: >- Metadata associated with the retrieved content.