Add Sources
RAG Knowledge Base API
Add Sources
Add Sources to Knowledge Base.
POST
Add Sources
Authorizations
Your Agni API key used to authenticate the request. Pass it in the
X-Api-Key header. Find or rotate it from your Ravan AI account settings.Path Parameters
The unique knowledge base ID. Use the ID returned by the knowledge base create or list endpoint.
Body (JSON)
For adding text and URL sources, useContent-Type: application/json:
Inline text sources to add to the knowledge base. Each item should include a title and the text content.
A list of URLs to crawl and add as knowledge base sources. Each URL must be publicly reachable.
Body (File Upload)
For uploading files, useContent-Type: multipart/form-data:
The file to upload as a knowledge base source. Use multipart form data for file uploads.
Response
Whether the request succeeded.
Human-readable status message.
Returned data.

