Vectara
Back to blog
Tools

Announcing Vectara’s Postman collection

How to develop your generative AI application with seamless integration of Postman with Vectara

8-minute read timeAnnouncing Vectara’s Postman collection

Developing a generative AI application with Vectara and Postman enables seamless integration of advanced language understanding and text generation. Vectara’s API allows you to upload data, retrieve context-aware insights, and generate human-like responses using its powerful retrieval-augmented generation (RAG) approach. By leveraging features like re-rankers, contextual configurations, and factual consistency scoring, you can fine-tune AI-generated outputs for accuracy and relevance, making your application more intelligent and responsive.

At Vectara, we’re committed to providing developers with the best tools to build GenAI applications that leverage our end-to-end Enterprise RAG platform for creating AI assistants and agents.

We recently released a new REST API (API v2) that significantly simplifies how you interact with the platform. While we also offer a Python SDK (in beta), we realize many developers prefer to visualize and experiment with APIs directly in a Postman workspace.

That’s why today, we’re excited to show you how to use Postman to call Vectara’s REST API, seamlessly handling endpoints for uploading documents, indexing data, querying, chatting, and more.

Why Postman?

Postman provides a user-friendly way to work with REST APIs. You can:

  • Organize your requests in collections,
  • Reuse environment variables for authentication and other settings,
  • Experiment with different request bodies, headers, and parameters,
  • Collaborate with team members by sharing collections and environments,
  • Document your API usage through built-in features.

Vectara’s dedicated Postman collection includes every route the Vectara API supports—so you can make all your calls right from Postman without having to write boilerplate code or manage complex scripts.

Whether you’re just getting started or you’re already an experienced Postman user, read on to learn how to use Vectara with Postman.

Getting started

1. Fork the Vectara Postman collection

The easiest way to begin is to head over to the Postman Workspace. This workspace contains the Vectara API which has all the endpoints available in our platform.

To use the collection, you will first need to fork it (create your own copy).

Once you open the main folder titled “Vectara REST API v2” on the left, you’ll see folders like:

  • corpora (where you can create, update, delete, or retrieve corpora and documents),
  • query (for semantic search and retrieval),
  • chats (for multi-turn conversational flows),
  • llms (to manage LLM-specific settings),
  • and many others.

Simply double click the three dots next to “Vectara REST API v2” and Create a fork.

Image 1: fork the Postman Vectara collection

Once you have the Vectara API in your workspace you are ready to set up Authentication.

2. Set up authentication

Vectara Postman currently supports API Key authentication. In Postman, you can seamlessly add your “personal API Key” under the Authorization section, as shown in image 1 below:

Image 2: Setting up Vectara Authentication with your personal API key.

Click Store in Vault for further use in other endpoints.

Using Postman endpoints

Now that your Postman collection is all set up, and authentication is configured, you can start making API calls.

Below are some of the main API calls you’ll use when building GenAI apps with Vectara, along with tips on how to configure them in Postman.

1. Creating a corpus

A corpus in Vectara is like a container for your documents (similar to an Index in a database). You can quickly create one in Postman:

Under the corpora folder, find the “POST Create a corpus” request.

Image 3: Body of Create a corpus endpoint

2. In the Body tab, you’ll see a JSON object that might look like this feel free to change name and description to the following:

You can leave other fields at their default values.

3. Click Send to create the corpus. Copy the key to your clipboard.

2. Uploading files

Uploading files is a quick and easy way to ingest data into Vectara’s platform. Once uploaded, the platform automatically extracts text from the file, chunks that text, and encodes each chunk into vectors with our Boomerang embedding model.

In the Postman collection, look for “POST Upload a file to the corpus”:

  1. Add the corpus key you just copied to corpus_key in the Params section.
  2. In the Authorization tab, uncheck everything except Accept.
  3. Navigate to the Body tab and switch to form-data.
  4. Check the fields for file and filename.
  5. Click Select Files under the Value column in the file row.
  6. Choose the file from your local machine (e.g., GuessThePrice_Documents_Final2.pdf).

