API by router
Knowledge internal
POST
instance_id*Instance IdFormat
uuidapplication/json- body
chunk_overlap?Chunk OverlapRange
0 <= value <= 1000Default
200chunk_size?Chunk SizeRange
200 <= value <= 5000Default
1500content*ContentText content to ingest
Length
1 <= lengthcustomer_id?|nullinstance_id?|nullsource_id*Source IdSource identifier (file path, URL, etc.)
Length
length <= 500source_name*Source NameHuman-readable source name
Length
length <= 500source_type?Source TypeSource type: r2, drive, web, sheet, email
Default
"r2"Successful Response
application/json- response
chunks_created*Chunks Createdsource_id*Source Idtokens_embedded*Tokens Embeddedcurl -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}POST
instance_id*Instance IdFormat
uuidapplication/json- body
customer_id?|nullquery*QueryLength
1 <= length <= 2000top_k?Top KRange
1 <= value <= 20Default
5Successful Response
application/json- response
query*Queryresults*array<>total*Totalcurl -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}