API Reference

Documents API

Manage and query documents within the Aether Object Store using the Aether SDK.

Documents are the foundation of Aether. Before you can search for anything, you need to store your content — PDFs, text files, markdown, or raw strings. When you insert a document, Aether automatically splits it into chunks, generates vector embeddings for each chunk, and indexes everything for search. You don't need to worry about the chunking or embedding process — it happens behind the scenes.

SDK methods

Every document operation is a method on the AetherClient. Names follow each language's conventions; full usage for each is shown in the examples below this table.

OperationPythonTypeScript.NETGo
Insert raw textinsert_textinsertTextInsertTextAsyncInsertText
Insert a file or bytesinsertinsertInsertAsyncInsert
Stream a large fileinsert_streaminsertStreamInsertStreamAsyncInsertStream
Start an async insertinsert_asyncinsertAsyncEnqueueDocumentAsyncInsertAsync
Wait for an async jobwait_for_jobwaitForJobWaitForJobAsyncWaitForJob
Insert with custom embeddings (BYOE)insert_with_embeddingsinsertWithEmbeddingsInsertWithEmbeddingsAsyncInsertWithEmbeddings
Get document metadatagetgetGetAsyncGet
List active documentslistlistListAsyncList
Replace document contentupdateupdateUpdateAsyncUpdate
Soft-delete (tombstone) a documentdeletedeleteDeleteAsyncDelete
Restore a tombstoned documentrestorerestoreRestoreAsyncRestore
Download original bytesdownloaddownloadDownloadAsyncDownload
Download as textdownload_textdownloadText—¹DownloadText
Read readable text (paged, by section)get_textgetTextGetTextAsyncGetText
Read a document's summaryget_summarygetSummaryGetSummaryAsyncGetSummary
Write your own summaryput_summaryputSummaryPutSummaryAsyncPutSummary
Regenerate a summaryregenerate_summaryregenerateSummaryRegenerateSummaryAsyncRegenerateSummary

¹ The .NET SDK has no text helper — decode the bytes from DownloadAsync, e.g. Encoding.UTF8.GetString(bytes), or use GetTextAsync for parsed formats.

Document text and summary methods are available from SDK 0.7.0 — see Reading document text and Document summaries for availability.

Your API key is set once when you construct the client (see Authentication); the SDK attaches it to every request automatically. Failed calls raise an SDK error that maps to the status codes documented in Errors.

Document route contract

The SDK methods above wrap the hosted REST contract. Use the SDK for application code; use this route table when you are debugging, writing a proxy, or checking the wire shape.

MethodPathDescription
GET/v1/documentsList active documents with offset and limit pagination.
POST/v1/documentsInsert a synchronous text document or other sync-safe payload.
GET/v1/documents/{id}Fetch document metadata by doc_id.
PUT/v1/documents/{id}Replace a document's content and re-index it.
DELETE/v1/documents/{id}Soft-delete by default; pass hard=true for irreversible hard deletion.
GET/v1/documents/{id}/downloadDownload the original document bytes.
GET/v1/documents/{id}/textRead a document's readable text — whole, by section, or a page at a time.
GET/v1/documents/{id}/summaryRead a document's summary and its generation state.
PUT/v1/documents/{id}/summaryWrite your own summary for a document.
POST/v1/documents/{id}/summaryAsk Aether to regenerate a document's summary.
POST/v1/documents/{id}/restoreRestore a soft-deleted document.
POST/v1/documents/{id}/reembedRe-chunk and re-embed an existing document, optionally with a new model or chunking config.
POST/v1/documents/{id}/extractRetro-extract atomic facts from a stored document (Fact extraction).
POST/v1/documents/batchInsert multiple text documents in one request.
POST/v1/documents/embedInsert a document with caller-supplied embeddings.
POST/v1/documents/asyncQueue background ingestion for binary or larger documents.
GET/v1/documents/jobs/{job_id}Poll an async ingestion job.

Direct REST requests authenticate with Authorization: Bearer <api-key>. SDK users should not set this header manually — construct the client with an API key and let the SDK attach it.

API versioning

The canonical REST surface is versioned under the /v1 prefix — for example https://api.aetherdb.ai/v1/documents. Every data route (/v1/documents*, /v1/threads*, /v1/search*, /v1/memory/*, /v1/partitions*) follows this scheme.

