Quick Start Guide

Get set up with Locusive's API quickly

Locusive's API lets you access features that can help you find the right data points for your queries, which you can use to create your own chatbots, find documents, answer questions, implement internal search engines, or whatever you want.

This guide will help you get set up with integrating your first data sources and creating your first API queries.

Step 1: Create an account

The first step is to head over to the Locusive website and create a free account. Once you sign up and create your first organization, you'll be brought to your dashboard.

Step 2: Enter your OpenAI API Key

The next step is to enter your OpenAI API key, which will be used to turn your documents into embeddings for storage in a vector database. Click on the button to Add API Key and then enter your API key from OpenAI. We recommend using an API key from a paid ChatGPT subscription, as the free version is likely to encounter significant rate limits and delays.

Step 3: (Optional) Integrate your data sources

If you'd like to use your existing data sources as trusted documents, click on the Integrations link and connect any of your third party tools that contain the documents or data sources that you'd like to add. For example, if you'd like to connect a Google Drive folder, click on the Connect button for Google Drive and select the folder that contains the PDFs that you'd like to use to answer your questions.

If you're planning on using our API to send your data in, then you can skip this step and instead send in as you need to.

Step 4: Create your API key

Next, click on the API keys page and create your first Locusive API key.

Step 5: Send in your first API request

Once you've created your API key, you can send in your first query. Here's a quick example of how to use curl to send in an API request to search for up to 20 snippets in your document that are related to the phrase "vector database".

curl -X GET "https://api.locusive.com/v1/documents/top_matches?query=vector%20databases&max_results=20" -H "Authorization: Bearer YOUR_TOKEN_HERE"

If it works properly, you'll get a JSON response with that looks like the following:

[
  {
    "name": "All about vector databases.pdf",
    "summary": "This content discusses what vector databases are and how they work",
    "uri": "https://drive.google.com/file/d/1ZfAGWafaz65Jml3PfQyBzJK4jofSg1-f/view?usp=drivesdk",
    "type": "Google Drive PDF",
    "text": "<all of the text from the snippet>",
  }
]


What’s Next

Visit our API reference docs.