Skip to main content
POST
Cognify (low level): build the knowledge graph from already-added data

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
datasets
string[] | null

Dataset names to process; resolved against datasets owned by the authenticated user.

Example:
datasetIds
string<uuid>[] | null

Dataset UUIDs to process (required for datasets shared with you). Takes precedence over the datasets name list when both are provided.

Example:
runInBackground
boolean | null
default:false

If true, the request returns immediately with a pipeline_run_id while the graph builds server-side — track completion via GET /v1/datasets/status or the /v1/cognify/subscribe WebSocket. If false, the request blocks until the knowledge graph is fully built, which can take minutes for large datasets.

graphModel
Graphmodel · object | null

JSON schema describing a custom graph model for entity extraction, including a top-level 'title' key. When omitted or {}, the default KnowledgeGraph model is used — a restrictive schema here can produce an empty graph.

Example:
customPrompt
string | null
default:""

Replaces the default entity-extraction prompt to steer which entities and relationships get extracted (e.g. 'Extract entities focusing on technical concepts and their relationships.'). Leave empty for the default prompt.

Example:

""

chunkSize
integer | null

Maximum tokens per chunk (e.g. 4096). Leave null for automatic model-based sizing. Larger chunks give more context per LLM extraction pass; smaller chunks give finer-grained extraction at higher LLM cost.

Example:

null

ontologyKey
string[] | null

Keys of previously uploaded ontologies (see /v1/ontologies) to ground entity extraction. Leave empty to process without an ontology.

Example:
chunksPerBatch
integer | null

Number of chunks to process per task batch (e.g. 36). Controls processing parallelism/throughput; leave null for the pipeline default. Higher the value higher the parallelism/throughput

Example:

null

dataPerBatch
integer | null
default:20

Maximum number of data items to process concurrently within a dataset.

Example:

20

Response

Successful Response

{key}
PipelineRunInfo · object