HydraCore
API by router

Knowledge internal

POST
/internal/v1/instances/{instance_id}/knowledge/ingest

Path Parameters

instance_id*Instance Id
Formatuuid

Request Body

application/json
  1. body
chunk_overlap?Chunk Overlap
Range0 <= value <= 1000
Default200
chunk_size?Chunk Size
Range200 <= value <= 5000
Default1500
content*Content

Text content to ingest

Length1 <= length
customer_id?|null
instance_id?|null
source_id*Source Id

Source identifier (file path, URL, etc.)

Lengthlength <= 500
source_name*Source Name

Human-readable source name

Lengthlength <= 500
source_type?Source Type

Source type: r2, drive, web, sheet, email

Default"r2"

Response Body

Successful Response

application/json
  1. response
chunks_created*Chunks Created
source_id*Source Id
tokens_embedded*Tokens Embedded
Example Request
curl -X POST 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/knowledge/ingest' \  -H 'Content-Type: application/json' \  -d '{  "content": "string",  "source_id": "string",  "source_name": "string"}'
Example Response
{  "chunks_created": 0,  "source_id": "string",  "tokens_embedded": 0}

Query Knowledge Internal

POST
/internal/v1/instances/{instance_id}/knowledge/query

Path Parameters

instance_id*Instance Id
Formatuuid

Request Body

application/json
  1. body
customer_id?|null
query*Query
Length1 <= length <= 2000
top_k?Top K
Range1 <= value <= 20
Default5

Response Body

Successful Response

application/json
  1. response
query*Query
results*array<>
total*Total
Example Request
curl -X POST 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/knowledge/query' \  -H 'Content-Type: application/json' \  -d '{  "query": "string"}'
Example Response
{  "query": "string",  "results": [    {      "chunk_id": "string",      "chunk_index": 0,      "chunk_text": "string",      "similarity": 0,      "source_id": "string",      "source_name": "string",      "source_type": "string",      "token_count": 0    }  ],  "total": 0}