---
title: "Create Document"
method: POST
path: "/knowledge-base/document/create"
tags: ["knowledge-base"]
---

# Create Document

`POST /knowledge-base/document/create`

Process and create document entries in the knowledge base. The document will be split into chunks for efficient retrieval.

## Request body

- object
  - `document` object, required — Array of file URLs to process
    - `url` string — The URL of the document to process
    - `base64` string — The raw bytes of the file, represented in base64
    - `filename` string — The filename of the document

## Response `201`

201 Created

- object
  - `file_name` string — The filename of the document
  - `document_id` string — The ID of the document
  - `file_path` string — The path of the document
  - `chunks_count` number — The number of chunks created for the document

## Other responses

- `400` — Bad Request - Invalid file format or URL

---

[API](https://skmtc.net/periskope/apis/api-local.md) · [All operations](https://skmtc.net/periskope/apis/api-local/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/periskope/api-local/revisions/f2738ced87d8/schema)
