# Using the API

## Workflow

The **BlurIt** **Anonymization API** operates asynchronously, as the processing time for media files can vary significantly—from a few seconds for images to several hours for large video files. To monitor the status of an anonymization job, the API provides two options:

* **Pull Mode**: You periodically check the status of a job by calling the `GET /innovation-service/anonymization` endpoint until the job is complete.
* **Push Mode**: We notify you of any changes to the job status via a webhook endpoint that you create and host.

### Pull mode workflow

* **Create a Job**\
  Send a `POST` request to `/innovation-service/anonymization` to create an anonymization job. The API will return a unique Job ID.
* **Check Job Status** *(Optional)*\
  Use the `GET /innovation-service/anonymization` endpoint to retrieve the job's current status (e.g., started, completed, failed). Pass the Job ID received in step 1 as a parameter.

  > **Note**: This step is optional if you use webhooks to receive status updates.
* **Download the Processed Media**\
  Once the job is complete, use the `GET /innovation-service/result/{fileName}` endpoint to download the processed media. Provide the file name from step 2 or from the WebSocket message (if applicable).

**⚠ Important:**

In pull mode, step 2 must be performed periodically until the job processing is complete—regardless of whether the result is successful or has failed.

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

### Push mode workflow

For details about the workflow when using Webhooks, refer to the following section :

[Webhook](/webhook.md)

## Supported file formats

The BlurIt Anonymization API supports the following file formats :thumbsup:

* Images
  * JPEG
  * PNG
  * WEBP
* Videos
  * MP4
  * AVI
  * MOV
  * MKV
* ZIP archives containing supported image or video files.

For a detailed list of supported MIME types, please refer to the `input_format` parameter description in the `POST /innovation-service/anonymization` documentation.

## Limitations

* The file size for media uploaded to the BlurIt Anonymization API must not exceed **8 GB**.
* For ZIP files, the 8 GB limitation applies to the ZIP file itself (including all files contained within the archive).


---

# 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://doc-api.blurit.io/using-the-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.
