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.
- 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
corpus_id for the next steps:
runnable
output
corpora:write and the * Corpus scope, so a key bound to
existing Corpora cannot create new ones.
- 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
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.
- Follow the Receipt
Read the Receipt until its state is resolved, usually within a second or two:
runnable retry
output
created for new content. Other outcomes are duplicate (this
content is already the Record’s Version), withdrawal_applied and conflict.
- 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
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
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
- Correct the Record
Submitting different content for the same Record Key creates a new Version of the
same Record:
runnable
output
runnable retry
output
runnable retry
output
runnable retry
output
Next steps
- Send many Records at once, upload files, or route media types to a normalizer plugin: see the API walkthrough.
- Pull content from a feed or a mailbox on a schedule: see the connector guide.
- Get alerted when new content matches a query: see changes, catalog and monitoring.