# Process a directory

## Blur It Directory Post

> Add a blurit directory task in task queue.

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/blur_it/directory":{"post":{"summary":"Blur It Directory Post","description":"Add a blurit directory task in task queue.","operationId":"blur_it_directory_post_api_blur_it_directory_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectAndBlurDirectoryBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRespsonse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DetectAndBlurDirectoryBody":{"title":"DetectAndBlurDirectoryBody","required":["input_directory","output_directory"],"type":"object","properties":{"input_directory":{"$ref":"#/components/schemas/InputDirectory"},"output_directory":{"$ref":"#/components/schemas/OutputDirectory"},"export_media":{"title":"Should we export the blured media ?","type":"boolean","default":true},"export_json":{"title":"Should we export the detections list ?","type":"boolean","default":true},"blur_plates":{"title":"Should we blur plates ?","type":"boolean","default":true},"blur_heads":{"title":"Should we blur heads ?","type":"boolean","default":true},"keep_audio":{"title":"Should we keep audio in the output medias ?","type":"boolean","default":true}},"description":"Detect and blur directory route's body.\nAt least one of output_media or output_json is needed."},"InputDirectory":{"title":"InputDirectory","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"Directory's relative path","type":"string"},"auto_delete":{"title":"If set to True, deletes the input file after processing.","type":"boolean","default":false}},"description":"Input directory structure"},"OutputDirectory":{"title":"OutputDirectory","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"Directory's relative path","type":"string"}},"description":"Output directory structure"},"TaskRespsonse":{"title":"TaskRespsonse","required":["task_id"],"type":"object","properties":{"task_id":{"title":"Unique task hash","type":"string"}},"description":"Task POST result structure"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


---

# 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-op.blurit.io/2.4.7/blurit-on-premise/usage/api/tasks/process-a-directory.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.
