Skip to main content
Create a Corpus, add a text Record to it and search it through the v0 HTTP API, on a Quivr running on your machine. It takes a few minutes once the stack is up. Every command and output on this page is replayed against a real Quivr by make verify, so they work on this version. Outputs show only the fields this guide relies on; "..." stands for a value that changes on every run, such as an identifier. openapi.yaml is the complete contract for every request and response, listed per endpoint in the HTTP API reference, and the API walkthrough covers what comes next: batches, uploads, plugins, monitoring and connectors.

Before you start

make dev builds a single quivr binary, starts PostgreSQL, Temporal, SeaweedFS (S3), Weaviate and TEI through Docker Compose, applies migrations and runs the API and worker as local processes. It prints the API address and the path of the generated config.json. Ports are dynamic and bound to loopback. No hosted model service or external key is required. Throwaway keys, settings and logs live in the private .scratch/quivr-dev-… directory. Never publish it: state.json, config.json, worker.json and s3.json contain credentials. The keys field of config.json maps each Bearer token to an Organization, a list of actions and a list of Corpora (* grants the whole Organization). Export the address and the key of Organization org_a that may create Corpora on *, add content and search:
Local logs are capped at four 1 MiB files per process; Compose services keep three 1 MiB files each. The private /healthz and /readyz probes use a separate port and are not part of the public API. Hot migrations can break running processes during evaluation; restart API and workers after migrating. The commands use fixed idempotency keys, so running this page a second time on the same stack replays the first run: start over with make reset and make dev.

  1. Create a Corpus

A Corpus is the collection of Records you search together. Every command that creates something takes an idempotency_key: replaying the same request under the same key returns the same result instead of creating a second one.
runnable
output
Keep the corpus_id for the next steps:
Run the same command again: you get the same Corpus back. Changing the request under that key is a conflict.
runnable
output
Creating a Corpus needs corpora:write and the * Corpus scope, so a key bound to existing Corpora cannot create new ones.

  1. Add a Record

A Record is one item from a source, identified in its Corpus by a Source Namespace (namespace, where it comes from) and a Record Key (record_key, its identity there). Submit its text:
runnable
output
The API answers 202 Accepted with an Ingestion Receipt as soon as the submission is durably recorded, even if Temporal or S3 are down; its Location header points at the Receipt. Processing is asynchronous. Sending the same command again under the same idempotency_key returns the same Receipt, never a second Record. The Receipt never becomes “failed” because of an infrastructure outage: the work is retried.

  1. Follow the Receipt

Read the Receipt until its state is resolved, usually within a second or two:
runnable retry
output
The outcome is created for new content. Other outcomes are duplicate (this content is already the Record’s Version), withdrawal_applied and conflict.

  1. Read the Version

Each accepted content of a Record is an immutable Record Version. Read it with its Manifest, the canonical text Quivr stores and searches:
runnable
output
Without a source_revision, the content itself identifies the Version: submitting the same text again, even under a new idempotency key, resolves as a duplicate of the same Version.
runnable
output
runnable retry
output
Search the Corpus. Lexical search is available as soon as the Version is published; the default hybrid mode and semantic mode also use embeddings, which the worker computes right after. Retry until the Record shows up:
runnable retry
output
Each hit names the Record, the Version and the Part it comes from, and its excerpt is an exact slice of that Part, counted in Unicode code points. Search modes, limits and profiles are described in the API walkthrough.

  1. Correct the Record

Submitting different content for the same Record Key creates a new Version of the same Record:
runnable
output
runnable retry
output
Once the new Version is published it becomes the Record’s current Version, and search returns only the current Version of each Record:
runnable retry
output
The earlier Version stays readable, no longer current:
runnable retry
output

Next steps