> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeus.agentspro.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Process Document

> Trigger document processing (async) — parsing, chunking, and vectorization

Manually triggers the background document processing pipeline: load file → SmartChunker intelligent chunking → Embedding vectorization → store in pgvector.

Processing runs asynchronously via `BackgroundTasks`. Poll the status using [Get Document](/en/knowledge-base/api/get-document).

### State Machine

| Current Status       | Behavior                                          |
| -------------------- | ------------------------------------------------- |
| `pending` / `failed` | Starts the background processing task             |
| `processing`         | Returns `"Document is currently being processed"` |
| `completed`          | Returns `"Document has already been processed"`   |

<ParamField header="Authorization" type="string" required>
  Bearer JWT Token
</ParamField>

<ParamField path="id" type="string" required>
  Knowledge base ID
</ParamField>

<ParamField path="docId" type="string" required>
  Document ID
</ParamField>

<ResponseField name="message" type="string">
  Operation result message
</ResponseField>

<ResponseField name="status" type="string">
  Current document status
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://zeus-api.agentspro.cn/api/knowledge-base/kb_abc123/documents/doc_xyz789/process \
    --header 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Document processing started",
    "status": "processing"
  }
  ```
</ResponseExample>
