Projects¶
A project holds documents and their chunks, a vector DB collection, a keyword index and, optionally, a knowledge graph. Every document endpoint sits under a project.
Paths are relative to /api/v1. The examples use:
The project object¶
Returned by every project endpoint.
| Field | Type | |
|---|---|---|
project_id |
integer | |
project_name |
string | Unique across the server |
description |
string or null | |
collection_name |
string or null | The vector DB collection its chunks are stored in |
chunking |
object or null | The project's default chunking options. null: the server defaults |
text_search_language |
string | The Postgres text search configuration of its keyword index |
graph |
object or null | The knowledge graph settings, with every field filled in. null: never set, so the graph is off |
created_at, updated_at |
datetime | ISO 8601 |
{
"project_id": 1,
"project_name": "HR handbook",
"description": "Policies for all staff",
"collection_name": "pagelore_project_1",
"chunking": {"strategy": "recursive", "chunk_size": 800},
"text_search_language": "english",
"graph": {"enabled": true, "extractor": "llm", "max_entities_per_chunk": 20, "auto_build": false,
"entity_types": ["person", "organization", "location", "product", "event", "concept"]},
"created_at": "2026-11-02T09:14:03.120Z",
"updated_at": "2026-11-02T09:14:03.120Z"
}
Graph settings¶
The graph object of create and update requests. Unknown fields are
refused (422). See Knowledge graph.
| Field | Type | Allowed values | Default | |
|---|---|---|---|---|
enabled |
boolean | false |
The project has a knowledge graph. POST .../graph/build extracts it, and retrieval can use it (graph option) |
|
extractor |
string | llm, gliner, rules |
llm |
llm: the configured LLM lists each chunk's entities and the relations it states. gliner: a local named entity model (the gliner extra) finds entities of entity_types in any language, related when they share a sentence. rules: no model; capitalized names, acronyms, quoted terms and code identifiers, related when they share a sentence. It is weak on scripts without letter case, such as Arabic |
entity_types |
list of strings | 1 to 30 types | person, organization, location, product, event, concept |
Types the llm and gliner extractors assign. The llm extractor types anything else as other. Each type is normalized: lowercase, with other characters turned to _ ("Legal Case" becomes legal_case). It must then match ^[a-z][a-z0-9_]{0,63}$. Repeats are removed |
max_entities_per_chunk |
integer | 1 to 100 | 20 |
The most entities one chunk adds |
auto_build |
boolean | false |
Ingestion that adds or changes documents queues a graph build of the new chunks. With the llm extractor, each upload then costs LLM calls |
POST /projects¶
Create a project. Needs a write key that is not limited to projects (a
limited key gets 403).
Body (JSON, unknown fields refused):
| Field | Type | Required | Allowed values | Default | |
|---|---|---|---|---|---|
project_name |
string | yes | 1 to 128 characters, trimmed | Must be unique | |
description |
string | no | up to 10000 characters | null |
|
collection_name |
string | no | 3 to 45 characters matching ^[A-Za-z0-9][A-Za-z0-9_-]{1,43}[A-Za-z0-9]$ |
pagelore_project_<id> |
The vector DB collection. Projects that name the same collection share it |
chunking |
object | no | Chunking options | null |
Defaults for this project's uploads |
text_search_language |
string | no | 1 to 63 characters, lowercased; one of GET /data/text-search-languages |
TEXT_SEARCH_LANGUAGE (english) |
Stemming for the keyword index: english, arabic, french, ..., or simple (no stemming, any language) |
graph |
object | no | Graph settings | off |
Response: 201 with the project.
Errors:
| Status | When |
|---|---|
| 403 | The key is limited to projects |
| 409 | The name is taken, or the collection exists for another embedding model |
| 422 | An invalid field, or an unknown text search language |
curl -X POST "$BASE/projects" -H "Authorization: Bearer $KEY" \
-H 'Content-Type: application/json' -d '{
"project_name": "HR handbook",
"description": "Policies for all staff",
"chunking": {"strategy": "recursive", "chunk_size": 800, "chunk_overlap": 100},
"text_search_language": "english",
"graph": {"enabled": true, "extractor": "gliner", "entity_types": ["person", "policy", "benefit"]}
}'
GET /projects¶
List projects, newest first. A key limited to projects only sees those.
Query:
| Parameter | Type | Allowed values | Default |
|---|---|---|---|
page |
integer | 1 or more | 1 |
page_size |
integer | 1 to 200 | 50 |
Response: 200
{"projects": [{"project_id": 1, "project_name": "HR handbook", "...": "..."}],
"total": 1, "page": 1, "page_size": 50}
GET /projects/{project_id}¶
Get one project.
| Path parameter | Type | |
|---|---|---|
project_id |
integer, 1 or more |
Response: 200 with the project. 404 when it does not exist; 403 when the key can't use it.
PATCH /projects/{project_id}¶
Change a project. Only the fields sent change.
Body (JSON, unknown fields refused):
| Field | Type | |
|---|---|---|
project_name |
string, 1 to 128 characters | Must be unique |
description |
string, up to 10000 characters | |
chunking |
object | Chunking options. Replaces the project's options; {} resets them to the server defaults. Applies to new uploads and re-processing, not to documents already indexed |
text_search_language |
string | Rebuilds the keyword index of the project's chunks in this language. Nothing is embedded again |
graph |
object | Graph settings. Merged: only the fields given change. A new extractor or new entity types apply to chunks extracted from now on; build with rebuild: true to apply them to all |
Response: 200 with the project.
Errors: 404, 409 (the name is taken), 422.
curl -X PATCH "$BASE/projects/1" -H "Authorization: Bearer $KEY" \
-H 'Content-Type: application/json' \
-d '{"text_search_language": "simple", "graph": {"auto_build": true}}'
DELETE /projects/{project_id}¶
Delete a project with everything in it: documents, chunks, kept files, graph and jobs. Its collection is deleted too. If another project shares the collection, only this project's vectors are removed.
Response: 204, no body. 404 when it does not exist.
GET /projects/{project_id}/index¶
Whether the project's collection matches the configured vector DB and embedding model, and how many documents need indexing again. See Changing the vector DB or model.
Response: 200
| Field | Type | |
|---|---|---|
project_id |
integer | |
collection_name |
string | |
vector_db_backend |
string | The configured vector DB, such as qdrant or pgvector |
configured_embedding |
object | {provider, model, size} of the configured model |
collection_exists |
boolean | |
collection_embedding |
object or null | {provider, model, size} the collection was created for, as recorded |
problem |
string or null | null: it can be used. missing: no collection yet. model_mismatch: made for another model. unregistered: made outside Pagelore, model unknown. external_vectors: made for vectors you supply |
message |
string or null | The problem, in words |
documents |
object | Documents per state: pending, processing, indexed (in the current collection), stale (indexed elsewhere), failed |
needs_reindex |
boolean | true when the collection has a problem or any document is stale. Failed documents alone don't set it |
{
"project_id": 1,
"collection_name": "pagelore_project_1",
"vector_db_backend": "qdrant",
"configured_embedding": {"provider": "openai", "model": "text-embedding-3-small", "size": 1536},
"collection_exists": true,
"collection_embedding": {"provider": "ollama", "model": "nomic-embed-text", "size": 768},
"problem": "model_mismatch",
"message": "The collection was made for ollama/nomic-embed-text.",
"documents": {"pending": 0, "processing": 0, "indexed": 0, "stale": 42, "failed": 1},
"needs_reindex": true
}
POST /projects/{project_id}/reindex¶
Index again what is stale or failed, or every document. A collection made for another model is recreated.
Body (JSON, every field optional, unknown fields refused):
| Field | Type | Default | |
|---|---|---|---|
all |
boolean | false |
Re-process every processed document, not only stale and failed ones. Use it to apply new chunking |
chunking |
object | none | Chunking options for every document, merged over the project's. Default: each document keeps the options it was last indexed with |
reload |
boolean | false |
Extract the text again from the kept files instead of re-chunking the stored text |
force |
boolean | false |
Also take documents stuck in processing (after a crash) |
recreate_shared |
boolean | false |
Allow recreating a collection other projects share. Their vectors are dropped too. Without it, a shared collection gives 409 |
background |
boolean | false |
Return at once and do the work as a job |
Response: 200
| Field | Type | |
|---|---|---|
project_id |
integer | |
collection |
string | kept, created (it was missing) or recreated (it belonged to another model; its old vectors were dropped) |
processing |
string | inline, background or none (nothing to re-process) |
job_id |
integer or null | With background: true |
targets |
integer | Documents re-processed, or queued |
counts |
object | Resulting document statuses (inline only) |
results |
list | {document_id, file_name, status, chunk_count, error} per document (inline only) |
skipped |
list | {document_id, file_name, reason}, for example a document being processed |
index |
object or null | The index state afterwards (inline only) |
Errors:
| Status | When |
|---|---|
| 404 | The project does not exist |
| 409 | The collection is shared and recreate_shared is false |
| 422 | Invalid chunking options |
| 502 | The embedding provider failed |
# After switching EMBEDDING_MODEL: rebuild in the background
curl -X POST "$BASE/projects/1/reindex" -H "Authorization: Bearer $KEY" \
-H 'Content-Type: application/json' -d '{"background": true}'
# Re-chunk every document with smaller chunks
curl -X POST "$BASE/projects/1/reindex" -H "Authorization: Bearer $KEY" \
-H 'Content-Type: application/json' \
-d '{"all": true, "chunking": {"chunk_size": 500, "chunk_overlap": 50}}'