# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kudra.ai/kudras-features/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
