Rekalldocs
API Reference

Documents

Whole, unchunked units of text. Ingest with upsert semantics, list, get info, and delete — no reindex, ever.

Documents are whole, unchunked units of text. Upsert semantics on id; queryable immediately after ingest. All endpoints require Authorization: Bearer <key>.

Ingest documents

POST /v1/stores/{store}/documents

Ingests 1–1000 whole documents (≤ 32 MB per request). Upsert: a document with an existing id replaces its encoding in place — no reindex, no tombstone management. Documents are searchable the moment this call returns; there is no status to poll. Ingestion cost is O(N) in corpus size.

Headers

Prop

Type

Request body

Prop

Type

DocumentInput

Prop

Type

curl -X POST https://api.rekall.sh/v1/stores/contracts/documents \
  -H "Authorization: Bearer $REKALL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: batch-2026-07-04-001" \
  -d '{
    "documents": [
      { "id": "supplier_a", "text": "…full document, unchunked…",
        "metadata": { "source": "supplier_a.pdf", "team": "procurement" } }
    ]
  }'
const { ingested, docIds } = await store.ingest([
  { id: "supplier_a", text: supplierText, metadata: { team: "procurement" } },
]);
res = store.ingest([
    {"id": "supplier_a", "text": supplier_text, "metadata": {"team": "procurement"}},
])
print(res.ingested, res.doc_ids)
200 OK
{ "ingested": 1, "doc_ids": ["supplier_a"] }

413 — document too large

{ "error": {
  "type": "document_too_large",
  "message": "Document 'handbook' is 41.2 MB; the per-request limit is 32 MB.",
  "fix": "Split the batch: send this document in its own request, or use the SDK's ingestStream which batches automatically."
}}

Other errors: 400 invalid_request, 404 store_not_found, 401 unauthorized, 429 rate_limited. See Errors.


List documents

GET /v1/stores/{store}/documents

Returns document summaries, most recently ingested first.

Query parameters

Prop

Type

curl https://api.rekall.sh/v1/stores/contracts/documents?limit=100 \
  -H "Authorization: Bearer $REKALL_API_KEY"
const { documents, nextCursor } = await store.documents.list({ limit: 100 });
page = store.documents.list(limit=100)
for d in page.documents:
    print(d.id, d.n_tokens)
200 OK
{
  "documents": [
    { "id": "supplier_a", "metadata": { "source": "supplier_a.pdf" }, "n_tokens": 4213, "ingested_at": "2026-07-04T12:00:00Z" }
  ],
  "next_cursor": null
}

Get document info

GET /v1/stores/{store}/documents/{id}

Returns a document's info. Pass ?include_text=true to include the full text.

Query parameters

Prop

Type

curl "https://api.rekall.sh/v1/stores/contracts/documents/supplier_a?include_text=true" \
  -H "Authorization: Bearer $REKALL_API_KEY"
const doc = await store.documents.get("supplier_a", { includeText: true });
doc = store.documents.get("supplier_a", include_text=True)
200 OK
{
  "id": "supplier_a",
  "metadata": { "source": "supplier_a.pdf", "team": "procurement" },
  "n_tokens": 4213,
  "ingested_at": "2026-07-04T12:00:00Z",
  "text": "…full document text, present only with include_text=true…"
}

Errors: 404 document_not_found, 401 unauthorized.


Delete a document

DELETE /v1/stores/{store}/documents/{id}

Removes the document and its encoding. No reindex — the store stays live.

curl -X DELETE https://api.rekall.sh/v1/stores/contracts/documents/supplier_a \
  -H "Authorization: Bearer $REKALL_API_KEY"
await store.documents.delete("supplier_a");
store.documents.delete("supplier_a")

Returns 204 No Content. Errors: 404 document_not_found, 401 unauthorized.

On this page