POST
/
api
/
r2r
/
v3
/
collections
/
{id}
/
extract
Extract entities and relationships
curl --request POST \
  --url https://api.intelligence.io.solutions/api/r2r/v3/collections/{id}/extract \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "graph_extraction_prompt": "graph_extraction",
  "graph_entity_description_prompt": "graph_entity_description",
  "entity_types": "<string>",
  "relation_types": "<string>",
  "chunk_merge_count": 2,
  "max_knowledge_relationships": 65536,
  "generation_config": {
    "model": "<string>",
    "temperature": 123,
    "top_p": 123,
    "max_tokens_to_sample": 123,
    "stream": true,
    "functions": [
      "<any>"
    ],
    "tools": [
      "<any>"
    ],
    "add_generation_kwargs": [
      "<any>"
    ],
    "api_base": "<string>",
    "response_format": [
      {
        "Base Model": {}
      }
    ],
    "extended_thinking": false,
    "thinking_budget": 123,
    "reasoning_effort": "<string>"
  },
  "automatic_deduplication": false
}'
{
  "results": {
    "message": "message"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
integer
required

Collection ID

Body

application/json
graph_extraction_prompt
string
default:graph_extraction

The prompt to use for knowledge graph extraction.

graph_entity_description_prompt
string
default:graph_entity_description

The prompt to use for entity description generation.

entity_types
string

The types of entities to extract.

relation_types
string

The types of relations to extract.

chunk_merge_count
integer
default:2

The number of extractions to merge into a single graph extraction.

max_knowledge_relationships
integer
default:65536

The maximum length of the description for a node in the graph.

generation_config
object
automatic_deduplication
boolean
default:false

Whether to automatically deduplicate entities.

Response

200

results
object