Skip to main content
POST
Add Sources

Authorizations

string
required
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

string
required
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, use Content-Type: application/json:
array
Inline text sources to add to the knowledge base. Each item should include a title and the text content.
string[]
A list of URLs to crawl and add as knowledge base sources. Each URL must be publicly reachable.

Body (File Upload)

For uploading files, use Content-Type: multipart/form-data:
file
The file to upload as a knowledge base source. Use multipart form data for file uploads.

Response

boolean
Whether the request succeeded.
string
Human-readable status message.
object
Returned data.

Authorizations

X-Api-Key
string
header
required

Path Parameters

kb_id
string
required

Knowledge Base ID

Body

knowledge_base_texts
object[]

Array of text sources

knowledge_base_urls
string[]

Array of URLs to crawl

Response

200 - application/json

Successful response

success
boolean
message
string
data
object