Unversioned paths (e.g. /documents) keep working as deprecated aliases: they return the same responses, plus a Deprecation: true header and a Sunset: Fri, 01 Jan 2027 00:00:00 GMT header. They will be removed after January 1, 2027 — if you call the REST API directly, move to /v1 before then. SDK users don't need to do anything; the SDKs track the canonical paths.

One exception: GET /status, the public health probe, is intentionally unversioned.

Chunking and CIDs

Aether stores documents as content-addressed chunks:

  • The default storage chunk size is 256KB.
  • Insert and update calls can pass chunk_size; SDKs expose it as chunk_size, chunking.chunkSize, ChunkingConfig.ChunkSize, or aether.WithChunkSize(...) depending on language.
  • overlap is optional and defaults to 0 when a custom chunk_size is used.
  • Synchronous HTTP requests are capped at 50MB by the API layer. The node also enforces its configured max_document_bytes limit before work is accepted. Use async ingestion for parser-backed formats and long-running uploads.
  • Each stored chunk gets a deterministic CID built from a BLAKE3 hash of the chunk bytes and encoded with the aether: prefix.

The top-level document cid in a DocumentRecord is stable for identical content. Chunk CIDs let Aether verify and route stored bytes across swappable storage backends without depending on filenames or database row ids.

Supported file types

TypeContent type
Plain texttext/plain
Markdowntext/markdown
HTMLtext/html
CSVtext/csv
JSONapplication/json
PDFapplication/pdf
DOCXapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
PPTXapplication/vnd.openxmlformats-officedocument.presentationml.presentation
XLSXapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Text and office formats are extracted and indexed automatically. Sending an unsupported format returns 422.

Content type detection

If you omit content_type, Aether infers it from the filename extension. Explicitly set it when the extension is ambiguous or missing.

Interacting with Documents

The AetherClient makes accessing documents simple.

Inserting Documents

There are two ways to add content. insert_text is the quickest way to get started — just pass a string directly and Aether takes care of the rest. Use insert when you have a file path or binary data (like a PDF or an uploaded file buffer). Both methods return a DocumentRecord that tells you the assigned doc_id, how many chunks the content was split into, and how many vectors were generated. This is useful for verifying that your document was processed correctly — if a document has zero chunks, something likely went wrong with the input.

# Insert from a path
doc = client.insert(
    file_path="./data/manifesto.md", 
    content_type="text/markdown"
)

# Insert raw text string directly
doc_text = client.insert_text(
    text="Some text in the object store.",
    filename="text.txt"
)

print(doc_text.doc_id, doc_text.chunks)

Both methods return a DocumentRecord containing the doc_id, cid (Content Identifier), the document's tags and structured metadata, and counts for the chunks and vectors generated.

Structured metadata

Use metadata for typed fields you want to filter later. Metadata values must be strings, numbers, or booleans — or a flat array of strings, for a tag-like value with several entries. Use RFC 3339 strings for timestamps you want to compare chronologically. Nested objects, nested arrays, non-string array elements, and null are rejected.

A string array is what a string_list field lifts, so contains matches any single element. Scalar metadata filters never match an array-valued key — an array equals no scalar — so membership tests go through contains on a declared field, or through tags.

doc = client.insert_text(
    "Session notes: intake visit, clinical severity 0.8.",
    filename="session-1.txt",
    metadata={
        "severity": 0.8,
        "is_clinical": True,
        "session_type": "intake",
    },
)

print(doc.metadata["severity"])

update replaces a document's structured metadata. Pass the full metadata map you want to keep, just as you do with tags. Query examples live in Search & Retrieval.

Quotas & Plan Limits

As a fully managed service, Aether enforces storage and throughput bounds based on your current organization's subscription tier. If an insertion or embedding request exceeds your permitted quota (e.g., maximum storage bytes, or maximum active documents), the API will reject the request with a 402 Plan limit exceeded status. Your applications should be prepared to handle these 402 responses or monitor your usage periodically via the Dashboard to avoid unexpected ingestion interruptions.

Streaming Large Files

When inserting multi-gigabyte files, loading the entire payload into RAM before transmission can lead to memory exhaustion. To prevent this, the SDKs provide an insert_stream method that streams the binary data directly to Aether's load balancers.

# Pass a file object opened in binary mode
with open("./data/massive-knowledge-base.zip", "rb") as f:
    doc = client.insert_stream(
        stream=f,
        filename="massive-knowledge-base.zip",
        content_type="application/zip"
    )
print(doc.doc_id)

Async Ingestion

For large files or batch uploads, use async ingestion to avoid blocking. insert_async returns immediately with a job handle (job_id, status, poll_url); wait_for_job then polls until the job reaches a terminal state — completed or failed — and returns the final status (doc_id on success, error on failure). It raises a timeout error if the job doesn't finish within the deadline (60 s by default).

# Start an async insert — returns immediately with {job_id, status, poll_url}
job = client.insert_async(file_path="./data/large-report.pdf", content_type="application/pdf")
print(f"Job started: {job['job_id']}")

# Block until the job reaches a terminal state (polls in the background)
result = client.wait_for_job(job["job_id"])

if result["status"] == "completed":
    print(f"Document ready: {result['doc_id']}")
else:
    print(f"Job failed: {result.get('error')}")

Managed Job Queues

Aether's managed cloud infrastructure automatically scales concurrency and queues background jobs intelligently across our ingestion fleet. If your tenant submits jobs faster than your tier's allowed throughput, Aether will gracefully queue them until capacity is dynamically allocated.

The raw job endpoint returns a progress snapshot:

JSON
{
  "job_id": "8d3f1c26-9ea1-4ec9-b701-6e3f1c2a7a01",
  "status": "embedding",
  "doc_id": null,
  "message": "Embedding document",
  "progress": 0.6,
  "created_at": "2026-06-25T18:30:00Z",
  "finished_at": null,
  "error": null
}

Terminal states are completed and failed. Jobs are tenant-scoped; polling a job from another tenant returns 404 rather than leaking that it exists.

When the insert requested a summary (summarize), the job also reports summary_state once it completes: "pending" (generation queued) or "skipped". The field is omitted when no summary was requested. Poll the summary route for the outcome.

Custom Embeddings (BYOE)

If you use your own embedding model, you can insert documents with pre-computed vectors instead of relying on Aether's built-in embedder. Provide either a single embedding for the whole document, or per-passage embeddings for fine-grained retrieval.

# Insert with per-passage embeddings
doc = client.insert_with_embeddings(
    content="Full document text...",
    filename="report.md",
    passages=[
        {"text": "First paragraph...", "embedding": [0.1, 0.2, ...]},
        {"text": "Second paragraph...", "embedding": [0.3, 0.4, ...]},
    ]
)

Updating and Retrieving Metadata

Sometimes you need to replace a document's content — maybe you fixed a typo, or a newer version of the file is available. Calling update replaces the content entirely: Aether re-chunks the new content, generates fresh embeddings, and re-indexes everything. The old vectors are discarded. On the other hand, get is a lightweight call that just returns metadata (like chunk count, file size, and content type) without downloading the actual content. It's a quick way to check on a document without pulling the full payload. Document records also carry timestamps: get returns both created_at and updated_at, and each item from list includes created_at.

You can update the actual contents of an existing document or fetch its metadata details.

# Overwrite an existing document by doc_id
updated = client.update("doc_12345", "./data/revised_manifesto.md")

# Simply fetch the latest metadata about the document
meta = client.get("doc_12345")
print(f"Chunks: {meta.chunks}, Size: {meta.size_bytes}")

Re-ingesting the Same Source

Send an Idempotency-Key header with POST /v1/documents and a retry stops being a duplicate. Use any stable string your own system already has — the upstream record id, a job id, a hash of the content:

What you sendWhat you get
No headerEvery call creates a document (the historical behavior).
Same key, same request200 with the original document. Nothing re-inserted, re-embedded, or re-billed.
Same key, different request409 — that key is already committed to a different insert.

The key commits the whole request: filename, content type, tags, entity_id, source, metadata, chunking, and the content itself. A retry that just reorders JSON keys is still the same request. Keys are scoped per workspace and per partition, so the same key in another partition is a separate document.

Bash
curl -X POST "https://api.aetherdb.ai/v1/documents?filename=invoice-8492.txt&content_type=text/plain" \
  -H "Authorization: Bearer $AETHER_API_KEY" \
  -H "Idempotency-Key: invoice-8492" \
  --data-binary @invoice-8492.txt

Three things the key does not cover

The check happens immediately before the insert rather than as one atomic step, so two simultaneous retries of the same key can both land in rare cases. The lookup sees live documents only — replaying a key whose document you deleted creates a new one. And update replaces the metadata map, which is where the key is recorded, so updating a document ends the guarantee for later retries of its key.

/documents/async and /documents/batch accept the header but do not act on it yet. For those, use the client-side pattern below.

Without the header

