Uploads one file up to 10 MB and starts extraction and indexing. Supported formats are PDF, Word, Excel, PowerPoint, text, Markdown, HTML, CSV, and JSON. The returned document begins in processing status.
api.heroui.pro/v1/knowledge/filesSend the request to see the live response from the Agents API.
AgentApiKey An Agent API key with the permission required by the operation.
In: header
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.heroui.pro/v1/knowledge/files" \ -F file="string"{
"character_count": 0,
"created_at": "2019-08-24T14:15:22Z",
"error_message": "string",
"file_name": "string",
"file_size_bytes": 0,
"id": "string",
"is_enabled": true,
"last_checked_at": "2019-08-24T14:15:22Z",
"last_synced_at": "2019-08-24T14:15:22Z",
"name": "string",
"next_refresh_at": "2019-08-24T14:15:22Z",
"object": "knowledge_document",
"refresh_error_message": "string",
"refresh_interval_hours": 0,
"refresh_status": "idle",
"source_type": "file",
"source_url": "http://example.com",
"status": "processing",
"updated_at": "2019-08-24T14:15:22Z"
}{
"message": "limit must be an integer between 1 and 100.",
"name": "bad_request"
}{
"message": "The supplied API key is invalid or revoked.",
"name": "unauthorized"
}{
"message": "This API key does not have the required knowledge:write permission.",
"name": "insufficient_scope"
}{
"message": "The knowledge document does not have indexed content yet.",
"name": "conflict"
}{
"message": "Files must be 10 MB or smaller.",
"name": "payload_too_large"
}{
"message": "The uploaded file type is not supported.",
"name": "unsupported_media_type"
}{
"message": "Too many requests. Please try again later.",
"name": "rate_limited"
}{
"message": "Internal server error.",
"name": "internal_server_error"
}{
"message": "The API is temporarily unavailable.",
"name": "service_unavailable"
}Retrieve knowledge content GET
Returns the extracted markdown currently indexed for the document. During a refresh, this remains the previous ready version until the replacement succeeds.
Add a knowledge URL POST
Adds a public HTTP or HTTPS URL and starts extraction and indexing. The returned document begins in processing status.
binary1 <= length <= 120