Add File Source
POST/agents/knowledge/{kb_id}/sources/file
Authentication
Authorization: Bearer vm_sk_… with the agents.write permission (or all.write). See Authentication. SDK: client.knowledge.upload_file (Python), client.knowledge.uploadFile (Node).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
kb_id* | path | string |
Request body
multipart/form-data
| Field | Type | Description |
|---|---|---|
file* | file |
Response
202 application/json
| Field | Type | Description |
|---|---|---|
chunk_count | integer | |
created_at* | string | |
error | string | |
id* | string | |
kb_id* | string | |
kind* | stringone of file, url, text | |
status* | stringone of processing, ready, failed | |
title* | string |
{
"created_at": "2026-12-05T10:00:00Z",
"id": "string",
"kb_id": "string",
"kind": "file",
"status": "processing",
"title": "string"
}Errors
401 | Missing, wrong, revoked or expired key. |
403 | The key lacks agents.write, the route is not available to keys, or the key's IP allow-list refuses this client. |
402 | Not enough credits, or the key reached its spending cap. |
404 | Not found for this account. |
422 | The request failed validation; `detail` lists the fields. |
429 | Over a rate limit; retry after `Retry-After` seconds. |
All statuses: Errors.
Example
curl -X POST "https://api.voicemint.io/api/v1/agents/knowledge/KB_ID/sources/file" \
-H "Authorization: Bearer $VOICEMINT_API_KEY" \
-F "file=@./file"