For the async and batch routes — or for a key that must survive a document being updated — keep the mapping yourself:

  1. Derive a stable key for the source in your own store.
  2. Persist the doc_id Aether returns on first insert, keyed by that stable key.
  3. On re-ingest, look the key up: no doc_id yet means insert; an existing doc_id means update.

update overwrites the document in place — same doc_id, fresh chunks and vectors — and replaces both the structured metadata map and the tag set. Resend the full sets you want the document to end up with, not just the entries that changed.

Tagging Documents

Tags are flat string labels you attach to a document so you can filter searches later — scope a query to one customer, one user, or one kind of content. Every insert variant accepts them (insert, insert_text, insert_stream, insert_async, insert_with_embeddings, and batch insert), and so does update. On the query side, search, retrieve, and search_by_vector all take a tags filter, and the semantics are AND: a document matches only if it carries every listed tag. See Tags and metadata for the search side, and Multi-tenant patterns for using tags to keep tenants' data apart.

Two rules for choosing tag values:

  • No commas. Tags are sent comma-joined on the wire, so a comma inside a tag value will split it into two tags.
  • Use key:value slugs. A consistent convention like customer:acme, user:42, kind:memory keeps filters readable and composable.

And one rule for updates: update replaces the document's tag set. Pass the full set of tags the document should end up with — tags from the original insert don't carry over.

# Tag a document at insert time
doc = client.insert_text(
    "Acme onboarding notes...",
    filename="notes.txt",
    tags=["customer:acme", "kind:memory"],
)

# update() replaces the tag set — pass every tag you want to keep
updated = client.update(
    doc.doc_id,
    "./data/notes-v2.txt",
    tags=["customer:acme", "kind:memory", "status:reviewed"],
)

Tags are echoed on read

tags (and source) are returned on every DocumentRecord and on every search hit, so you can read back, display, or audit what you stored — no separate mapping needed.

Beyond the AND tags filter, search and list also accept OR facets — any_tags (match any listed tag), content_types, and sources — plus a source you can set on insert (a single origin label like slack, notion, or upload). Facets compose by AND across facets and OR within a facet. See Search filters.

One caveat on search filters: they're applied to a candidate set from vector retrieval, not during index traversal, so a narrow filter can return fewer than k results even when more matches exist. When you need the complete set of documents matching a metadata filter (not the top-k by similarity), use list with the same filters — it scans the full active set and paginates the entire matching population.

Listing and Downloading

The list method shows all active documents in your store — anything that hasn't been deleted. Because Aether collections can scale to millions of documents, the list method supports robust pagination using offset and limit.

Retrieving active datasets and downloading content.

# List active documents with pagination
active_docs = client.list(offset=0, limit=50)

for item in active_docs:
    print(item.doc_id, item.title)

# Download the raw payload of a document back to a file
bytes_written = client.download("doc_12345", output_path="./output.md")

Deletions

Removing a document in Aether does not immediately erase chunks on disk, but rather tombstones the metadata record via an event. Think of tombstoning like moving a file to the recycle bin — the document won't appear in search results or in list calls, but the underlying data is still there. This means deletions are safe and reversible. If you change your mind, you can call restore to bring a tombstoned document back into the active pool, and it will be searchable again immediately.

# Tombstone a document softly
client.delete("doc_12345")

# Restore a tombstoned document back to active pool
client.restore("doc_12345")

Permanent Deletion

Tombstoning is the right default, but sometimes recoverable isn't acceptable — a GDPR erasure request, or any compliance workflow that requires the data to be truly gone. For these cases the REST API supports hard deletion: pass hard=true on the DELETE request.

Bash
curl -X DELETE "https://api.aetherdb.ai/v1/documents/doc_12345?hard=true" \
  -H "Authorization: Bearer $AETHER_API_KEY"

Hard deletion takes effect immediately: vectors are removed from the search indexes, stored chunk data is deleted, and the document's encryption key is destroyed, so any archived copies become permanently unreadable (crypto-erasure).

This generic lifecycle applies to ordinary documents. Canonical conversation turns currently reject soft delete, hard delete, and restore with 409 thread_turn_immutable; there is no thread erasure endpoint yet.

Hard deletion is irreversible

There is no restore for a hard-deleted document, and the destroyed encryption key means the data cannot be recovered — by you or by Aether. Double-check the doc_id before sending the request.

SDK 0.7.0 supports permanent deletion: Python delete(id, hard=True), TypeScript delete(id, { hard: true }), Go HardDelete, and .NET HardDeleteAsync. The default delete remains a recoverable tombstone; hard deletion is irreversible.

Reading document text

get_text returns a document's readable text — paged, and addressable by section — whatever format you stored. Use it to put a PDF's actual words in front of an agent, or to read one section of a long contract instead of the whole file. download still returns the original bytes.

Available with SDK 0.7.0

GET /v1/documents/{id}/text is available on the hosted API. The SDK text methods and readable PDF/Office recall require SDK 0.7.0 or later. Self-hosted engines must serve the document-text route.

What you get depends on the document:

DocumentsourcestateText
Text types — plain text, markdown, JSON, XML, YAML, source codeoriginalreadyThe stored bytes decoded as UTF-8 (invalid sequences become U+FFFD). JSON and XML are returned as stored, not flattened.
Image and audio memoriesderivedreadyThe indexed caption or transcript.
Parsed formats — PDF, Word, PowerPoint, Excel, HTML, CSV/TSV, RTF, email, EPUB, OpenDocumentpassagesreadyText rebuilt from the document's indexed passages, in order.
Anything elsenullunsupported""

Text rebuilt from passages is best effort: Aether removes the overlap between neighbouring passages and the section heading repeated at the start of a continued passage, and joins passages that don't overlap with a blank line, so whitespace at passage boundaries can differ from the original layout. Parsed PDFs and Office files are converted to markdown, so their headings work with outline and section.

Query parameterTypeNotes
partitionstringPartition guard, as on every ID-addressed route. A wrong partition returns the same 404 as a missing document.
sectionstringA section selector over the text's markdown headings — heading text (case- and whitespace-insensitive) or exact slug.
outlinebooleantrue returns the outline in sections with text: "". Cannot be combined with section, offset, or max_bytes.
offsetintegerByte offset into the selected text; default 0.
max_bytesintegerPage size, 1–1,048,576. Default 65,536.
JSON
{
  "doc_id": "7f3e9a12-4c5b-4d6e-8f70-1a2b3c4d5e6f",
  "content_type": "application/pdf",
  "source": "passages",
  "state": "ready",
  "text": "# Master Services Agreement\n…",
  "offset": 0,
  "next_offset": 65530,
  "total_bytes": 183244,
  "truncated": true,
  "section": null,
  "sections": null
}
  • Pages are line-aligned and follow the same paging rules as memory files: pass next_offset back as offset until it is null.
  • section is the selected section ({heading, level, slug, start_line, end_line, bytes}) when you asked for one; total_bytes is then the section's size.
  • sections is the outline when outline=true, otherwise null. An outline response is always JSON, and its total_bytes is the whole text's size.
  • An unsupported document returns source: null, text: "", offset: 0, next_offset: null, total_bytes: 0, truncated: false, and section: null whatever you sent (sections: [] with outline=true).
  • Query parameters are validated before the document is looked up, so a malformed parameter returns 400 invalid_input even for an id that doesn't exist.
# Outline first: which sections does this contract have?
outline = client.get_text(doc_id, outline=True)
for s in outline.sections:
    print(s.level, s.heading, s.slug, s.bytes)

# Then read just the one you need
termination = client.get_text(doc_id, section="Termination")
print(termination.text)

# Or page through the whole text
offset = 0
while offset is not None:
    page = client.get_text(doc_id, offset=offset)
    print(page.text, end="")
    offset = page.next_offset

Raw text. Over REST, send Accept: text/markdown (or text/plain) to receive the page as the response body instead of JSON. The SDKs always use JSON; text carries the same page alongside the paging fields. Raw responses carry X-Aether-Text-Source (original, derived, or passages), X-Aether-Total-Bytes, and — only when more pages follow — X-Aether-Next-Offset. An unsupported document in raw mode returns 422 document_text_unavailable.

curlbash
curl "https://api.aetherdb.ai/v1/documents/7f3e9a12-4c5b-4d6e-8f70-1a2b3c4d5e6f/text?section=Termination" \
  -H "Authorization: Bearer $AETHER_API_KEY" \
  -H "Accept: text/markdown"
ErrorWhen
400 invalid_inputA query parameter is out of range, offset isn't on a character boundary, or outline was combined with paging or section.
400 (no code)The document id isn't a valid id.
400 partition_requiredA strict-scoping multi-tenant key called without the partition guard.
404 document_not_foundThe document doesn't exist, is deleted, belongs to another workspace or partition, or the caller can't read it under its reader list. All of these are indistinguishable.
404 document_section_not_foundThe selector matched no section.
409 document_section_ambiguousThe selector matched several headings; see candidates ({heading, slug, start_line}) and retry with a slug.
422 document_text_unavailableRaw mode on a document with no readable text.

