REST APIs
While gRPC provides low latency and excellent scalability, REST APISs provide a more traditional and sometimes simpler integration path. REST is often the choice for web-based applications that do not require real-time communication.
API Formatting Guidelines
You can find all of our APIs at https://api.vectara.io/<version>/<api-endpoint>
The API endpoints are outlined in the various subsections of this API Reference
section. These endpoints are automatically derived from the protobuf definitions
and take the same parameters. At a high level, the api-endpoint
derives from
services.proto
specifically, and the API parameters are in other .proto
files.
The translation from the protobuf definitions to REST is:
- The only
version
currently available isv1
. api-endpoint
is lowercase and has hyphens. For example, the gRPC callCreateCorpus
in services.proto is/create-corpus
.- API parameters can be sent in either
camelCase
or lowercase withunderscores
.
For example, you could submit eithernumResults
ornum_results
in the Search API. - JSON responses are always returned in
camelCase
form.
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 Playground and OpenAPI Specifications
You can find up-to-date OpenAPI specifications at https://docs.vectara.com/vectara-oas.yaml. These REST API specifications are automatically derived from the gRPC protobuf definitions as well.
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 Playground and make real-time API calls from your browser.
List of Vectara REST APIs
Vectara provides the following REST APIs:
Account Admin APIs
The Compute Account Size API lets you view how much quota you consumed across the entire account.
Authentication APIs
The Authentication APIs let you manage users and the API keys in your system. The User Admin APIs display corpus access and customer-level authorizations, and also let you perform different user and team management activities:
The API Key Admin APIs help you manage the lifecycle and security of API keys:
Corpus Admin APIs
The Corpus Admin APIs enable you to programmatically manipulate corpora and perform many operations such as viewing corpus consumption, size, associated API keys, and more:
- Create Corpus API
- Delete Corpus API
- Reset Corpus API
- Update Corpus Enablement API
- Read Corpus API
- Compute Corpus Size API
Document Admin APIs
The Document Admin APIs let you view Document IDs, metadata, and delete documents from corpora:
Indexing APIs
Selecting the ideal Indexing API for your application can significantly impact the effectiveness of integrating Vectara’s search functionalities into your application. Vectara provides the following indexing APIs for different scenarios:
Query APIs
The Query APIs let you define parametres and perform queries against your data:
Chat APIs
The Chat APIs provide a streamlined solution for integrating chatbot functionalities into domain-specific applications and websites using Retrieval Augmented Generation (RAG):
- List Conversations API
- Read Conversations API
- Delete Conversations API
- Delete Turns API
- Disable Turns API
Not all REST API endpoints have long-form documentation in this API Reference. For example, information about Get Usage Metrics is in the API Playground.