Click Send, and Postman will upload your file. The response will confirm that the document has been successfully queued for indexing.

3. Running a query

Running a query in Vectara allows you to retrieve relevant information from your uploaded data quickly and efficiently. By following these steps in Postman, you can execute a search query and retrieve results from your corpus.

  1. In the Postman collection, locate “POST multiple corpora query” under the Query folder.
  2. Navigate to the Headers section and ensure that only Accept is checked.
  3. Go to the Body tab and switch to raw with JSON format.
  4. Paste the following JSON expression into the body:

5.5. Click Send, and Postman will execute the query.

6. Review the response to see the results retrieved from your corpus.

Key Notes:

  • Ensure that the corpus_key matches the one used during file upload.
  • Modify the query field to search for different information.
  • Adjust parameters such as limit to control the number of results returned.
  • reranker_id: rnk_272725719 corresponds to Rerank_Multilingual_v1 — Multilingual re-ranker that reorders retrieved search results based on relevance to the query.

4. Using chat

Vectara’s chat feature allows for interactive conversations based on your uploaded data - it maintains the turn-by-turn query and response pairs in a session. By following these steps in Postman, you can send a chat query and receive responses in real-time.

  1. In the Postman collection, locate “POST chat” under the Chat folder.
  2. Navigate to the Headers section and ensure that only Accept is checked.
  3. Go to the Body tab and switch to raw with JSON format.
  4. Paste the following JSON expression into the body:

5. Click Send, and Postman will submit the chat query.

In order to continue the chat you can go to the “Create a new turn in the chat” endpoint. You can copy the chat_id at the top of the Body of the response and paste it into the Value section for chat_id in the Params page.

In the body you can try a new query and it will work just like the “Start a chat” endpoint.

Key Notes:

  • Ensure the corpus_key matches the one used during file upload.
  • Modify the query field to ask different questions.
  • The chat.store field allows for maintaining chat history, making follow-up queries possible.

In order to continue the chat you can go to the “Create a new turn in the chat” endpoint. You can copy the chat_id

Other useful endpoints

The Postman collection also includes endpoints for:

  • Corpus Administration: listing, updating, and deleting corpora.
  • Document Management: listing or retrieving individual documents, or removing them.
  • Account and Access: managing users, API keys, and OAuth clients.
  • LLM Configuration: exploring different large language models, generative presets, and re-rankers.
  • Observability: retrieving query or chat history, investigating performance, and more.

Because the collection is automatically kept in sync with Vectara’s API, you’ll always have the latest endpoints and request templates at your fingertips.

Streaming responses

For those building real-time or streaming applications, Vectara’s query and chat endpoints can return responses in a streaming fashion.

While Postman might not display streaming tokens as they arrive in exactly the same way a CLI or custom app would, you can still test streaming endpoints by toggling the Postman settings to ensure chunked responses are handled properly.

Conclusion

By using Postman to call Vectara’s REST API, you’ll get a friendly, visual environment for every step of your AI application journey: from uploading files and indexing custom text, to running queries, exploring multi-turn chat sessions, and managing your data.

This approach frees you from the hassle of writing boilerplate code, allowing you to focus on building features that matter. Whether you’re just trying out Vectara or already using it in production, Postman can help you quickly prototype, test, and refine your GenAI applications.

Try it out!

  1. Sign up for Vectara’s 30-day free trial if you haven’t already.
  2. Download (or clone) the Vectara Postman collection from the link you received.
  3. Configure your Postman environment variables (for authentication and customer_id).
  4. Start sending requests: create a corpus, upload a document, and query it!

If you run into any issues or have feature requests, drop us a line on our Discord server, or open an issue on the Vectara documentation repository. We’re excited to see what you’ll build with Vectara’s end-to-end RAG platform—directly from Postman!

Happy building and see you in the Postman workspace!

Get Started!Create your Vectara account today!Sign up for Vectara!
Get Started!

Before you go...

Connect with
our Community!