> For the complete documentation index, see [llms.txt](https://docs.kudra.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kudra.ai/kudras-features/api.md).

# API

Kudra supports fully programmatic file upload for data extraction. The API feature is available on all packages.

1. **Upload Files with API using Python requests:**

In order to automate the upload process, Kudra offers fully programmatic file upload. Below are the file formats that can be uploaded by API:

* PDF,  PNG/JPG (OCR), DOCX, CSV, and TXT

In order to upload files with API to a project, simply click on the three dots on the project card and select "Preview API Code".&#x20;

<div align="center" data-full-width="false"><figure><img src="/files/hQ4ozyS57yEa3WIjuEnD" alt="" width="322"><figcaption></figcaption></figure></div>

Select the Language type (currently support Python requests). Press Copy API Code button and paste the code into your application. Please note that the KudraCloudClient need to be installed by running 'pip install KudraCloudClient'.&#x20;

<figure><img src="/files/5zrJ7ZEo0JnwipbSEkah" alt="" width="563"><figcaption></figcaption></figure>

To upload the files, enter a path of the directory where the files reside in the files directory variable files\_dir.

2. **Upload files with API using cURL requests:**

Kudra supports file uploads using cURL requests. To do so, simply run the command below.&#x20;

`curl --location --request POST "<URL PROJECT>" --form "files=@<FULL PATH FILE 1>" --form "files=@<FULL PATH FILE 2>"`

Make sure to specify the file paths and the project URL found in the project card by clicking on the three dots and clicking on 'Copy API Code' as shown below.&#x20;

<figure><img src="/files/1Cdy4pqnJLOtARenI372" alt="" width="342"><figcaption></figcaption></figure>

**Upload files with Postman:**

To upload files to Kudra with Postman, add your project URL to the POST request address, and add the key 'files' in the Body of the request. Then, add your files in the Value field and press Send.

<figure><img src="/files/fIj0NbIrM8WzgtW2l1u8" alt=""><figcaption></figcaption></figure>