Reads are billed like download and recorded in the access audit for workspaces that have it enabled.

Readable PDF hits in retrieve, recall, and list

SDK releases that include get_text also use it inside retrieve, Memory.recall, and Memory.list. Hits on text-like content types (plain text, markdown, JSON, YAML, source code) are still read with download_text; every other type — PDF, Office, HTML, CSV — is read through get_text, so you get readable text instead of the original file's bytes. If the API doesn't serve the text route yet, the SDKs fall back to the hit's matched passage (an empty string in Memory.list).

Document summaries

Aether can write a short markdown summary of a document when you ask for one with summarize. Summaries are generated by Aether in the background, and they're editable: people and agents can replace a summary with their own, or ask Aether to regenerate it. A summary gives an agent the gist of a long PDF in a few hundred words before it decides which section of the text to read in full.

SDK 0.7.0 and summarizer configuration

Summary routes are available on the hosted API and in SDK 0.7.0 or later. Automatic generation requires a configured summarizer; user-authored summaries do not. Self-hosted engines must enable summaries_enabled. When disabled, summary routes answer 404 with code feature_not_enabled and "feature": "summaries", and inserts report requested summaries as "skipped".

Requesting a summary

Pass summarize when you insert. Generation is queued after the document is stored — after a synchronous insert returns, or when an async job completes — so it never delays or fails the insert.

doc = client.insert_text(contract_text, filename="msa.md", summarize=True)
print(doc.summary)  # "pending", or "skipped"

job = client.insert_async(file_path="./msa.pdf", content_type="application/pdf", summarize=True)
  • Where. summarize is accepted by insert, insert_text, insert_stream, and insert_async — on the wire, summarize=true on POST /v1/documents and POST /v1/documents/async — and by batch insert as a body-level summarize with a per-item override. It isn't accepted on custom-embedding inserts, media memories, or thread appends.
  • Three states. summarize is true, false, or unset. An explicit true asks for a summary; an explicit false opts this insert out even when your workspace default is on; leaving it unset sends nothing, so the workspace default applies (off unless an admin turned it on).
  • On Memory. summarize works like fact extraction: set a default when you construct the Memory — Python Memory(..., summarize=True), TypeScript new Memory(id, { summarize: true }), .NET new MemoryOptions { Summarize = true }, Go aether.WithSummarization(true) — or override it per call: Python memory.remember(text, summarize=True), TypeScript memory.remember(text, undefined, { summarize: true }), .NET memory.RememberAsync(text, summarize: true). The per-call value wins, then the constructor's; with neither set, the workspace default applies. Go's per-insert option on the raw client is aether.WithSummarize(true).
  • Response. The document record gains summary: "pending" when generation was queued, or "skipped" when it was skipped by policy — the text is shorter than the workspace minimum (1,500 characters by default), summarization isn't available in this environment, or your workspace has a strict PHI-egress policy and no approved model route is configured. Async jobs report the same value as summary_state when they complete. Both fields are omitted when no summary was requested.
  • Idempotency. summarize=true is part of an insert's Idempotency-Key commitment; leaving it off keeps existing keys valid.

Reading a summary

GET /v1/documents/{id}/summary always answers 200 with a state for a document you can see — 404 document_not_found only means the document itself isn't visible.

JSON
{
  "doc_id": "7f3e9a12-4c5b-4d6e-8f70-1a2b3c4d5e6f",
  "state": "ready",
  "reason": null,
  "error": null,
  "summary_doc_id": "0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
  "content": "## Summary\n- Master services agreement between Acme Corp and Example Ltd…\n\n## Parties & dates\n…",
  "revision": "r3f9a1c2b7d4e5f60",
  "authored_by": "aether",
  "generator": "aether:<model>:2026-10-10.v1",
  "prompt_version": "2026-10-10.v1",
  "generated_at": "2026-10-10T09:15:02Z",
  "source_cid": "aether:mfrggzdfmztwq2lk...",
  "stale": false,
  "truncated_input": false
}
FieldNotes
statenone, pending, ready, failed, skipped, or unsupported — see below.
reasonMachine-readable reason for skipped, unsupported, or failed.
errorHuman-readable message, failed only.
summary_doc_idThe document that stores the summary, if any.
contentThe stored summary markdown, if any. Independent of state: a stored summary stays readable while a regeneration is pending or after one failed.
revisionOpaque revision, also sent as the ETag. Changes on every stored change; compare only for equality.
authored_by"aether" or "user".
generatoraether:<model>:<prompt_version> for generated summaries, user:<principal> for written ones.
prompt_version, generated_atGeneration details; prompt_version is set for Aether-authored summaries only.
source_cidThe document cid the summary was generated or written against.
staletrue when the document has been updated since — its cid no longer matches source_cid.
truncated_inputtrue when the document was too long to summarize whole (see What Aether generates).

state is the first of these that applies:

stateMeaning
pendingA generation is queued or running.
failedThe most recent generation since the stored summary was written failed. reason is provider_error, provider_timeout, empty_output, or internal. Cleared by a later successful generation or a PUT.
readyA summary is stored.
unsupportedThis document can never be summarized. reason is derived_document (an extracted fact, a summary, or a memory file), thread_turn (a conversation turn), or no_text (no readable text).
skippedAutomatic generation was, or would be, skipped by policy. reason: below_min_chars means the text is shorter than the workspace minimum — an explicit regenerate still works. Ingest-time skips report summarizer_not_configured, phi_baa_route_required, or summaries_disabled.
noneEligible, but nothing is stored and nothing is pending.

If a generation is interrupted — for example by a service restart — a summary you requested can read none with nothing stored. Treat none after a request as interrupted and regenerate.

import time

summary = client.get_summary(doc_id)
while summary.state == "pending":
    time.sleep(2)
    summary = client.get_summary(doc_id)

if summary.state == "ready":
    print(summary.content)

Writing your own summary

PUT /v1/documents/{id}/summary stores a summary you wrote — for example after a person corrects the generated one. The body is either raw markdown (Content-Type: text/markdown or text/plain) or JSON {"content": "…"} (application/json), 1–16,384 bytes of UTF-8.

  • The summary is stored with authored_by: "user", generator: "user:<principal>", and source_cid set to the document's current cid, so stale is false.
  • Optional If-Match: "<revision>" writes only if the stored revision still matches; optional If-None-Match: * writes only if no summary is stored. A failed precondition returns 412 summary_revision_conflict with current_revision (or null).
  • A PUT always wins over a generation that started before it; that generation's result is discarded (and still billed).
  • Writing content identical to a stored user summary is a no-op: 200 with the same revision.
StatusWhen
201No summary was stored; yours is now ready.
200A stored summary was replaced, or the write was a no-op.
400invalid_input or invalid_json — empty, or not UTF-8.
404document_not_found or feature_not_enabled.
412 summary_revision_conflictThe precondition didn't hold. Includes current_revision.
413 summary_too_largeOver 16 KiB. Includes limit_bytes.
415 unsupported_media_typeAny other content type.
422 summary_unsupportedThe document is an extracted fact, a summary, a memory file, or a conversation turn. Includes reason.
current = client.get_summary(doc_id)
client.put_summary(
    doc_id,
    current.content.replace("Net 30", "Net 45"),
    expected_revision=current.revision,
)

A summary revision conflict surfaces as the SDK's base API error with code summary_revision_conflict.

Regenerating a summary

POST /v1/documents/{id}/summary queues an Aether generation and returns 202 with state: "pending" (and any stored summary in content). An explicit request ignores the workspace's minimum length. If a generation is already pending, the call joins it. A user-authored summary is replaced only when you pass force=true.

StatusWhen
202Queued, or already pending.
404document_not_found or feature_not_enabled.
409 summary_user_authoredThe stored summary was written by a user and force isn't true.
422 summarizer_not_configuredSummarization isn't available in this environment.
422 phi_baa_route_requiredYour workspace has a strict PHI-egress policy and no approved model route is configured. Nothing was sent.
422 summary_unsupportedAs for PUT.
402 / 403 / 429Billing limits — generation is billed.
client.regenerate_summary(doc_id)              # keeps a user-written summary
client.regenerate_summary(doc_id, force=True)  # replaces it

What Aether generates

  • Format. Markdown with exactly these level-2 headings, in order: ## Summary, ## Parties & dates, ## Terms & obligations, ## Exceptions, ## Open questions. An empty section reads - None stated.
  • Length. At most about 350 words, stored up to 16,384 bytes.
  • Grounding. Written only from the document's text, in the document's language. Review generated summaries before relying on them for decisions — they are a reading aid, not a source of record.
  • Input. The document's readable text. Over 200,000 characters, Aether summarizes the outline plus the beginning of the text and sets truncated_input: true.
  • Never summarized. Extracted facts, summaries, memory files, and conversation turns.
  • With fact extraction. When an insert requests both summarize and extract_facts, facts are always extracted from the source text, never from the summary.
  • Model route. Summaries are generated through the same model route as fact extraction, so the document's text is sent to that model provider. A workspace with a strict PHI-egress policy never falls back to the normal route: if no approved route is configured, nothing is sent — regenerate returns 422 phi_baa_route_required and ingest-time requests report skipped. This routing control is not, by itself, a compliance certification.

A summary follows its document:

Document eventSummary
Soft delete / restoreDeleted / restored with it.
Hard delete (hard=true)Hard-deleted with it.
Partition moveMoved with it.
update (content replaced)Tags, metadata, placement, and reader list are re-synced. An Aether-authored summary is regenerated in the background (state: pending) when summaries are available, otherwise it reads stale: true. A user-authored summary is kept and reads stale: true.
Partition deleteRemoved like any document.

Each stored summary is a text/markdown document named summary-<doc_id>.md, tagged kind:summary and parent:<doc_id>. It inherits the parent's entity_id, partition, source, tags, reader list, and metadata — so a caller who can't read the document can't read its summary, and filtered searches treat both alike. Summaries are searchable: pass kind=summary to search only summaries. Change them through the summary routes — generic PUT, partition move, and restore on a summary document return 409 summary_use_summary_routes. Generic DELETE is allowed; afterwards GET …/summary reads none.

Workspace defaults

An admin key can set whether inserts summarize by default and the minimum text length for automatic generation. These settings are REST-only; there is no SDK method. Use your tenant id, shown in the Dashboard.

curlbash
curl -X PUT "https://api.aetherdb.ai/v1/admin/tenants/$AETHER_TENANT_ID/ingest-settings" \
  -H "Authorization: Bearer $AETHER_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"summarize_default": true, "summarize_min_chars": 1500}'
JSON
{
  "tenant_id": "…",
  "summarize_default": true,
  "summarize_min_chars": 1500,
  "updated_at": "2026-10-10T09:00:00Z"
}

GET on the same path returns the current settings. The body of a PUT is partial — omitted fields stay unchanged. Defaults are summarize_default: false and summarize_min_chars: 1500 (range 0–1,000,000). An admin key can read and write only its own workspace (403 otherwise); out-of-range values return 400 invalid_input.

Billing

Generation is metered at the fact-extraction rate, including results discarded because a PUT superseded them. Each stored summary is a document and counts toward storage.

Response shapes

Successful insert, update, batch-insert item, and BYOE insert responses return the same compact record:

JSON
{
  "doc_id": "doc_12345",
  "cid": "aether:mfrggzdfmztwq2lk...",
  "chunks": 1,
  "vectors": 1,
  "version": 1
}

GET /v1/documents/{id} expands that with metadata:

JSON
{
  "doc_id": "doc_12345",
  "cid": "aether:mfrggzdfmztwq2lk...",
  "title": "pto-policy.txt",
  "content_type": "text/plain",
  "size_bytes": 43,
  "chunks": 1,
  "vectors": 1,
  "version": 1,
  "created_at": "2026-06-25T18:30:00Z",
  "updated_at": null,
  "entity_id": null,
  "tags": ["customer:acme", "kind:memory"],
  "source": "upload"
}

tags and source are echoed on every document record (insert, fetch, and list) and on every search hit; source is null when the document had none.

When an insert requested a summary, insert, batch-item, and fetch records also carry summary: "pending" when generation was queued, or "skipped" when it was skipped by policy. The field is omitted when no summary was requested. See Document summaries.

Errors use the shared API error envelope:

JSON
{
  "error": "Document not found",
  "code": "not_found",
  "request_id": "req_..."
}

Common statuses are 400 for invalid input, 401 for missing or invalid authentication, 402 for plan limits, 404 for unknown or cross-tenant documents/jobs, 413 for request or batch size limits, 415 when binary content is sent to a synchronous route, 422 for unsupported content, 429 for rate limits or per-tenant job concurrency, and 500 / 503 for transient server errors. See Errors for retry guidance.

Two kinds of documents are managed through their own routes. PUT /v1/documents/{id}, partition moves, and restore on a memory file version return 409 memory_file_use_memory_routes, and on a stored summary return 409 summary_use_summary_routes; generic DELETE stays allowed for both. Metadata keys that start with aether.memfile. or aether.summary. are reserved — any write that supplies one returns 400 reserved_metadata_key.