RAG

Add Document

Add a document to a collection (auto-chunked, embedded, TQ-compressed).

post/api/rag/collections/{collection_id}/documents

Request

  • Base URL: https://api.agentstack.tech (the document declares no server; this is the origin it was published from)
  • URL: https://api.agentstack.tech/api/rag/collections/{collection_id}/documents
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Path parameters

collection_idstring required

Collection UUID

Query parameters

home_project_idinteger nullable

Override session project scope when permitted (read access).

Headers

Idempotency-Keystring

Client-generated key to make mutating requests idempotent.

Request body

contentstring required

Text to add (auto-chunked), max 512 KiB

source_doc_idstring nullable

Source document identifier

metadataobject nullable

Metadata tags

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 2 revisions of this API.