Collections are named RAG namespaces that let you partition your indexed content into separate, searchable buckets — for example, one collection per client, project, or topic. Every TrinaxAI instance always has at least one collection: General (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/TrinaxCode/TrinaxAI/llms.txt
Use this file to discover all available pages before exploring further.
id: "default"), which cannot be deleted. Collection IDs are automatically slugified via sanitize_collection_id when created.
GET /collections is open (no auth required). All write operations — POST, PATCH, and DELETE — require authorization via localhost/LAN access or an X-Admin-Token header.GET /collections
List all RAG collections. This endpoint is always open and does not require authorization. The default"General" collection is always present.
Response
Always
true on success.Ordered list of collection objects.
Example
Response
POST /collections
Create a new collection. Thename is slugified to generate a unique id. If the slug is already taken, a numeric suffix is appended (e.g. "my-project-2").
Requires authorization.
Request body
Human-readable display name for the new collection. Truncated to 80 characters. The collection ID is derived by slugifying this name via
sanitize_collection_id.Response
Always
true on success.The newly created collection object with
id, name, created_at, and updated_at.Example
Response
PATCH /collections/{collection_id}
Rename an existing collection. Only the displayname can be changed — the id (slug) is immutable after creation.
Requires authorization.
Path parameters
The slug ID of the collection to rename (e.g.
"my-project").Request body
The new display name. Truncated to 80 characters.
Response
Always
true on success.The updated collection object with the new
name and refreshed updated_at.Example
Response
DELETE /collections/{collection_id}
Delete a collection and permanently remove all of its indexed chunks from the vector store. The in-memory retriever is rebuilt automatically after deletion.Requires authorization.
Path parameters
The slug ID of the collection to delete. Must not be
"default".Response
Always
true on success.Number of index chunks (nodes) that were removed from the vector store.
Example
Response
POST /documents/extract
Extract plain text from a PDF, DOCX, or text-based file for temporary analysis only — the content is not indexed or persisted. Useful for on-the-fly document inspection in the PWA.Request
multipart/form-data with a single file field.
The document to extract text from. Must be one of the supported formats listed above.
Response
Always
true on success.The original filename of the uploaded document.
The extracted plain text. Truncated to
DOC_EXTRACT_MAX_CHARS (default 120,000) if the document is very long.Character count of the (possibly truncated) returned text.
true if the extracted text exceeded the character limit and was cut off.Example
Response