Quickstart

This guide will get you all set up and ready to use the Doctrine API. We'll cover how to get started using one of our API clients and how to make your first API request. We'll also look at where to go next to find all the information you need to take full advantage of our powerful REST API.

Get setup to make a request

Doctrine is a REST API, which means that you can send requests to the API using any HTTP client. In this guide, we'll use cURL to send requests to the API, but you can use any HTTP client you prefer.

# make sure you have cURL installed
curl --version

Ingesting your first Document

Below, you can see how to send a POST request to the Documents ingest endpoint to add knowledge to your AI's memory.

POST
/api/ingest
curl --location --request POST 'https://doctrine.app/api/ingest' \
--header 'Authorization: Bearer ${bearer}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "text": "Brewing coffee using a Chemex can result in a clean, pure, and flavorful cup of coffee.",
    "name": "Sample doc"
}'

Asking your first Question

Below, you can see how to send a POST request to the Questions endpoint to get an answer from your AI's memory store.

POST
/api/query
curl --location --request POST 'https://doctrine.app/api/query' \
--header 'Authorization: Bearer {API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "query": "How long should I let coffee grounds bloom?"
}'

What's next?

Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the Doctrine API: