REST APIs
While gRPC provides low latency and excellent scalability, REST APIs provide a traditional integration path for web-based applications. With the introduction of Vectara's REST API 2.0, developers can now leverage a more intuitive and user-friendly API design that follows RESTful principles and simplifies the getting started experience.
REST API v1 was deprecated and fully retired on August 16, 2025. Migrate to API v2 as soon as possible.
Review the REST API 1.0 to 2.0 migration guide which highlights important differences between the Vectara REST API v1 and REST API v2.
API formatting guidelines
You can find all of our APIs at https://api.vectara.io/v2/<api-endpoint>
The API endpoints are outlined in the various subsections of this API
Reference section and are designed to be intuitive and follow a standard
RESTful structure.
- The current version is v2.
api-endpoint
follows a hierarchical structure, using lowercase and hyphens. For example,/corpora/:corpus_key/documents
.
API authentication
All Vectara APIs are authenticated. Indexing and Search APIs can be authenticated via API Keys. The Personal API Key enables most Admin actions for creating and deleting corpora, but for deleting accounts and accessing billing data, you need to use OAuth 2.0.
API Reference and OpenAPI specifications
You can find up-to-date OpenAPI specifications at https://docs.vectara.com/vectara-oas-2.yaml. These specifications provide a comprehensive overview of the available endpoints, request/response formats, and authentication requirements.
You can use these with tools of your choosing like Insomnia or Postman.
- Download the OpenAPI YAML file.
- Import the file into Insomonia or Postman.
- Start making API calls directly from the tool.
Want to try the REST APIs live in your browser? Head over to our our API Reference and make real-time API calls from your browser.
List of Vectara REST 2.0 endpoints
Vectara provides the following REST 2.0 endpoints:
Request timeouts
By default, requests will take as long as they need to complete. However, you
can request a maximum time for most of the APIs to take by specifying the
Request-Timeout
or Request-Timeout-Millis
parameters in the HTTP headers.
Request-Timeout
is specified in seconds and if you need a more granular
timeout, you can use Request-Timeout-Millis
. Note that both parameters are
considered best-effort: in the event either time lapses, Vectara will attempt
to terminate the request as soon as possible after.
Queries
The following endpoints help you with queries:
- Query API: Perform searches across one or more corpora using advanced filtering, pagination, and summarization options.
- Simple Corpus Query API: Execute lightweight searches on a single corpus.
- Advanced Corpus Query API: Perform advanced queries on a specific corpus with additional filtering and customization options.
Query histories
The following endpoints help you with query histories:
- Get Query History API: Retrieve detailed history about a specific query that was made against a corpus
- List Query Histories API: Retrieve, update, and manage query history for a specific corpus
Corpora
The following endpoints enable you to programmatically manipulate corpora and perform many operations such as viewing corpus consumption, size, associated API keys, and more:
- Create Corpus API: Create a new corpus to store and manage documents.
- List Corpora API: Get a list of all corpora in your account.
- Get Corpus API: Retrieve metadata about a specific corpus.
- Delete Corpus API: Remove a corpus and all its associated data.
- Update Corpus API: Enable/disable the corpus or update filter attributes.
- Reset Corpus API: Clear all documents and data from a corpus while keeping the corpus itself.
- Replace Corpus Filter Attributes API: Update the filterable attributes of a corpus.
Index and upload documents
The following endpoints help you index, upload files, and manage documents:
- Index Document API: Add a document to a corpus in either structured or core format.
- File Upload API: Upload files to a corpus for automatic parsing and document extraction.
- List Documents API: Retrieve a list of documents in a specific corpus.
- Retrieve Document API: Retrieve the content and metadata of a specific document.
- Delete Document API: Remove a document from a corpus.
- Update Document Metadata API: Update the metadata of a document in a corpus.
- Replace Document Metadata API: Completely replace the metadata of a document.
Document Processing
The following endpoints provide specialized document processing capabilities:
- Summarize Document API: Generate summaries of documents using AI-powered summarization.
Table Extractors
The following endpoints help you extract and process tabular data from documents:
- List Table Extractors API: Get a list of available table extraction models for processing structured data in documents.
Chats
The following endpoints provide a streamlined solution for integrating chatbot functionalities into domain-specific applications and websites using Retrieval Augmented Generation (RAG):
- Chat API Overview describes chats at a higher level.
- Create Chat API: Start a new chat session with default retrieval parameters.
- List Chats API: Get a list of all chat sessions.
- Get Chat API: Retrieve a chat summary, including the initial message.
- Delete Chat API: Remove a chat session and all its associated turns.
- Create Chat Turn API: Add a message-response pair, also known as a turn, to an existing chat.
- Get Chat Turn API: Retrieve a specific turn from a chat.
- List Chat Turns API: Get a list of all turns within a chat.
- Update Chat Turn API: Modify a turn, such as enabling or disabling it.
- Delete Chat Turn API: Remove a turn from a chat, along with all subsequent turns.
Agents
The following endpoints help you build and manage AI agents with custom instructions and tool integrations:
- Agent APIs Overview: Learn about Vectara's AI agent framework and capabilities.
- Create Agent API: Create a new AI agent with custom instructions and tool configurations.
- Get Agent API: Retrieve details about a specific agent.
- List Agents API: Get a list of all agents in your account.
- Update Agent API: Modify an agent's configuration, instructions, or tool settings.
- Delete Agent API: Remove an agent from your account.
Agent Sessions
- Create Agent Session API: Start a new conversation session with an agent.
- Get Agent Session API: Retrieve details about a specific agent session.
- List Agent Sessions API: Get a list of all sessions for an agent.
- Update Agent Session API: Modify session settings or status.
- Delete Agent Session API: Remove a session and its conversation history.
Agent Events
- Create Agent Event API: Send a message or event to an agent session.
- Get Agent Event API: Retrieve details about a specific agent event.
- List Agent Events API: Get the event history for an agent session.
Agent Instructions
- Create Instruction API: Create custom instructions for agent behavior.
- Get Instruction API: Retrieve details about specific agent instructions.
- List Instructions API: Get a list of all available instructions.
- Update Instruction API: Modify existing agent instructions.
- Delete Instruction API: Remove instructions from your account.
- Delete Instruction Version API: Remove a specific version of instructions.
- Test Instruction API: Test instructions before deploying to agents.
Agent Tools and Tool Servers
- Get Tool API: Retrieve details about a specific agent tool.
- List Tools API: Get a list of all available agent tools.
- Update Tool API: Modify tool configurations and settings.
- Delete Tool API: Remove a tool from your account.
- Create Tool Server API: Set up a new tool server for custom agent functionality.
- Get Tool Server API: Retrieve details about a specific tool server.
- List Tool Servers API: Get a list of all tool servers.
- Update Tool Server API: Modify tool server configurations.
- Sync Tool Server API: Synchronize tools from a tool server.
- Delete Tool Server API: Remove a tool server from your account.
Encoders, rerankers, and large language models (LLMs)
The following endpoints help you manage encoders, rerankers, and LLMs:
- Create Encoder API: Create a custom encoder for document embedding and vectorization.
- List Encoders API: Get a list of available encoders for document embedding.
- List Rerankers API: Get a list of available rerankers for improving search result ranking.
- Create LLM API: Add a custom large language model configuration for query and chat endpoints.
- Get LLM API: Retrieve details about a specific large language model.
- List LLMs API: Get a list of available large language models for query and chat endpoints.
- Delete LLM API: Remove a custom large language model configuration.
- List Generation Presets API: Get a list of available generation presets for configuring prompt templates and model parameters.
LLM Chat Completions
The following endpoint provides OpenAI-compatible chat completions:
- Chat Completions API: OpenAI-compatible chat completions endpoint for direct LLM interactions.
Hallucination Detection and Correction
The following endpoints help you detect and correct hallucinations in AI-generated content:
- Evaluate Factual Consistency API: Evaluate the factual consistency of AI-generated responses using Hughes Hallucination Evaluation Model (HHEM).
- Hallucination Correction Models API: Access hallucination correction models for improving response accuracy.
Jobs
The following endpoints help you manage background jobs:
- Get Job API: Retrieve details about a specific background job.
- List Jobs API: Get a list of all background jobs for the account.
Users
The following endpoints help you manage users on your account:
- Create User API: Add a new user to the current customer account.
- Get User API: Retrieve details about a specific user.
- List Users API: Get a list of all users in the account.
- Update User API: Modify a user's details, such as enabled status or assigned roles.
- Delete User API: Remove a user from the account.
- Reset User Password API: Initiate a password reset for a user.
API keys
The following endpoints help you manage the lifecycle and security of API keys:
- Create API Key API: Generate a new API key for authentication.
- Get API Key API: Retrieve details about a specific API key.
- List API Keys API: Get a list of all API keys for the account.
- Update API Key API: Modify an API key, such as enabling or disabling it.
- Delete API Key API: Remove an API key from the account.
Application Clients
The following endpoints help you manage OAuth 2.0 application clients on your account:
- Create Application Client API: Add a new OAuth 2.0 application client for authentication.
- Get Application Client API: Retrieve details about a specific application client.
- List Application Clients API: Get a list of all application clients for the account.
- Update Application Client API: Modify an application client's details, such as assigned roles.
- Delete Application Client API: Remove an application client from the account.
Not all REST API endpoints have long-form documentation in this API Reference. For example, information about Get Usage Metrics is in the API Reference.