HydraCore
API by router

Knowledge

Ingest Text Admin

Ingest text content into knowledge base.

POST
/v1/knowledge/ingest
AuthorizationBearer <token>

In: header

Header Parameters

X-Api-Key?X-Api-Key
chunk_overlap?Chunk Overlap
Default200
Range0 <= value <= 1000
chunk_size?Chunk Size
Default1500
Range200 <= value <= 5000
contentContent

Text content to ingest

Length1 <= length
customer_id?Customer Id
instance_id?Instance Id
source_idSource Id

Source identifier (file path, URL, etc.)

Lengthlength <= 500
source_nameSource Name

Human-readable source name

Lengthlength <= 500
source_type?Source Type

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

Default"r2"

Response Body

curl -X POST "https://loading/v1/knowledge/ingest" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{    "content": "string",    "source_id": "string",    "source_name": "string"  }'
{
  "chunks_created": 0,
  "source_id": "string",
  "tokens_embedded": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Sources

List knowledge sources with chunk counts.

GET
/v1/knowledge/sources
AuthorizationBearer <token>

In: header

Query Parameters

customer_id?Customer Id

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X GET "https://loading/v1/knowledge/sources?customer_id=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Api-Key: string"
[
  {
    "chunk_count": 0,
    "source_id": "string",
    "source_name": "string",
    "source_type": "string",
    "total_tokens": 0
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete Source

Delete chunks for a knowledge source, scoped by customer/instance.

Matches the same 4-tuple scoping as re-ingest:

  • tenant_id + source_type + source_id + customer_id + instance_id
  • NULL dimensions match only NULL (not all).
DELETE
/v1/knowledge/sources/{source_id}
AuthorizationBearer <token>

In: header

Path Parameters

source_idSource Id

Query Parameters

source_type?Source Type
Default"r2"
customer_id?Customer Id
instance_id?Instance Id

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X DELETE "https://loading/v1/knowledge/sources/string?source_type=r2&customer_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&instance_id=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Api-Key: string"
{}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}