Talkr AI
API ReferenceKnowledge BaseDocuments

Process an Uploaded Document

Create the document record for a just-uploaded file and trigger background processing

Call this after uploading to the URL from Get a Document Upload URL. Enqueues a background job that chunks and embeds the document (OpenAI text-embedding-3-small by default, requiring an embeddings API key configured in Model Configuration). Poll Get a Document to watch processing_status move from pending → processing → completed or failed.

POST
/api/v1/knowledge-base/process-document

Header Parameters

authorization?string|null
X-API-Key?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request schema for triggering document processing.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/knowledge-base/process-document" \  -H "Content-Type: application/json" \  -d '{    "document_uuid": "string",    "s3_key": "string"  }'
{  "id": 0,  "document_uuid": "string",  "filename": "string",  "file_size_bytes": 0,  "file_hash": "string",  "mime_type": "string",  "processing_status": "string",  "processing_error": "string",  "total_chunks": 0,  "retrieval_mode": "chunked",  "custom_metadata": {},  "docling_metadata": {},  "source_url": "string",  "collection_uuid": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "organization_id": 0,  "created_by": 0,  "is_active": true}