# Getting Started

### Overview

The BlurIt Anonymization API allows clients to use the BlurIt Anonymization platform to blur faces and licence plates in images and videos.

### Principles

The BlurIt Anonymization API contains predictable resource-oriented URLs, that accept JSON request bodies and returns JSON responses. It uses standard HTTP responses codes (200, 404, etc.) and verbs (GET, POST, etc.) as well as an HTTP header for authentication.

## How it works ?

### Authentication

Authentication is made with the `POST /login` route, with `clientId` and a `secretId` as parameters. It will return an **access token** that will be needed to call all other routes, as well as a **refresh token**. The access token have a **lifetime of 1 hour**. The `/login` route does not use any authorization.

### Call the routes

Once authenticated, you can use the API. All routes require the access token to be sent in the `Authorization` HTTP header as a Bearer token : `Authorization: Bearer xxxxxxx`, where `xxxxxxx` is the **access\_token** you received in the `POST /login` response.

### Refresh token

If your access token is expired, you need to refresh your access token by calling the `POST /token` route with your refresh token in the body .

⚠ *Important: The access token must be included in the Authorization header even if it's expired.*


# Requirements

## Create a BlurIt account

To be able to use the BlurIt API, you must subscribe and create your account on the BlurIt platform services.

### Subscribe

Please subscribe at <https://blurit.io/en/pricing>, by selecting a **Trial** or **Pay As You Go** plan

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FdWMmkkyva4QaZ1NbmFYD%2Fimage.png?alt=media&amp;token=48b8b872-77fa-40d0-b21c-f09ad5a178f1" alt=""><figcaption><p>Subscribe to BlurIt services</p></figcaption></figure>

### Complete your informations <a href="#complete-your-informations" id="complete-your-informations"></a>

You must complete your personal and payment information and then you will receive an email to complete the creation of your account by setting your password.

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FGUdsh0TSuTyY7iLDNYTr%2Fimage.png?alt=media&amp;token=9e2932cd-1dd7-41be-9ca6-ab3dabdc8149" alt=""><figcaption><p>Complete your informations</p></figcaption></figure>

### Check your email and set your password

Check your mailbox if you have received the email "**Account Creation**" from *<no_reply@blurit.io>.*

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2F7XwaQC4HrN0s67UlseyV%2Fimage.png?alt=media&amp;token=9a6cf20d-d306-4182-ba02-1ae1fab8d253" alt="" width="375"><figcaption><p>You have receive an email!</p></figcaption></figure>

Click on "**Complete account**" to access the page to enter your password.

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2F8sHLA4QfhnYRcuuxpCKQ%2FScreenshot%202024-12-11%20at%2013.51.15.png?alt=media&amp;token=3172a034-e150-47d0-afb0-ccd73d79f684" alt=""><figcaption><p>Enter your password</p></figcaption></figure>

{% hint style="info" %}
You can now log in to BlurIt Studio whenever you want with your email address and password at [app.blurit.io ](https://app.blurit.io/login)or by clicking on the Login button on the [blurit.io](https://blurit.io/) home page.
{% endhint %}

## Access to your API ClientId & SecretId

You can now access to your **clientId** and a **secretId** in the Account / Developer section.

These two IDs will be needed to use the API.&#x20;

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FVP3NEsONbnGrUJKY8gLl%2Fimage.png?alt=media&amp;token=b971f49b-e0cb-4c33-a565-046b52218901" alt=""><figcaption><p>API ClientId &#x26; SecretId</p></figcaption></figure>


# Using the API v1

## 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="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FtcGPItcWoDWyE5ll70Ia%2Fschema.png?alt=media&amp;token=94956ef5-9b00-49fb-b053-1333a78598e8" alt=""><figcaption></figcaption></figure>

### Push mode workflow

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

[Webhook](/api-v1/webhook)

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


# API Documentation


# Authentication

## Authenticate to the API

> Authenticate to the API using your client credentials. Returns a token needed for all other routes.

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"servers":[{"url":"https://api.services.wassa.io"}],"security":[],"paths":{"/login":{"post":{"tags":["Authentication"],"summary":"Authenticate to the API","description":"Authenticate to the API using your client credentials. Returns a token needed for all other routes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}}},"responses":{"200":{"description":"Successfully authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"400":{"description":"Bad Request - Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"401":{"description":"Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error401"}}}}}}}},"components":{"schemas":{"LoginRequest":{"type":"object","required":["clientId","secretId"],"properties":{"clientId":{"type":"string","description":"Client Id available in the Developer Account section"},"secretId":{"type":"string","description":"Secret ID available in the Developer Account section"}}},"LoginResponse":{"type":"object","required":["token","refreshToken","expiresIn"],"properties":{"token":{"type":"string","description":"JWT token for authentication"},"refreshToken":{"type":"string","description":"Token used to refresh the JWT token"},"expiresIn":{"type":"integer","format":"int32","description":"Token expiration time in seconds"}}},"Error400":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}},"Error401":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]}}}}
```

## Refresh access token

> Refresh an expired access token using the refresh token. The Bearer token can be expired.

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"servers":[{"url":"https://api.services.wassa.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token needed for all other routes. The token acquired with the login route."}},"schemas":{"TokenRequest":{"type":"object","required":["refreshToken"],"properties":{"refreshToken":{"type":"string","description":"Refresh token received from login"}}},"TokenResponse":{"type":"object","required":["token","refreshToken","expiresIn"],"properties":{"token":{"type":"string","description":"New JWT token"},"refreshToken":{"type":"string","description":"New refresh token"},"expiresIn":{"type":"integer","format":"int32","description":"Token expiration time in seconds"}}},"Error400":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}},"Error401":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"Error403":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]}}},"paths":{"/token":{"post":{"tags":["Authentication"],"summary":"Refresh access token","description":"Refresh an expired access token using the refresh token. The Bearer token can be expired.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}}},"responses":{"200":{"description":"Token successfully refreshed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Bad Request - Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"401":{"description":"Unauthorized - Invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error401"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403"}}}}}}}}}
```


# Anonymization

## Get anonymization job status

> Check the status of an anonymization job.

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"servers":[{"url":"https://api.services.wassa.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token needed for all other routes. The token acquired with the login route."}},"schemas":{"Error400":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}},"Error401":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"Error403":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]}}},"paths":{"/innovation-service/anonymization":{"get":{"tags":["Anonymization"],"summary":"Get anonymization job status","description":"Check the status of an anonymization job.","parameters":[{"name":"anonymization_job_id","in":"query","required":true,"schema":{"type":"string","description":"Job ID received from POST request"}}],"responses":{"200":{"description":"Job status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["Sent","Started","Succeeded","Failed"],"description":"Current status of the job"},"output_media":{"type":"string","description":"URL to download the processed media (when status is completed)"},"output_json":{"type":"string","description":"URL to download the JSON with detection coordinates (when status is completed)"},"error":{"type":"string","description":"Error message (when status is failed)"}}}}}},"400":{"description":"Bad Request - Invalid job ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"401":{"description":"Unauthorized - Invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error401"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403"}}}}}}}}}
```

## Start an anonymization job

> This route will create a job for anonymizing faces and/or license plates in images or videos. The process is asynchronous and will return a job ID that can be used to check the status.\
> \
> Note: For a basic request, only the \`input\_media\` field is required. All other form fields should be disabled in the test interface.

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"servers":[{"url":"https://api.services.wassa.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token needed for all other routes. The token acquired with the login route."}},"schemas":{"Error400":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}},"Error401":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"Error402":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"Error403":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"Error413":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]}}},"paths":{"/innovation-service/anonymization":{"post":{"tags":["Anonymization"],"summary":"Start an anonymization job","description":"This route will create a job for anonymizing faces and/or license plates in images or videos. The process is asynchronous and will return a job ID that can be used to check the status.\n\nNote: For a basic request, only the `input_media` field is required. All other form fields should be disabled in the test interface.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["input_media"],"properties":{"input_media":{"type":"string","format":"binary","description":"Image or video file to process. Accepted formats are JPEG, PNG, WEBP, MP4, AVI, MOV, MKV, ZIP."},"activation_faces_blur":{"type":"boolean","description":"Enable face detection and blurring"},"activation_plates_blur":{"type":"boolean","description":"Enable license plate detection and blurring"},"output_detections_url":{"type":"boolean","description":"Return URLs to download detection coordinates in JSON format"},"included_area":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"left":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1}},"description":"Optional area to restrict detection (normalized coordinates)"},"blur_type":{"type":"object","properties":{"anonymization_type":{"type":"string","enum":["blur","opaque","pixelate"],"description":"Type of anonymization to apply"},"smooth_padding":{"type":"number","description":"Blur intensity (only for **blur** type)","nullable":true},"hex_color":{"type":"string","description":"Color in hexadecimal (only for **opaque** type)","nullable":true},"num_pixels":{"type":"number","description":"Number of pixels (only for **pixelate** type)","nullable":true}}}}}}}},"responses":{"200":{"description":"Job successfully created","content":{"application/json":{"schema":{"type":"object","properties":{"anonymization_job_id":{"type":"string"}}}}}},"400":{"description":"Bad Request - Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"401":{"description":"Unauthorized - Invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error401"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error402"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error413"}}}}}}}}}
```


# Result

## Get result file

> Download result file from BlurIt anonymization service.

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"servers":[{"url":"https://api.services.wassa.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token needed for all other routes. The token acquired with the login route."}},"schemas":{"Error400":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}},"Error401":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"Error403":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]}}},"paths":{"/innovation-service/result/{fileName}":{"get":{"tags":["Result"],"summary":"Get result file","description":"Download result file from BlurIt anonymization service.","parameters":[{"name":"fileName","in":"path","required":true,"schema":{"type":"string","description":"File name received in output_media"}}],"responses":{"200":{"description":"File content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad Request - Invalid filename","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400"}}}},"401":{"description":"Unauthorized - Invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error401"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403"}}}}}}}}}
```


# Models

## The LoginRequest object

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"components":{"schemas":{"LoginRequest":{"type":"object","required":["clientId","secretId"],"properties":{"clientId":{"type":"string","description":"Client Id available in the Developer Account section"},"secretId":{"type":"string","description":"Secret ID available in the Developer Account section"}}}}}}
```

## The LoginResponse object

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"components":{"schemas":{"LoginResponse":{"type":"object","required":["token","refreshToken","expiresIn"],"properties":{"token":{"type":"string","description":"JWT token for authentication"},"refreshToken":{"type":"string","description":"Token used to refresh the JWT token"},"expiresIn":{"type":"integer","format":"int32","description":"Token expiration time in seconds"}}}}}}
```

## The TokenRequest object

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"components":{"schemas":{"TokenRequest":{"type":"object","required":["refreshToken"],"properties":{"refreshToken":{"type":"string","description":"Refresh token received from login"}}}}}}
```

## The TokenResponse object

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"components":{"schemas":{"TokenResponse":{"type":"object","required":["token","refreshToken","expiresIn"],"properties":{"token":{"type":"string","description":"New JWT token"},"refreshToken":{"type":"string","description":"New refresh token"},"expiresIn":{"type":"integer","format":"int32","description":"Token expiration time in seconds"}}}}}}
```

## The BaseErrorResponse object

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"components":{"schemas":{"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}}}}}
```

## The Error400 object

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"components":{"schemas":{"Error400":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}}}}}
```

## The Error401 object

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"components":{"schemas":{"Error401":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}}}}}
```

## The Error402 object

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"components":{"schemas":{"Error402":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}}}}}
```

## The Error403 object

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"components":{"schemas":{"Error403":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}}}}}
```

## The Error413 object

```json
{"openapi":"3.0.1","info":{"title":"Wassa Innovation Services API","version":"1.0.0"},"components":{"schemas":{"Error413":{"allOf":[{"$ref":"#/components/schemas/BaseErrorResponse"}]},"BaseErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"string","description":"Error code"}}}}}}
```


# Webhook

## Principles

A webhook is an HTTP endpoint that will be called by the BlurIt API when the status of a job changes. Webhooks are the preferred way to be notified of a status change as it eliminates the needs to periodically call the `GET /innovation-service/anonymization` route to get a job status.

When using webhooks, you’re in charge of developing the endpoint with respect to the specifications (see below) and making the endpoint available on the Internet. The endpoint must no be secured with IP filtering or other similar security controls.

## Create you webhook endpoint

To process webhooks, you need to:

1. Expose an endpoint on your server
2. Configure your endpoint on your customer manager or directly from our API.
3. Handle webhook events

### Step 1

To receive webhook events you need to develop an endpoint which can receive a HTTP POST call.

### Step 2

Configure your endpoints in your manager developer section, or with our webhook API (see [#add-your-endpoint-in-our-system](#add-your-endpoint-in-our-system "mention")).

NOTE: you cannot configure more than 5 endpoints.

### Step 3

When we deliver a webhook event to your server:

1. First check if the `X-Auth-Token` header exists in the request and that its value is the same as the one we provided to you during the creation of the endpoint (see [Setting up with the Manager](/api-v1/webhook/setting-up-with-the-manager)). If the header is not present or do not match the one that is configured for your endpoint, reject the call.
2. Process the request to extract the taskId and the status (see [#request-format](#request-format "mention") below)
3. Acknowledge the webhook event (see [#response-format](#response-format "mention") below). **Warning : if you don't respect the response format, we might stop calling your endpoint and you may not receive further notifications.**
4. Apply your business logic

## Webhook specifications

### Request format

The requests made to your endpoint will be formatted as follow:

```
{
    "taskId": "XXXXXXXXXXX",
    "status": "XXXXX"
}
```

`status` can have the following values: `Sent`, `Started`, `Succeeded`, `Failed`

### Response format

Your endpoint must send a `200 OK` response formatted as follow:

```
{
    "taskId": "XXXXXXXXXXX"
}
```

## Workflow

* `POST /innovation-service/anonymization` to create a anonymization job. The route will return a unique job ID.

We will then send you POST requests to your endpoint to notify you when the status of the task changes.

* `GET /innovation-service/anonymization?anonymization_job_id={{your_job_id}}` . To get the url of the processed le.
* `GET /innovation-service/result/{fileName}` to download the actual processed media.

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FV6rEtJ7oOyVPF2eKXMHw%2FSchema-2.png?alt=media&amp;token=714e389c-6adc-4f54-9aa3-f764ff15fe8b" alt=""><figcaption></figcaption></figure>

## Add your endpoint in our system

Once you have developed your endpoint route, you can add its URL either in the Manager (see [Setting up with the Manager](/api-v1/webhook/setting-up-with-the-manager)) or by calling an API route (see [Setting up with API calls](/api-v1/webhook/setting-up-with-api-calls)).


# Setting up with the Manager

## Manage your endpoints with Manager

You can add up to 5 endpoints from the "Developer" section of the Manager

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FnjhROBLQyhgQeLgJCUUG%2Fmanager-1.png?alt=media&amp;token=ebd8150b-49c6-460e-86ee-a5491c014cd0" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2Fr34PI8emMpAt3Xpqs0Bu%2Fmanager-2.png?alt=media&amp;token=9faccaeb-36c1-4e41-95af-290c484cfa69" alt=""><figcaption></figcaption></figure>

To create a new webhook endpoint, click on "Add enpoint" then enter the url that you want us to call. Then click on the “Create endpoint” button

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2F9XBZOIAnpQPvndIYN6CZ%2Fmanager-3.png?alt=media&amp;token=cb995e26-e861-41ad-bd96-2e1f930c246c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FEXw2tFjV3QOzhSNn80op%2Fmanager-4.png?alt=media&amp;token=caa21266-c56f-4299-b068-81c4e10f7c12" alt=""><figcaption></figcaption></figure>

Once the endpoint has been created, we will generate a random token that we will pass in the "X-Auth-Token" header of each request we will make to your endpoint.

You can now manager your endpoint, ie. deactivate, test or delete.


# Setting up with API calls

{% openapi src="/files/rApi4sFbRVQGuOV0w07w" path="/webhook-url/get-many" method="get" %}
[webhook-openapi.yml](https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FaJms6riouLBXemyU98fk%2Fblurit-openapi.yml?alt=media\&token=3c227616-b07b-4c15-a6ee-17fec7e6e153)
{% endopenapi %}

{% openapi src="/files/rApi4sFbRVQGuOV0w07w" path="/webhook-url/" method="post" %}
[webhook-openapi.yml](https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FaJms6riouLBXemyU98fk%2Fblurit-openapi.yml?alt=media\&token=3c227616-b07b-4c15-a6ee-17fec7e6e153)
{% endopenapi %}

{% openapi src="/files/rApi4sFbRVQGuOV0w07w" path="/webhook-url/{uuid-webhook}" method="put" %}
[webhook-openapi.yml](https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FaJms6riouLBXemyU98fk%2Fblurit-openapi.yml?alt=media\&token=3c227616-b07b-4c15-a6ee-17fec7e6e153)
{% endopenapi %}

{% openapi src="/files/rApi4sFbRVQGuOV0w07w" path="/webhook-url/{uuid-webhook}" method="delete" %}
[webhook-openapi.yml](https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FaJms6riouLBXemyU98fk%2Fblurit-openapi.yml?alt=media\&token=3c227616-b07b-4c15-a6ee-17fec7e6e153)
{% endopenapi %}

{% openapi src="/files/rApi4sFbRVQGuOV0w07w" path="/webhook-url/test/{uuid-webhook}" method="post" %}
[webhook-openapi.yml](https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FaJms6riouLBXemyU98fk%2Fblurit-openapi.yml?alt=media\&token=3c227616-b07b-4c15-a6ee-17fec7e6e153)
{% endopenapi %}


# Samples

## CSharp

```csharp
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using System.ComponentModel.DataAnnotations;

namespace WIS_Webhook_Sample
{
    public class WisEvent
    {
        public required string TaskId { get; set; }
        public required string Status { get; set; }
    }

    public class WisEventWebhookResponse
    {
        public required string TaskId { get; set; }
    }
}


namespace WIS_Webhook_Sample.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class WisEventWebhookController : ControllerBase
    {

        [ProducesResponseType(typeof(WisEventWebhookResponse), StatusCodes.Status200OK)]
        [HttpPost(Name = "WisEventWebhook")]
        public IActionResult Post(WisEvent myEvent, [FromHeader(Name = "x-auth-token")][Required] string authToken)
        {
            // Check that the event comes from WIS by checking x-auth-token
            if (authToken != "YOUR TOKEN HERE")
            {
                return new UnauthorizedObjectResult(new { error = "Wrong x-auth-token" });
            }

            // you can do some processing there
            // (in our example, we print the task's id and the status in the console)
            Console.WriteLine(string.Format("Task {0} is now {1}.", myEvent.TaskId, myEvent.Status));
            // --

            // The route MUST return the event
            return this.Ok(new WisEventWebhookResponse { TaskId = myEvent.TaskId });
        }
    }
}
```

## NodeJS/Typescript

### WebhookHandler.ts

```typescript
import { Request, Response } from "express";

export class WebhookHandler {
  /**
   * @param token
   */
  constructor(private token: string) {}

  /**
   * Handle incoming request
   */
  public handle(req: Request, res: Response): void {
    const data = this.preflightCheck(req, res);

    if (data === false) {
      res.status(400).send();
    }

    this.run(data);
    res.status(200).send();
  }

  /**
   * Check the request is correctly formed
   */
  private preflightCheck(req: Request, res: Response): false | any {
    const method = req.method;
    const tokenHeader = req.headers["x-auth-token"];

    // Ignore token
    if (this.token !== tokenHeader) {
      this.log(`Invalid X-Auth-Token: ${tokenHeader}`, true);
      res.status(400).send(`Invalid X-Auth-Token: ${tokenHeader}`);

      return false;
    }

    // Ignore non POST requests
    if (method !== "POST") {
      this.log(`Invalid method: ${method}`, true);
      res.status(400).send(`Invalid method: ${method}`);

      return false;
    }

    const body = req.body;

    // Ignore invalid bodies
    if (!body) {
      this.log("Invalid request body", true);
      res.status(400).send("Invalid method");

      return false;
    }

    return body;
  }

  /**
   * Process the request
   */
  private run(data: any): void {
    // Log the request in the built-in server log
    // Here you should handle the request to do whatever you want to do
    this.log(`Received request - Task ID : ${data.taskId} - Status : ${data.status}`);
  }

  /**
   * Log a message
   */
  private log(message: string, isError: boolean = false): void {
    const output = `[${isError ? "ERROR" : "SUCCESS"}] ${message}`;

    if (isError) {
      console.log(output);
    } else {
      console.error(output);
    }
  }
}
```

### webhook\_endpoint.ts

```typescript
import * as dotenv from "dotenv";
import express, { Request, Response } from "express";
import { WebhookHandler } from "./WebhookHandler";
import bodyParser from "body-parser";

dotenv.config();

const handler = new WebhookHandler(process.env.BLURIT_WEBHOOK_TOKEN!);

const app = express();
app.use(bodyParser.json());
app.post("/", (req: Request, res: Response) => handler.handle(req, res));

const port = process.env.BLURIT_WEBHOOK_PORT || 8000;
app.listen(port, () => {
  console.log(`Server running on port ${port}`);
});
```


# Using a Webhook during development

If you run the webhook on you local development machine, it will probably not be accessible on the Internet.

We suggest using tunneling services such as [ngrok](https://ngrok.com/) or [localtunnel](https://github.com/localtunnel/localtunnel) to expose your webhook. You will then have to configure the tunnel URL in the Manager or with the API.

Example with localtunnel:

```bash
lt --port 8000 -s my-wis-webhook
your url is: https://my-wis-webhook.loca.lt
```

The URL you must configure in the manager is `https://my-wis-webhook.loca.lt`.

**Warning: you MUST visit `https://my-wis-webhook.loca.lt` at leat once in your browser before being able to use the tunnel. It's a security measure of localtunnel.**


# n8n Integration

This guide explains how to import and use the Blurit anonymization n8n workflow template to automatically blur faces and license plates in your media files.

## How to Import and Use <a href="#blurit-n8n-template---how-to-import-and-use" id="blurit-n8n-template---how-to-import-and-use"></a>

### Overview <a href="#overview" id="overview"></a>

The `n8n-blurit-create-task.json` template provides a complete n8n workflow that:

* Accepts media file uploads through a web form
* Authenticates with the BlurIt API
* Creates anonymization tasks with configurable blur settings
* Monitors task progress
* Downloads the processed result file

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* An n8n instance (cloud or self-hosted)
* A BlurIt account with API credentials
* Access to the BlurIt Developer section for API keys

### Step 1: Import the Template <a href="#step-1-import-the-template" id="step-1-import-the-template"></a>

{% file src="/files/IeNeNBLXopPgrRbHw8ur" %}

1. **Download the template file**

   * Download or copy the JSON content

2. **Import into n8n**

   * Open your n8n instance
   * Click the "+" button to create a new workflow
   * Click on the three dots menu (⋯) in the top right
   * Select "Import from file"&#x20;
   * Upload the `n8n-blurit-create-task.json` file

<div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FukaEfccIudpNaw11LvJx%2Fimage.png?alt=media&amp;token=8a069350-7d19-4dc0-a7c4-a965f367d41d" alt="" width="343"><figcaption><p>Import the json template in your n8n Project</p></figcaption></figure></div>

Once imported, the workflow should present this :

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2F0RagiOml56oeYIVWO2uU%2Fburit-n8n.png?alt=media&amp;token=c267bcff-24c8-4d54-9f8e-d3882e8833f5" alt=""><figcaption><p>Blurit Create Task Workflow</p></figcaption></figure>

### Step 2: Configure BlurIt Credentials <a href="#step-2-configure-blurit-credentials" id="step-2-configure-blurit-credentials"></a>

1. **Get your API credentials**

   * Log in to your BlurIt account
   * Navigate to [Blurit Developer](https://app.blurit.io/account/developer) section
   * Copy your `Client ID` and `Secret ID`

   <div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FqlqVkZ0PkftZ4ao11Q2S%2Fblurit-manager.jpg?alt=media&amp;token=e234f1a6-9ec8-494d-b9f8-f1934e069ead" alt="" width="563"><figcaption><p>Get your credentials from blurit app manager</p></figcaption></figure></div>

2. **Update the workflow configuration**

   * In the imported workflow, double-click the **"Set Auth Config"** node

   <div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FhDuZ2EQAOMTsQ4ncgxTp%2Fimage.png?alt=media&amp;token=a3c674f5-a64a-4c22-96b9-ba9469e265b5" alt=""><figcaption></figcaption></figure></div>

   * Replace the placeholder values:
     * `[REPLACE_BY_YOUR_CLIENT_ID]` → Your actual Client ID
     * `[REPLACE_BY_YOUR_SECRET_ID]` → Your actual Secret ID

   <div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2F3PGy48ldiMeRLU6eDzaN%2Fimage.png?alt=media&amp;token=e7a0e29a-54b1-43a1-bef3-184a91a24f6b" alt="" width="563"><figcaption><p>Set your personnal credentials</p></figcaption></figure></div>

   * The `BASE_URL` is pre-configured as `https://api.services.wassa.io`

### Step 3: Configure the Upload Form <a href="#step-3-configure-the-upload-form" id="step-3-configure-the-upload-form"></a>

The workflow includes a form trigger that generates upload URLs (this is a demo purpose, replace by your own media flow if needed) :

1. **Access form URLs**

   * Click link present in Sticky Note or Double-click the **"Upload Input File"** node

   <div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FmVdr8mnjVQ1ETQ0wnZRf%2Fimage.png?alt=media&amp;token=821208e3-c103-4692-bd2b-f6fe902f2fe6" alt=""><figcaption></figcaption></figure></div>

   * Note the webhook ID (used in the URLs)
   * The form will be available at:
     * **Test**: `https://[your-n8n-instance]/webhook-test/[webhook-id]/n8n-form`
     * **Production**: `https://[your-n8n-instance]/webhook/[webhook-id]/n8n-form`
2. **Form configuration**

   * Form title: "Media Upload Form"
   * Description: "Upload an image or video for anonymization"
   * Accepts: Single file upload (images and videos)

   <div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2Fh8oDiHM100jZdu0ddEmC%2Fimage.png?alt=media&amp;token=2acafdc3-52bd-44cb-91e3-311bc3cce570" alt=""><figcaption><p>n8n upload file form</p></figcaption></figure></div>

### Step 4: Customize Blur Settings (Optional) <a href="#step-4-customize-blur-settings-optional" id="step-4-customize-blur-settings-optional"></a>

The default configuration blurs both faces and license plates. To customize:

1. **Edit blur configuration**

   * Double-click the **"Create Blurit Task"** node

   <div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FvTO1RUttIC46D9taWxyt%2Fimage.png?alt=media&amp;token=d899ccd7-6602-4ad1-aab7-649fa8a45870" alt=""><figcaption></figcaption></figure></div>

   * Modify the body parameters:
     * `activation_plates_blur`: "true" or "false"
     * `activation_faces_blur`: "true" or "false"
     * `blur_type`: JSON configuration for blur settings
2. **Example blur\_type configurations**

   ```json
   // Standard blur
   {"anonymization_type": "blur"}

   // Pixelation
   {"anonymization_type": "pixelate", "num_pixels": 7}

   // Black boxes
   {"anonymization_type": "opaque", "hex_color": "#000000"}
   ```

### Step 5: Run the Workflow <a href="#step-5-run-the-workflow" id="step-5-run-the-workflow"></a>

1. **Execute the workflow**
   * Click **"⚡️ Execute Workflow"** button\
     ![](https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FW5VA0hgMcDd321pFq2Oo%2Fimage.png?alt=media\&token=8e09025d-757e-4eda-82dd-a63dbcf08999)
   * The workflow will start and wait for file upload
2. **Upload your media file**
   * Use one of the form URLs from the sticky note instructions
   * Upload an image or video file
   * Return to the n8n console (refresh if needed)
3. **Monitor progress**

   <div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FeUD6xPIu4vkp0jNwMF3b%2Fimage.png?alt=media&amp;token=a25bf9e8-4442-42ec-856c-fdd173cfda70" alt=""><figcaption></figcaption></figure></div>

   * The workflow will automatically:
     * Authenticate with BlurIt API
     * Create the anonymization task
     * Wait for processing (2-second intervals)
     * Check task status
     * Download the result when completed

### Step 6: Get Your Results <a href="#step-6-get-your-results" id="step-6-get-your-results"></a>

1. **Successful completion**

   * When the task succeeds, the **"Get Result File"** node will execute

   <div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2Fj4qHNEzk2yVb3RFLdJwq%2Fimage.png?alt=media&amp;token=67713fb2-7797-4446-a71b-e969e1540543" alt=""><figcaption></figcaption></figure></div>

   * The processed file will be available in the node's output data

   <div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FqajaFTU1mES2W3C0vuW0%2Fimage.png?alt=media&amp;token=07262eca-7095-4927-9202-f6bc9d9fe0c7" alt="" width="512"><figcaption></figcaption></figure></div>

   * Click **"View"** or **"Download"** in the output section

   <div align="left"><figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2F1bQVNWSayCbpYrioFh5b%2Fimage.png?alt=media&amp;token=34a903a8-aa19-4dba-adb7-bdc3f4b80c79" alt="" width="554"><figcaption></figcaption></figure></div>

2. **Handle different outcomes**
   * **Task Succeeded**: Result file is downloaded
   * **Task Failed**: Check error messages in the workflow execution
   * **Pending**: Workflow continues to wait and retry

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

#### Common Issues <a href="#common-issues" id="common-issues"></a>

1. **Authentication Errors**
   * Verify your Client ID and Secret ID are correct
   * Check that credentials are properly configured in "Set Auth Config"
2. **File Upload Issues**
   * Ensure the webhook URLs are accessible
   * Check file size limits (varies by n8n instance)
   * Verify supported file formats (images: JPG, PNG; videos: MP4, AVI, etc.)
3. **Task Processing Failures**
   * Check the BlurIt API status
   * Verify your account has sufficient credits
   * Review error messages in the workflow execution log
4. **Timeout Issues**
   * Large files may take longer to process
   * Consider increasing the wait time in the "Wait" node
   * Check your n8n execution timeout settings

#### Debug Tips <a href="#debug-tips" id="debug-tips"></a>

1. **Check node outputs**
   * Click on any node to see its input/output data
   * Use the "View" option to inspect JSON responses
2. **Monitor API responses**
   * Check the "Auth Get Token" output for authentication success
   * Review "Create Blurit Task" response for task creation
   * Monitor "Get Task Status" for processing updates
3. **Test with small files first**
   * Start with small image files for initial testing
   * Gradually test with larger files and videos

### API Endpoints Used <a href="#api-endpoints-used" id="api-endpoints-used"></a>

* **Authentication**: `POST /login`
* **Create Task**: `POST /innovation-service/anonymization`
* **Check Status**: `GET /innovation-service/anonymization?anonymization_job_id={id}`
* **Download Result**: `GET /innovation-service/anonymization/{output_filename}`

### Security Considerations <a href="#security-considerations" id="security-considerations"></a>

* Store API credentials securely in n8n
* Use environment variables for sensitive data in production
* Regularly rotate your API keys
* Monitor API usage from Blurit dashboard

### Support <a href="#support" id="support"></a>

For additional help:

* Blurit API Documentation: [Developer Portal](https://doc-api.blurit.io/)
* n8n Documentation: [n8n.io/docs](https://docs.n8n.io/)
* Blurit Support: Contact through your Blurit account

***

*This template provides a complete automation solution for media anonymization using the Blurit API within n8n workflows.*


# Getting started

### Overview

The BlurIt Anonymization API allows clients to use the BlurIt Anonymization platform to blur faces and licence plates in images and videos.

### Principles

The BlurIt Anonymization API contains predictable resource-oriented URLs, that accept JSON request bodies and returns JSON responses. It uses standard HTTP responses codes (200, 404, etc.) and verbs (GET, POST, etc.) as well as an HTTP header for authentication.

## How it works ?

### Authentication with API KEY

Authentication is made with a long-lived API key. There is no login endpoint and no token exchange.

Generate your API key in the BlurIt Manager under Developers → API Key. The key starts with `blrt_` and is shown once at creation — store it securely (for example in an environment variable or a secrets manager).

A newly created account has no API key until you generate one. Regenerating the key invalidates the previous one immediately.

### Call the routes

Once you have an API key, you can use the API. All routes require the key to be sent in the `Authorization` HTTP header as a Bearer token:

```
Authorization: Bearer blrt_xxxxxxxx
```

where `blrt_xxxxxxxx` is the API key you created in the BlurIt Manager.

Example:

```
curl -s https://api.blurit.io/api/v2/account \
  -H "Authorization: Bearer $BLURIT_API_KEY"
```

#### No refresh token

Unlike API v1, there is no access token expiry and no refresh flow. The API key remains valid until you revoke or regenerate it in the BlurIt Manager.

⚠ Important: Never embed the API key in front-end, mobile, or browser code. It grants server-level access to anonymize files and consume credits. Use it only from your backend.

#### Next steps<br>

1. Call `GET /api/v2/account` to verify your key and inspect supported formats, balance, and rate limits.
2. Create a job with `POST /api/v2/jobs/sync` (small images) or `POST /api/v2/jobs` (video, ZIP, or larger files).
3. When the job status is `succeeded`, download the result with `GET /api/v2/jobs/{id}/result`.

Machine-readable reference: `GET /api/v2/openapi.json` (interactive docs at `/api/v2/docs`).


# Requirements

Go from sign-up to your first deploy in under five minutes.

### Create a Blurit account <a href="#create-a-blurit-account" id="create-a-blurit-account"></a>

To be able to use the Blurit API, you must subscribe and create your account on the Blurit platform services.

#### Subscribe <a href="#subscribe" id="subscribe"></a>

Please subscribe at <https://blurit.io/en/pricing>, select the starter pack

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2F17BwxYl6ZvMnGuDvoMJO%2Fimage.png?alt=media&amp;token=73e95c94-d44c-4f9b-8d1e-6991bc87edc8" alt=""><figcaption></figcaption></figure>

#### Complete your informations <a href="#complete-your-informations" id="complete-your-informations"></a>

Signup with Gogle or create a standart account<br>

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2Fu4n4ltwXhUz7Mz923LbO%2Fimage.png?alt=media&amp;token=8f45fba7-abc4-4a4b-8ee0-b4ba880d9bf3" alt=""><figcaption></figcaption></figure>

#### Check your email and set your password <a href="#check-your-email-and-set-your-password" id="check-your-email-and-set-your-password"></a>

Check your mailbox if you have received the email "**Welcome to Blurit! Confirm your email to get started**" from *<no_reply@blurit.io>.* Click on "**Confirm my email**" to access the page to enter your password.​&#x20;

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2Fz3IMxIlbLrTZmVr734nb%2Fimage.png?alt=media&amp;token=5539324f-1d7b-4d19-905d-08ef7faab2df" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FAvbxdPU0ZMLLjMiJLgWW%2Fimage.png?alt=media&amp;token=16da3725-f214-407b-8a20-ce76c64ac1be" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can now log in to BlurIt Studio whenever you want with your email address and password at [app.blurit.io ](https://app.blurit.io/login)or by clicking on the Login button on the [blurit.io](https://blurit.io/) home page.
{% endhint %}

### Access to your API KEY <a href="#access-to-your-api-key" id="access-to-your-api-key"></a>

You can now access to your **api key** in the Account / Developer section. Click on "**Generate API key**"

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2F226bgau73hMfnBPDRrTu%2Fimage.png?alt=media&amp;token=066d745a-b6b0-474c-a3b0-2446d81f8e4e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4132544247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8lhgtK7MaVTEBLYlu3j%2Fuploads%2FMDD16XNsej1brnfDKJX9%2Fimage.png?alt=media&amp;token=2366ae88-3975-4138-b039-ceb17f387278" alt=""><figcaption></figcaption></figure>


# Using the API v2

### Workflow

Anonymization can take from a few seconds (small images) to much longer (large videos or ZIP batches). The API therefore exposes two ways to create a job, and two ways to learn when it is done.

#### Sync vs async creation<br>

| <p><br>Synchronous</p> | Asynchronous                                             |                                                    |
| ---------------------- | -------------------------------------------------------- | -------------------------------------------------- |
| Endpoint               | `POST /api/v2/jobs/sync`                                 | `POST /api/v2/jobs`                                |
| Accepts                | Images only, up to 20 MB                                 | Image, video, or ZIP (normal size limits)          |
| HTTP response          | `200 OK` with the finished job (`succeeded` or `failed`) | `202 Accepted` with a queued job                   |
| Typical use            | Small photos, interactive flows                          | Videos, ZIP batches, large images, fire-and-forget |

Under the hood, processing is always asynchronous. The sync endpoint only waits for completion (up to about 30 seconds) so your client can treat a small image as a single request/response. If the image is accepted but does not finish in time, you get `502 EXTERNAL_SERVICE_ERROR` with a `jobId` in `details` — then poll `GET /api/v2/jobs/{id}` like an async job.

Video, ZIP, and images larger than 20 MB must use `POST /api/v2/jobs`. The sync endpoint rejects them with an actionable error pointing you to the async route.

#### How to follow job progress

Once a job exists, you can monitor it in two ways:

* Pull mode — periodically call `GET /api/v2/jobs/{id}` until `status` is `succeeded` or `failed`. While the job is still running, the response includes `retryAfter` (seconds), also mirrored as the `Retry-After` header — wait that long before polling again.
* Push mode — we notify your server of status changes via a webhook you configure in the BlurIt Manager.

Pull and push are alternatives. Neither is mandatory if you only use `POST /api/v2/jobs/sync` and the call returns a terminal job immediately.

Job statuses: `queued` → `processing` → `succeeded` or `failed`.

***

### Synchronous workflow (small images)

1. Create and wait — `POST /api/v2/jobs/sync` with the image as `multipart/form-data` (`file` field). The response body is the finished job in `data`.
2. Download — when `data.status` is `succeeded`, call `GET /api/v2/jobs/{id}/result` using `data.id`. The JSON never embeds download URLs; build the path from the job id.

```mermaid
%%{init: {
  "sequence": {
    "useMaxWidth": false,
    "actorMargin": 150,
    "width": 100,
    "messageMargin": 50,
    "noteMargin": 20,
    "mirrorActors": false
  }
}}%%


sequenceDiagram
    participant C as Your backend
    participant API as BlurIt API v2

    C->>API: POST /api/v2/jobs/sync (file + options)
    API->>API: Process image (≤ ~30s)
    API-->>C: 200 OK — data.id, status = succeeded
    C->>API: GET /api/v2/jobs/{id}/result
    API-->>C: 200 OK (anonymized file bytes)

```

### Pull mode workflow (async)

#### 1. Create a job

Send a `POST` request to `/api/v2/jobs` with the media as `multipart/form-data`. The API returns `202 Accepted` and a unique job id in `data.id`.

#### 2. Check job status

Call `GET /api/v2/jobs/{id}` and read `data.status`. If the status is `queued` or `processing`, wait `data.retryAfter` seconds (or the `Retry-After` header), then call again.

This step is optional if you rely on webhooks for status updates.

#### 3. Download the processed media

When `data.status` is `succeeded`, download with:

```
GET /api/v2/jobs/{id}/result
```

Optionally, if you created the job with `generateJsonDetections=true`:

```
GET /api/v2/jobs/{id}/detections
```

⚠ Important

* In pull mode, step 2 must be repeated until the job is terminal (`succeeded` or `failed`) — even when you only care about failures.
* Do not call `/result` before `succeeded` (you would get `409 JOB_NOT_READY`).
* Results are kept for a limited retention window (default 7 days). After that, downloads return `410 FILE_PURGED`. Download as soon as the job succeeds if you need the file.

```mermaid
%%{init: {
  "sequence": {
    "useMaxWidth": false,
    "actorMargin": 100,
    "width": 220,
    "messageMargin": 50,
    "noteMargin": 20,
    "mirrorActors": false
  }
}}%%
sequenceDiagram
    participant C as Your backend
    participant API as BlurIt API v2

    C->>API: POST /api/v2/jobs<br/>(file + options)
    API-->>C: 202 Accepted<br/>data.id, status = queued, retryAfter
    loop Until succeeded or failed
        Note over C: Wait retryAfter seconds
        C->>API: GET /api/v2/jobs/{id}
        API-->>C: data.status (+ retryAfter if still running)
    end
    C->>API: GET /api/v2/jobs/{id}/result
    API-->>C: 200 OK (anonymized file bytes)

```

### Push mode workflow

Configure a single webhook URL in the BlurIt Manager → Developers → Webhook. When a job status changes, we `POST` an event to your endpoint (including a `Blurit-Webhook-Token` header you must verify).

Typical flow:

1. Create the job with `POST /api/v2/jobs` (same as pull mode).
2. Wait for a `job.succeeded` or `job.failed` event on your webhook.
3. Download with `GET /api/v2/jobs/{id}/result` using the job id from the event payload.

For payload shape, retries, and security, see the Webhook section.

```mermaid
sequenceDiagram
    participant C as Your backend
    participant API as BlurIt API v2
    participant WH as Your webhook

    C->>API: POST /api/v2/jobs
    API-->>C: 202 Accepted (data.id)
    API->>WH: job.queued / job.processing
    API->>WH: job.succeeded (full Job in data)
    WH-->>API: 2xx
    C->>API: GET /api/v2/jobs/{id}/result
    API-->>C: 200 OK (anonymized file bytes)
```

### Supported file formats

The formats available to your account are returned by `GET /api/v2/account` in `data.supportedFormats` (they can vary by plan — e.g. a trial may be image-only). Typically:

Images

* JPEG / JPG
* PNG
* WEBP
* BMP
* TIFF
* GIF
* HEIC / HEIF

Videos

* MP4
* MOV
* MKV
* AVI
* M4V

Archives

* ZIP containing supported image or video files

For the authoritative MIME list for your key, always prefer `GET /api/v2/account`.

### Limitations

* Sync endpoint (`POST /api/v2/jobs/sync`): images only, maximum 20 MB, waits up to \~30 seconds.
* Async endpoint (`POST /api/v2/jobs`): file size must not exceed 8 GB. For ZIP files, the 8 GB limit applies to the archive itself (including all files inside).
* Source and result files are retained for a limited period (default 7 days after completion), then purged automatically.
* Job creation is rate-limited per API key (`X-RateLimit-*` headers; see `GET /api/v2/account` → `rateLimit`).


# Api Documentation

Everything you need to know to integrate Blurit API Calls


# Authentication

There is no login endpoint. Create an API key in the BlurIt app (it starts with blrt\_) and send it on every call:

Authorization: Bearer blrt\_...


# Workflow

1. Create a job.
   * POST /api/v2/jobs/sync for one image of at most 20 MB. The response is the finished job (200) when processing completes within 30 seconds.
   * POST /api/v2/jobs for a video, a ZIP, or any file that must not block the caller. The response is 202 and the job is queued.
2. If status is queued or processing, wait the number of seconds in retryAfter (also sent as the Retry-After header), then GET /api/v2/jobs/{id}. Repeat that poll until status is succeeded or failed. Do not download before that. retryAfter is absent once the job is terminal.
3. When status is succeeded, download using the job id (responses never embed URLs or paths):
   * GET /api/v2/jobs/{id}/result for the anonymized image, video, or ZIP.
   * GET /api/v2/jobs/{id}/detections only if generateJsonDetections was true. When status is failed, read error.code and error.message. There is no file to download.

A sync call that accepts the image but does not finish within 30 seconds returns 502 EXTERNAL\_SERVICE\_ERROR. The job still exists: poll GET /api/v2/jobs/{id} with the id from the error details.

Call GET /api/v2/account first if you need the accepted media types, the credit balance, or the jobs-per-minute limit.


# Successful JSON

JSON success bodies are wrapped. Read the resource in data:

{ "data": { "id": "job\_01J7X8Q1ZK4S2VBTQABCDE", "status": "queued", "retryAfter": 5 }, "timestamp": "2026-09-25T08:14:00.000Z", "path": "/api/v2/jobs", "requestId": "8f3c1c2e-4b1a-4e2d-9c0a-1b2c3d4e5f60" }

File downloads are not wrapped. They are the raw bytes, with Content-Type and Content-Disposition.


# Errors

Error bodies are not wrapped:

{ "statusCode": 400, "code": "VALIDATION\_ERROR", "message": "Validation failed", "retryable": false, "timestamp": "2026-09-25T08:14:00.000Z", "path": "/api/v2/jobs", "method": "POST", "details": \[{ "field": "style", "message": "Invalid input", "code": "invalid\_union" }] }

retryable true means the same request can be sent again later (429, 5xx, or 409 JOB\_NOT\_READY). retryable false means the request must change.

Every authenticated response also sends X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (unix seconds). A 429 adds Retry-After.


# Multipart fields

POST /api/v2/jobs and POST /api/v2/jobs/sync use multipart/form-data. Booleans are the text true or false. style, regionOfInterest, and metadata are JSON serialized as a single string field.

file = photo.jpg faces = true plates = true style = {"type":"blur","intensity":1} regionOfInterest = {"top":0,"left":0,"right":1,"bottom":1} keepAudio = false generateJsonDetections = false metadata = {"orderId":"42"}

style is one of:

* {"type":"blur","intensity":1} with intensity an integer from 1 to 10 (default 1)
* {"type":"pixelate","pixels":7} with pixels an integer from 2 to 10 (default 7)
* {"type":"opaque","color":"#000000"} with color matching #RRGGBB (default #000000)

regionOfInterest uses top, left, right, bottom, each a number from 0 to 1. Omit it to process the whole frame.

At least one of faces or plates must be true.


# Blur It API V2 Jobs

## Anonymize a small image synchronously

> One image of at most 20 MB. Waits up to 30 seconds and returns the finished job in data. Video, ZIP, and larger images must use POST /api/v2/jobs. If this returns 502, the job was accepted: poll GET /api/v2/jobs/{id}.

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"servers":[{"url":"https://api.v2.services.wassa-dev.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API key","type":"http","description":"Long-lived API key created in the BlurIt app. There is no token exchange. Send Authorization: Bearer blrt_..."}},"schemas":{"ApiV2JobEnvelopeDto":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string","description":"Request path, including the query string when present."},"requestId":{"type":"string","description":"Present when the server assigned a request id."},"data":{"$ref":"#/components/schemas/ApiV2JobDto"}},"required":["timestamp","path","data"]},"ApiV2JobDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["image","video","batch"]},"status":{"type":"string","enum":["queued","processing","succeeded","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"retryAfter":{"type":"number","description":"Seconds to wait before polling again. Absent once the job is terminal."},"input":{"$ref":"#/components/schemas/ApiV2JobInputDto"},"options":{"$ref":"#/components/schemas/ApiV2JobOptionsDto"},"result":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobResultDto"}]},"error":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobErrorDto"}]},"billing":{"$ref":"#/components/schemas/ApiV2JobBillingDto"},"metadata":{"nullable":true,"description":"Caller-supplied JSON echoed back verbatim. Any JSON value: object, array, string, number, boolean, or null.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{}},{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["id","type","status","createdAt","updatedAt","input","options","billing"]},"ApiV2JobInputDto":{"type":"object","properties":{"filename":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"}},"required":["filename","sizeBytes","contentType"]},"ApiV2JobOptionsDto":{"type":"object","properties":{"faces":{"type":"boolean"},"plates":{"type":"boolean"},"style":{"$ref":"#/components/schemas/ApiV2JobStyleDto"},"regionOfInterest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2RegionDto"}]},"keepAudio":{"type":"boolean"},"generateJsonDetections":{"type":"boolean","description":"When true, GET /api/v2/jobs/{id}/detections is available after success."}},"required":["faces","plates","style","keepAudio","generateJsonDetections"]},"ApiV2JobStyleDto":{"type":"object","properties":{"type":{"type":"string","enum":["blur","pixelate","opaque"]},"intensity":{"type":"number","minimum":1,"maximum":10,"description":"Present when type is blur."},"pixels":{"type":"number","minimum":2,"maximum":10,"description":"Present when type is pixelate."},"color":{"type":"string","description":"Present when type is opaque. #RRGGBB."}},"required":["type"]},"ApiV2RegionDto":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."},"left":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"right":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"bottom":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."}},"required":["top","left","right","bottom"]},"ApiV2JobResultDto":{"type":"object","properties":{"retainedUntil":{"type":"string","format":"date-time","description":"When the result (and detections, if any) will be purged. Present only when status is succeeded. Download via GET /api/v2/jobs/{id}/result using this job's id — the JSON never embeds URLs or paths."}},"required":["retainedUntil"]},"ApiV2JobErrorDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"ApiV2JobBillingDto":{"type":"object","properties":{"method":{"type":"string","enum":["credits","usage","trial"]},"creditsCharged":{"type":"number"}},"required":["method"]},"ApiV2ErrorDto":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string","description":"Stable machine code. Common values: AUTH_ERROR, VALIDATION_ERROR, NO_FILE, NO_ANONYMIZATION_TARGET, UNSUPPORTED_FILE_FORMAT, FILE_TOO_LARGE, INSUFFICIENT_CREDITS, PAYMENT_METHOD_EXPIRED, PAYMENT_METHOD_MISSING, TRIAL_LIMIT_EXCEEDED, SERVICE_NOT_SUBSCRIBED, RATE_LIMITED, JOB_NOT_FOUND, JOB_NOT_READY, FILE_PURGED, EXTERNAL_SERVICE_ERROR."},"message":{"type":"string"},"retryable":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"details":{"description":"Either a list of validation issues, or an object whose keys depend on code. Object examples: { jobId } on the sync timeout, { status } on JOB_NOT_READY, { creditsRequired, creditsAvailable } on INSUFFICIENT_CREDITS, { maxSizeBytes } on FILE_TOO_LARGE, { supportedFormats } on UNSUPPORTED_FILE_FORMAT, { detectionsRequested } when detections were not requested, { limitBytes, usedBytes } on TRIAL_LIMIT_EXCEEDED. Absent when there is nothing to add.","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ApiV2ValidationIssueDto"}},{"type":"object","additionalProperties":true}]}},"required":["statusCode","code","message","retryable","timestamp","path","method"]},"ApiV2ValidationIssueDto":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["field","message","code"]}}},"paths":{"/api/v2/jobs/sync":{"post":{"operationId":"ApiV2JobsController_createSync","summary":"Anonymize a small image synchronously","description":"One image of at most 20 MB. Waits up to 30 seconds and returns the finished job in data. Video, ZIP, and larger images must use POST /api/v2/jobs. If this returns 502, the job was accepted: poll GET /api/v2/jobs/{id}.","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"One image, at most 20 MB. Video and ZIP are rejected. The part name must be file."},"faces":{"type":"string","enum":["true","false"],"default":"true","description":"Text boolean. Default true. Blur faces."},"plates":{"type":"string","enum":["true","false"],"default":"true","description":"Text boolean. Default true. Blur license plates."},"style":{"type":"string","description":"JSON object serialized as text. {\"type\":\"blur\",\"intensity\":1} (intensity 1-10), {\"type\":\"pixelate\",\"pixels\":7} (pixels 2-10), or {\"type\":\"opaque\",\"color\":\"#000000\"}."},"regionOfInterest":{"type":"string","description":"JSON object {\"top\",\"left\",\"right\",\"bottom\"} with each value from 0 to 1, or omit the field. Sent as text."},"keepAudio":{"type":"string","enum":["true","false"],"default":"false","description":"Text boolean. Default false. Applies to video."},"generateJsonDetections":{"type":"string","enum":["true","false"],"default":"false","description":"Text boolean. Default false. When true, GET /jobs/{id}/detections is available after success."},"metadata":{"type":"string","description":"Any JSON value, serialized as text. Echoed back on the job as parsed JSON."}}}}}},"responses":{"200":{"description":"Finished job. Read it from data. status is succeeded or failed.","headers":{"X-RateLimit-Limit":{"description":"Jobs allowed per minute for this API key.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Jobs still allowed in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2JobEnvelopeDto"}}}},"400":{"description":"Missing file, invalid style, or neither faces nor plates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"401":{"description":"Missing or unknown API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"402":{"description":"Not enough credits, or the payment method is missing or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"403":{"description":"Trial limit reached, or the anonymization service is not enabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"413":{"description":"Image larger than 20 MB. Use POST /api/v2/jobs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"415":{"description":"Not an image, or a media type this account does not accept. details.supportedFormats lists the accepted types.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"429":{"description":"Too many jobs in the current minute. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"502":{"description":"The image was accepted but did not finish within 30 seconds. Poll GET /api/v2/jobs/{id} using details.jobId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}}},"tags":["BlurIt API v2 - Jobs"]}}}}
```

## List jobs

> All jobs for the account, including those created from the Manager or API v1. Ordered by createdAt descending. Page starts at 1, pageSize defaults to 20 and cannot exceed 100.

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"servers":[{"url":"https://api.v2.services.wassa-dev.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API key","type":"http","description":"Long-lived API key created in the BlurIt app. There is no token exchange. Send Authorization: Bearer blrt_..."}},"schemas":{"ApiV2JobListEnvelopeDto":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string","description":"Request path, including the query string when present."},"requestId":{"type":"string","description":"Present when the server assigned a request id."},"data":{"$ref":"#/components/schemas/ApiV2JobListDto"}},"required":["timestamp","path","data"]},"ApiV2JobListDto":{"type":"object","properties":{"elements":{"type":"array","items":{"$ref":"#/components/schemas/ApiV2JobDto"}},"meta":{"$ref":"#/components/schemas/ApiV2PaginationMetaDto"}},"required":["elements","meta"]},"ApiV2JobDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["image","video","batch"]},"status":{"type":"string","enum":["queued","processing","succeeded","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"retryAfter":{"type":"number","description":"Seconds to wait before polling again. Absent once the job is terminal."},"input":{"$ref":"#/components/schemas/ApiV2JobInputDto"},"options":{"$ref":"#/components/schemas/ApiV2JobOptionsDto"},"result":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobResultDto"}]},"error":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobErrorDto"}]},"billing":{"$ref":"#/components/schemas/ApiV2JobBillingDto"},"metadata":{"nullable":true,"description":"Caller-supplied JSON echoed back verbatim. Any JSON value: object, array, string, number, boolean, or null.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{}},{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["id","type","status","createdAt","updatedAt","input","options","billing"]},"ApiV2JobInputDto":{"type":"object","properties":{"filename":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"}},"required":["filename","sizeBytes","contentType"]},"ApiV2JobOptionsDto":{"type":"object","properties":{"faces":{"type":"boolean"},"plates":{"type":"boolean"},"style":{"$ref":"#/components/schemas/ApiV2JobStyleDto"},"regionOfInterest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2RegionDto"}]},"keepAudio":{"type":"boolean"},"generateJsonDetections":{"type":"boolean","description":"When true, GET /api/v2/jobs/{id}/detections is available after success."}},"required":["faces","plates","style","keepAudio","generateJsonDetections"]},"ApiV2JobStyleDto":{"type":"object","properties":{"type":{"type":"string","enum":["blur","pixelate","opaque"]},"intensity":{"type":"number","minimum":1,"maximum":10,"description":"Present when type is blur."},"pixels":{"type":"number","minimum":2,"maximum":10,"description":"Present when type is pixelate."},"color":{"type":"string","description":"Present when type is opaque. #RRGGBB."}},"required":["type"]},"ApiV2RegionDto":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."},"left":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"right":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"bottom":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."}},"required":["top","left","right","bottom"]},"ApiV2JobResultDto":{"type":"object","properties":{"retainedUntil":{"type":"string","format":"date-time","description":"When the result (and detections, if any) will be purged. Present only when status is succeeded. Download via GET /api/v2/jobs/{id}/result using this job's id — the JSON never embeds URLs or paths."}},"required":["retainedUntil"]},"ApiV2JobErrorDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"ApiV2JobBillingDto":{"type":"object","properties":{"method":{"type":"string","enum":["credits","usage","trial"]},"creditsCharged":{"type":"number"}},"required":["method"]},"ApiV2PaginationMetaDto":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","pageSize","total","totalPages"]},"ApiV2ErrorDto":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string","description":"Stable machine code. Common values: AUTH_ERROR, VALIDATION_ERROR, NO_FILE, NO_ANONYMIZATION_TARGET, UNSUPPORTED_FILE_FORMAT, FILE_TOO_LARGE, INSUFFICIENT_CREDITS, PAYMENT_METHOD_EXPIRED, PAYMENT_METHOD_MISSING, TRIAL_LIMIT_EXCEEDED, SERVICE_NOT_SUBSCRIBED, RATE_LIMITED, JOB_NOT_FOUND, JOB_NOT_READY, FILE_PURGED, EXTERNAL_SERVICE_ERROR."},"message":{"type":"string"},"retryable":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"details":{"description":"Either a list of validation issues, or an object whose keys depend on code. Object examples: { jobId } on the sync timeout, { status } on JOB_NOT_READY, { creditsRequired, creditsAvailable } on INSUFFICIENT_CREDITS, { maxSizeBytes } on FILE_TOO_LARGE, { supportedFormats } on UNSUPPORTED_FILE_FORMAT, { detectionsRequested } when detections were not requested, { limitBytes, usedBytes } on TRIAL_LIMIT_EXCEEDED. Absent when there is nothing to add.","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ApiV2ValidationIssueDto"}},{"type":"object","additionalProperties":true}]}},"required":["statusCode","code","message","retryable","timestamp","path","method"]},"ApiV2ValidationIssueDto":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["field","message","code"]}}},"paths":{"/api/v2/jobs":{"get":{"operationId":"ApiV2JobsController_list","summary":"List jobs","description":"All jobs for the account, including those created from the Manager or API v1. Ordered by createdAt descending. Page starts at 1, pageSize defaults to 20 and cannot exceed 100.","parameters":[{"name":"status","required":false,"in":"query","schema":{"enum":["queued","processing","succeeded","failed"],"type":"string"}},{"name":"type","required":false,"in":"query","schema":{"enum":["image","video","batch"],"type":"string"}},{"name":"createdAfter","required":false,"in":"query","description":"ISO-8601 date-time. Inclusive lower bound on createdAt.","schema":{"type":"string","format":"date-time"}},{"name":"createdBefore","required":false,"in":"query","description":"ISO-8601 date-time. Inclusive upper bound on createdAt.","schema":{"type":"string","format":"date-time"}},{"name":"page","required":false,"in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Page of jobs inside data.elements, with data.meta.","headers":{"X-RateLimit-Limit":{"description":"Jobs allowed per minute for this API key.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Jobs still allowed in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2JobListEnvelopeDto"}}}},"401":{"description":"Missing or unknown API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"429":{"description":"Too many jobs in the current minute. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}}},"tags":["BlurIt API v2 - Jobs"]}}}}
```

## Create an anonymization job

> Returns 202 with the queued job in data. Use data.id to poll GET /api/v2/jobs/{id}: wait retryAfter seconds (and the Retry-After header) while status is queued or processing. Stop when status is succeeded or failed. Download only after succeeded via GET /api/v2/jobs/{id}/result — responses never embed URLs or paths.

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"servers":[{"url":"https://api.v2.services.wassa-dev.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API key","type":"http","description":"Long-lived API key created in the BlurIt app. There is no token exchange. Send Authorization: Bearer blrt_..."}},"schemas":{"ApiV2JobEnvelopeDto":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string","description":"Request path, including the query string when present."},"requestId":{"type":"string","description":"Present when the server assigned a request id."},"data":{"$ref":"#/components/schemas/ApiV2JobDto"}},"required":["timestamp","path","data"]},"ApiV2JobDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["image","video","batch"]},"status":{"type":"string","enum":["queued","processing","succeeded","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"retryAfter":{"type":"number","description":"Seconds to wait before polling again. Absent once the job is terminal."},"input":{"$ref":"#/components/schemas/ApiV2JobInputDto"},"options":{"$ref":"#/components/schemas/ApiV2JobOptionsDto"},"result":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobResultDto"}]},"error":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobErrorDto"}]},"billing":{"$ref":"#/components/schemas/ApiV2JobBillingDto"},"metadata":{"nullable":true,"description":"Caller-supplied JSON echoed back verbatim. Any JSON value: object, array, string, number, boolean, or null.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{}},{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["id","type","status","createdAt","updatedAt","input","options","billing"]},"ApiV2JobInputDto":{"type":"object","properties":{"filename":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"}},"required":["filename","sizeBytes","contentType"]},"ApiV2JobOptionsDto":{"type":"object","properties":{"faces":{"type":"boolean"},"plates":{"type":"boolean"},"style":{"$ref":"#/components/schemas/ApiV2JobStyleDto"},"regionOfInterest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2RegionDto"}]},"keepAudio":{"type":"boolean"},"generateJsonDetections":{"type":"boolean","description":"When true, GET /api/v2/jobs/{id}/detections is available after success."}},"required":["faces","plates","style","keepAudio","generateJsonDetections"]},"ApiV2JobStyleDto":{"type":"object","properties":{"type":{"type":"string","enum":["blur","pixelate","opaque"]},"intensity":{"type":"number","minimum":1,"maximum":10,"description":"Present when type is blur."},"pixels":{"type":"number","minimum":2,"maximum":10,"description":"Present when type is pixelate."},"color":{"type":"string","description":"Present when type is opaque. #RRGGBB."}},"required":["type"]},"ApiV2RegionDto":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."},"left":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"right":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"bottom":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."}},"required":["top","left","right","bottom"]},"ApiV2JobResultDto":{"type":"object","properties":{"retainedUntil":{"type":"string","format":"date-time","description":"When the result (and detections, if any) will be purged. Present only when status is succeeded. Download via GET /api/v2/jobs/{id}/result using this job's id — the JSON never embeds URLs or paths."}},"required":["retainedUntil"]},"ApiV2JobErrorDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"ApiV2JobBillingDto":{"type":"object","properties":{"method":{"type":"string","enum":["credits","usage","trial"]},"creditsCharged":{"type":"number"}},"required":["method"]},"ApiV2ErrorDto":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string","description":"Stable machine code. Common values: AUTH_ERROR, VALIDATION_ERROR, NO_FILE, NO_ANONYMIZATION_TARGET, UNSUPPORTED_FILE_FORMAT, FILE_TOO_LARGE, INSUFFICIENT_CREDITS, PAYMENT_METHOD_EXPIRED, PAYMENT_METHOD_MISSING, TRIAL_LIMIT_EXCEEDED, SERVICE_NOT_SUBSCRIBED, RATE_LIMITED, JOB_NOT_FOUND, JOB_NOT_READY, FILE_PURGED, EXTERNAL_SERVICE_ERROR."},"message":{"type":"string"},"retryable":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"details":{"description":"Either a list of validation issues, or an object whose keys depend on code. Object examples: { jobId } on the sync timeout, { status } on JOB_NOT_READY, { creditsRequired, creditsAvailable } on INSUFFICIENT_CREDITS, { maxSizeBytes } on FILE_TOO_LARGE, { supportedFormats } on UNSUPPORTED_FILE_FORMAT, { detectionsRequested } when detections were not requested, { limitBytes, usedBytes } on TRIAL_LIMIT_EXCEEDED. Absent when there is nothing to add.","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ApiV2ValidationIssueDto"}},{"type":"object","additionalProperties":true}]}},"required":["statusCode","code","message","retryable","timestamp","path","method"]},"ApiV2ValidationIssueDto":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["field","message","code"]}}},"paths":{"/api/v2/jobs":{"post":{"operationId":"ApiV2JobsController_create","summary":"Create an anonymization job","description":"Returns 202 with the queued job in data. Use data.id to poll GET /api/v2/jobs/{id}: wait retryAfter seconds (and the Retry-After header) while status is queued or processing. Stop when status is succeeded or failed. Download only after succeeded via GET /api/v2/jobs/{id}/result — responses never embed URLs or paths.","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Image, video, or ZIP. The part name must be file."},"faces":{"type":"string","enum":["true","false"],"default":"true","description":"Text boolean. Default true. Blur faces."},"plates":{"type":"string","enum":["true","false"],"default":"true","description":"Text boolean. Default true. Blur license plates."},"style":{"type":"string","description":"JSON object serialized as text. {\"type\":\"blur\",\"intensity\":1} (intensity 1-10), {\"type\":\"pixelate\",\"pixels\":7} (pixels 2-10), or {\"type\":\"opaque\",\"color\":\"#000000\"}."},"regionOfInterest":{"type":"string","description":"JSON object {\"top\",\"left\",\"right\",\"bottom\"} with each value from 0 to 1, or omit the field. Sent as text."},"keepAudio":{"type":"string","enum":["true","false"],"default":"false","description":"Text boolean. Default false. Applies to video."},"generateJsonDetections":{"type":"string","enum":["true","false"],"default":"false","description":"Text boolean. Default false. When true, GET /jobs/{id}/detections is available after success."},"metadata":{"type":"string","description":"Any JSON value, serialized as text. Echoed back on the job as parsed JSON."}}}}}},"responses":{"202":{"description":"Queued job in data. Use data.id to poll GET /api/v2/jobs/{id}. Retry-After repeats retryAfter.","headers":{"X-RateLimit-Limit":{"description":"Jobs allowed per minute for this API key.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Jobs still allowed in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before the first poll. Same value as data.retryAfter.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2JobEnvelopeDto"}}}},"400":{"description":"Missing file, invalid JSON in style, regionOfInterest, or metadata, or neither faces nor plates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"401":{"description":"Missing or unknown API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"402":{"description":"Not enough credits, or the payment method is missing or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"403":{"description":"Trial limit reached, or the anonymization service is not enabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"415":{"description":"File extension or media type is not supported. See GET /api/v2/account supportedFormats.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"429":{"description":"Too many jobs in the current minute. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}}},"tags":["BlurIt API v2 - Jobs"]}}}}
```

## Download the anonymized file

> Raw bytes of the anonymized image, video, or ZIP. Call this only after GET /api/v2/jobs/{id} reports status succeeded. The body is not wrapped in data.

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"servers":[{"url":"https://api.v2.services.wassa-dev.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API key","type":"http","description":"Long-lived API key created in the BlurIt app. There is no token exchange. Send Authorization: Bearer blrt_..."}},"schemas":{"ApiV2ErrorDto":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string","description":"Stable machine code. Common values: AUTH_ERROR, VALIDATION_ERROR, NO_FILE, NO_ANONYMIZATION_TARGET, UNSUPPORTED_FILE_FORMAT, FILE_TOO_LARGE, INSUFFICIENT_CREDITS, PAYMENT_METHOD_EXPIRED, PAYMENT_METHOD_MISSING, TRIAL_LIMIT_EXCEEDED, SERVICE_NOT_SUBSCRIBED, RATE_LIMITED, JOB_NOT_FOUND, JOB_NOT_READY, FILE_PURGED, EXTERNAL_SERVICE_ERROR."},"message":{"type":"string"},"retryable":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"details":{"description":"Either a list of validation issues, or an object whose keys depend on code. Object examples: { jobId } on the sync timeout, { status } on JOB_NOT_READY, { creditsRequired, creditsAvailable } on INSUFFICIENT_CREDITS, { maxSizeBytes } on FILE_TOO_LARGE, { supportedFormats } on UNSUPPORTED_FILE_FORMAT, { detectionsRequested } when detections were not requested, { limitBytes, usedBytes } on TRIAL_LIMIT_EXCEEDED. Absent when there is nothing to add.","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ApiV2ValidationIssueDto"}},{"type":"object","additionalProperties":true}]}},"required":["statusCode","code","message","retryable","timestamp","path","method"]},"ApiV2ValidationIssueDto":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["field","message","code"]}}},"paths":{"/api/v2/jobs/{id}/result":{"get":{"operationId":"ApiV2JobsController_downloadResult","summary":"Download the anonymized file","description":"Raw bytes of the anonymized image, video, or ZIP. Call this only after GET /api/v2/jobs/{id} reports status succeeded. The body is not wrapped in data.","parameters":[{"name":"id","required":true,"in":"path","description":"Public job id (job_...)","schema":{"type":"string"}}],"responses":{"200":{"description":"Binary file. Content-Type is the stored media type. Content-Disposition carries the filename. Not wrapped in data.","headers":{"X-RateLimit-Limit":{"description":"Jobs allowed per minute for this API key.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Jobs still allowed in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the current window resets.","schema":{"type":"integer"}}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing or unknown API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"404":{"description":"No job with this id for the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"409":{"description":"The job is not succeeded yet. details.status is the current status. Wait and poll GET /api/v2/jobs/{id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"410":{"description":"The anonymized file was deleted after the retention period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"429":{"description":"Too many jobs in the current minute. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}}},"tags":["BlurIt API v2 - Jobs"]}}}}
```

## Download the detections JSON

> Raw JSON file of detections. Call this only after status is succeeded and only when the job was created with generateJsonDetections true. The body is not wrapped in data.

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"servers":[{"url":"https://api.v2.services.wassa-dev.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API key","type":"http","description":"Long-lived API key created in the BlurIt app. There is no token exchange. Send Authorization: Bearer blrt_..."}},"schemas":{"ApiV2ErrorDto":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string","description":"Stable machine code. Common values: AUTH_ERROR, VALIDATION_ERROR, NO_FILE, NO_ANONYMIZATION_TARGET, UNSUPPORTED_FILE_FORMAT, FILE_TOO_LARGE, INSUFFICIENT_CREDITS, PAYMENT_METHOD_EXPIRED, PAYMENT_METHOD_MISSING, TRIAL_LIMIT_EXCEEDED, SERVICE_NOT_SUBSCRIBED, RATE_LIMITED, JOB_NOT_FOUND, JOB_NOT_READY, FILE_PURGED, EXTERNAL_SERVICE_ERROR."},"message":{"type":"string"},"retryable":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"details":{"description":"Either a list of validation issues, or an object whose keys depend on code. Object examples: { jobId } on the sync timeout, { status } on JOB_NOT_READY, { creditsRequired, creditsAvailable } on INSUFFICIENT_CREDITS, { maxSizeBytes } on FILE_TOO_LARGE, { supportedFormats } on UNSUPPORTED_FILE_FORMAT, { detectionsRequested } when detections were not requested, { limitBytes, usedBytes } on TRIAL_LIMIT_EXCEEDED. Absent when there is nothing to add.","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ApiV2ValidationIssueDto"}},{"type":"object","additionalProperties":true}]}},"required":["statusCode","code","message","retryable","timestamp","path","method"]},"ApiV2ValidationIssueDto":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["field","message","code"]}}},"paths":{"/api/v2/jobs/{id}/detections":{"get":{"operationId":"ApiV2JobsController_downloadDetections","summary":"Download the detections JSON","description":"Raw JSON file of detections. Call this only after status is succeeded and only when the job was created with generateJsonDetections true. The body is not wrapped in data.","parameters":[{"name":"id","required":true,"in":"path","description":"Public job id (job_...)","schema":{"type":"string"}}],"responses":{"200":{"description":"JSON file of detections. Content-Disposition filename ends with -detections.json. Not wrapped in data.","headers":{"X-RateLimit-Limit":{"description":"Jobs allowed per minute for this API key.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Jobs still allowed in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing or unknown API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"404":{"description":"Detections were not requested (generateJsonDetections was false), or the job does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"409":{"description":"The job is not succeeded yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"429":{"description":"Too many jobs in the current minute. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}}},"tags":["BlurIt API v2 - Jobs"]}}}}
```

## Get a job

> Poll this endpoint until data.status is succeeded or failed. While status is queued or processing, wait data.retryAfter seconds (also the Retry-After header) before calling again. When succeeded, download with GET /api/v2/jobs/{id}/result (and /detections when options.generateJsonDetections was true). The JSON never embeds URLs or paths.

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"servers":[{"url":"https://api.v2.services.wassa-dev.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API key","type":"http","description":"Long-lived API key created in the BlurIt app. There is no token exchange. Send Authorization: Bearer blrt_..."}},"schemas":{"ApiV2JobEnvelopeDto":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string","description":"Request path, including the query string when present."},"requestId":{"type":"string","description":"Present when the server assigned a request id."},"data":{"$ref":"#/components/schemas/ApiV2JobDto"}},"required":["timestamp","path","data"]},"ApiV2JobDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["image","video","batch"]},"status":{"type":"string","enum":["queued","processing","succeeded","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"retryAfter":{"type":"number","description":"Seconds to wait before polling again. Absent once the job is terminal."},"input":{"$ref":"#/components/schemas/ApiV2JobInputDto"},"options":{"$ref":"#/components/schemas/ApiV2JobOptionsDto"},"result":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobResultDto"}]},"error":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobErrorDto"}]},"billing":{"$ref":"#/components/schemas/ApiV2JobBillingDto"},"metadata":{"nullable":true,"description":"Caller-supplied JSON echoed back verbatim. Any JSON value: object, array, string, number, boolean, or null.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{}},{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["id","type","status","createdAt","updatedAt","input","options","billing"]},"ApiV2JobInputDto":{"type":"object","properties":{"filename":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"}},"required":["filename","sizeBytes","contentType"]},"ApiV2JobOptionsDto":{"type":"object","properties":{"faces":{"type":"boolean"},"plates":{"type":"boolean"},"style":{"$ref":"#/components/schemas/ApiV2JobStyleDto"},"regionOfInterest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2RegionDto"}]},"keepAudio":{"type":"boolean"},"generateJsonDetections":{"type":"boolean","description":"When true, GET /api/v2/jobs/{id}/detections is available after success."}},"required":["faces","plates","style","keepAudio","generateJsonDetections"]},"ApiV2JobStyleDto":{"type":"object","properties":{"type":{"type":"string","enum":["blur","pixelate","opaque"]},"intensity":{"type":"number","minimum":1,"maximum":10,"description":"Present when type is blur."},"pixels":{"type":"number","minimum":2,"maximum":10,"description":"Present when type is pixelate."},"color":{"type":"string","description":"Present when type is opaque. #RRGGBB."}},"required":["type"]},"ApiV2RegionDto":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."},"left":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"right":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"bottom":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."}},"required":["top","left","right","bottom"]},"ApiV2JobResultDto":{"type":"object","properties":{"retainedUntil":{"type":"string","format":"date-time","description":"When the result (and detections, if any) will be purged. Present only when status is succeeded. Download via GET /api/v2/jobs/{id}/result using this job's id — the JSON never embeds URLs or paths."}},"required":["retainedUntil"]},"ApiV2JobErrorDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"ApiV2JobBillingDto":{"type":"object","properties":{"method":{"type":"string","enum":["credits","usage","trial"]},"creditsCharged":{"type":"number"}},"required":["method"]},"ApiV2ErrorDto":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string","description":"Stable machine code. Common values: AUTH_ERROR, VALIDATION_ERROR, NO_FILE, NO_ANONYMIZATION_TARGET, UNSUPPORTED_FILE_FORMAT, FILE_TOO_LARGE, INSUFFICIENT_CREDITS, PAYMENT_METHOD_EXPIRED, PAYMENT_METHOD_MISSING, TRIAL_LIMIT_EXCEEDED, SERVICE_NOT_SUBSCRIBED, RATE_LIMITED, JOB_NOT_FOUND, JOB_NOT_READY, FILE_PURGED, EXTERNAL_SERVICE_ERROR."},"message":{"type":"string"},"retryable":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"details":{"description":"Either a list of validation issues, or an object whose keys depend on code. Object examples: { jobId } on the sync timeout, { status } on JOB_NOT_READY, { creditsRequired, creditsAvailable } on INSUFFICIENT_CREDITS, { maxSizeBytes } on FILE_TOO_LARGE, { supportedFormats } on UNSUPPORTED_FILE_FORMAT, { detectionsRequested } when detections were not requested, { limitBytes, usedBytes } on TRIAL_LIMIT_EXCEEDED. Absent when there is nothing to add.","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ApiV2ValidationIssueDto"}},{"type":"object","additionalProperties":true}]}},"required":["statusCode","code","message","retryable","timestamp","path","method"]},"ApiV2ValidationIssueDto":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["field","message","code"]}}},"paths":{"/api/v2/jobs/{id}":{"get":{"operationId":"ApiV2JobsController_get","summary":"Get a job","description":"Poll this endpoint until data.status is succeeded or failed. While status is queued or processing, wait data.retryAfter seconds (also the Retry-After header) before calling again. When succeeded, download with GET /api/v2/jobs/{id}/result (and /detections when options.generateJsonDetections was true). The JSON never embeds URLs or paths.","parameters":[{"name":"id","required":true,"in":"path","description":"Public job id (job_...)","schema":{"type":"string"}}],"responses":{"200":{"description":"Current job. retryAfter and Retry-After are present only while the job is queued or processing. On success, result contains retainedUntil only — build download paths from data.id.","headers":{"X-RateLimit-Limit":{"description":"Jobs allowed per minute for this API key.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Jobs still allowed in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before polling again. Omitted once the job is succeeded or failed.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2JobEnvelopeDto"}}}},"401":{"description":"Missing or unknown API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"404":{"description":"No job with this id for the authenticated account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"429":{"description":"Too many jobs in the current minute. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}}},"tags":["BlurIt API v2 - Jobs"]}}}}
```


# Blur It API V2 Account

## Read billing, trial quota, supported formats, and the current rate limit

> Call this before creating jobs when you need the accepted media types (supportedFormats) or the jobs-per-minute limit. The resource is in data.

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"servers":[{"url":"https://api.v2.services.wassa-dev.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"API key","type":"http","description":"Long-lived API key created in the BlurIt app. There is no token exchange. Send Authorization: Bearer blrt_..."}},"schemas":{"ApiV2AccountEnvelopeDto":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string","description":"Request path, including the query string when present."},"requestId":{"type":"string","description":"Present when the server assigned a request id."},"data":{"$ref":"#/components/schemas/ApiV2AccountDto"}},"required":["timestamp","path","data"]},"ApiV2AccountDto":{"type":"object","properties":{"billingMethod":{"type":"string","enum":["credits","usage"]},"credits":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2CreditsDto"}]},"trial":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2TrialDto"}]},"paymentMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2PaymentMethodDto"}]},"supportedFormats":{"type":"array","items":{"type":"string"}},"rateLimit":{"$ref":"#/components/schemas/ApiV2RateLimitDto"}},"required":["billingMethod","supportedFormats","rateLimit"]},"ApiV2CreditsDto":{"type":"object","properties":{"balance":{"type":"number"}},"required":["balance"]},"ApiV2TrialDto":{"type":"object","properties":{"limitBytes":{"type":"number"},"usedBytes":{"type":"number"},"remainingBytes":{"type":"number"}},"required":["limitBytes","usedBytes","remainingBytes"]},"ApiV2PaymentMethodDto":{"type":"object","properties":{"status":{"type":"string","enum":["valid","expiring_soon","expired","missing"]},"expiresAt":{"type":"string","format":"date","nullable":true,"description":"Card expiry date. Null when status is missing."}},"required":["status"]},"ApiV2RateLimitDto":{"type":"object","properties":{"jobsPerMinute":{"type":"number"}},"required":["jobsPerMinute"]},"ApiV2ErrorDto":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string","description":"Stable machine code. Common values: AUTH_ERROR, VALIDATION_ERROR, NO_FILE, NO_ANONYMIZATION_TARGET, UNSUPPORTED_FILE_FORMAT, FILE_TOO_LARGE, INSUFFICIENT_CREDITS, PAYMENT_METHOD_EXPIRED, PAYMENT_METHOD_MISSING, TRIAL_LIMIT_EXCEEDED, SERVICE_NOT_SUBSCRIBED, RATE_LIMITED, JOB_NOT_FOUND, JOB_NOT_READY, FILE_PURGED, EXTERNAL_SERVICE_ERROR."},"message":{"type":"string"},"retryable":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"details":{"description":"Either a list of validation issues, or an object whose keys depend on code. Object examples: { jobId } on the sync timeout, { status } on JOB_NOT_READY, { creditsRequired, creditsAvailable } on INSUFFICIENT_CREDITS, { maxSizeBytes } on FILE_TOO_LARGE, { supportedFormats } on UNSUPPORTED_FILE_FORMAT, { detectionsRequested } when detections were not requested, { limitBytes, usedBytes } on TRIAL_LIMIT_EXCEEDED. Absent when there is nothing to add.","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ApiV2ValidationIssueDto"}},{"type":"object","additionalProperties":true}]}},"required":["statusCode","code","message","retryable","timestamp","path","method"]},"ApiV2ValidationIssueDto":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["field","message","code"]}}},"paths":{"/api/v2/account":{"get":{"operationId":"ApiV2AccountController_get","summary":"Read billing, trial quota, supported formats, and the current rate limit","description":"Call this before creating jobs when you need the accepted media types (supportedFormats) or the jobs-per-minute limit. The resource is in data.","parameters":[],"responses":{"200":{"description":"Account snapshot inside data.","headers":{"X-RateLimit-Limit":{"description":"Jobs allowed per minute for this API key.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Jobs still allowed in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix time when the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2AccountEnvelopeDto"}}}},"401":{"description":"Missing or unknown API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}},"429":{"description":"Too many jobs in the current minute. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorDto"}}}}},"tags":["BlurIt API v2 - Account"]}}}}
```


# Models

## The ApiV2JobInputDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2JobInputDto":{"type":"object","properties":{"filename":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"}},"required":["filename","sizeBytes","contentType"]}}}}
```

## The ApiV2JobStyleDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2JobStyleDto":{"type":"object","properties":{"type":{"type":"string","enum":["blur","pixelate","opaque"]},"intensity":{"type":"number","minimum":1,"maximum":10,"description":"Present when type is blur."},"pixels":{"type":"number","minimum":2,"maximum":10,"description":"Present when type is pixelate."},"color":{"type":"string","description":"Present when type is opaque. #RRGGBB."}},"required":["type"]}}}}
```

## The ApiV2RegionDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2RegionDto":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."},"left":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"right":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"bottom":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."}},"required":["top","left","right","bottom"]}}}}
```

## The ApiV2JobOptionsDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2JobOptionsDto":{"type":"object","properties":{"faces":{"type":"boolean"},"plates":{"type":"boolean"},"style":{"$ref":"#/components/schemas/ApiV2JobStyleDto"},"regionOfInterest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2RegionDto"}]},"keepAudio":{"type":"boolean"},"generateJsonDetections":{"type":"boolean","description":"When true, GET /api/v2/jobs/{id}/detections is available after success."}},"required":["faces","plates","style","keepAudio","generateJsonDetections"]},"ApiV2JobStyleDto":{"type":"object","properties":{"type":{"type":"string","enum":["blur","pixelate","opaque"]},"intensity":{"type":"number","minimum":1,"maximum":10,"description":"Present when type is blur."},"pixels":{"type":"number","minimum":2,"maximum":10,"description":"Present when type is pixelate."},"color":{"type":"string","description":"Present when type is opaque. #RRGGBB."}},"required":["type"]},"ApiV2RegionDto":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."},"left":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"right":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"bottom":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."}},"required":["top","left","right","bottom"]}}}}
```

## The ApiV2JobResultDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2JobResultDto":{"type":"object","properties":{"retainedUntil":{"type":"string","format":"date-time","description":"When the result (and detections, if any) will be purged. Present only when status is succeeded. Download via GET /api/v2/jobs/{id}/result using this job's id — the JSON never embeds URLs or paths."}},"required":["retainedUntil"]}}}}
```

## The ApiV2JobErrorDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2JobErrorDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}}}
```

## The ApiV2JobBillingDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2JobBillingDto":{"type":"object","properties":{"method":{"type":"string","enum":["credits","usage","trial"]},"creditsCharged":{"type":"number"}},"required":["method"]}}}}
```

## The ApiV2JobDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2JobDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["image","video","batch"]},"status":{"type":"string","enum":["queued","processing","succeeded","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"retryAfter":{"type":"number","description":"Seconds to wait before polling again. Absent once the job is terminal."},"input":{"$ref":"#/components/schemas/ApiV2JobInputDto"},"options":{"$ref":"#/components/schemas/ApiV2JobOptionsDto"},"result":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobResultDto"}]},"error":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobErrorDto"}]},"billing":{"$ref":"#/components/schemas/ApiV2JobBillingDto"},"metadata":{"nullable":true,"description":"Caller-supplied JSON echoed back verbatim. Any JSON value: object, array, string, number, boolean, or null.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{}},{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["id","type","status","createdAt","updatedAt","input","options","billing"]},"ApiV2JobInputDto":{"type":"object","properties":{"filename":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"}},"required":["filename","sizeBytes","contentType"]},"ApiV2JobOptionsDto":{"type":"object","properties":{"faces":{"type":"boolean"},"plates":{"type":"boolean"},"style":{"$ref":"#/components/schemas/ApiV2JobStyleDto"},"regionOfInterest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2RegionDto"}]},"keepAudio":{"type":"boolean"},"generateJsonDetections":{"type":"boolean","description":"When true, GET /api/v2/jobs/{id}/detections is available after success."}},"required":["faces","plates","style","keepAudio","generateJsonDetections"]},"ApiV2JobStyleDto":{"type":"object","properties":{"type":{"type":"string","enum":["blur","pixelate","opaque"]},"intensity":{"type":"number","minimum":1,"maximum":10,"description":"Present when type is blur."},"pixels":{"type":"number","minimum":2,"maximum":10,"description":"Present when type is pixelate."},"color":{"type":"string","description":"Present when type is opaque. #RRGGBB."}},"required":["type"]},"ApiV2RegionDto":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."},"left":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"right":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"bottom":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."}},"required":["top","left","right","bottom"]},"ApiV2JobResultDto":{"type":"object","properties":{"retainedUntil":{"type":"string","format":"date-time","description":"When the result (and detections, if any) will be purged. Present only when status is succeeded. Download via GET /api/v2/jobs/{id}/result using this job's id — the JSON never embeds URLs or paths."}},"required":["retainedUntil"]},"ApiV2JobErrorDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"ApiV2JobBillingDto":{"type":"object","properties":{"method":{"type":"string","enum":["credits","usage","trial"]},"creditsCharged":{"type":"number"}},"required":["method"]}}}}
```

## The ApiV2PaginationMetaDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2PaginationMetaDto":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","pageSize","total","totalPages"]}}}}
```

## The ApiV2JobListDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2JobListDto":{"type":"object","properties":{"elements":{"type":"array","items":{"$ref":"#/components/schemas/ApiV2JobDto"}},"meta":{"$ref":"#/components/schemas/ApiV2PaginationMetaDto"}},"required":["elements","meta"]},"ApiV2JobDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["image","video","batch"]},"status":{"type":"string","enum":["queued","processing","succeeded","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"retryAfter":{"type":"number","description":"Seconds to wait before polling again. Absent once the job is terminal."},"input":{"$ref":"#/components/schemas/ApiV2JobInputDto"},"options":{"$ref":"#/components/schemas/ApiV2JobOptionsDto"},"result":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobResultDto"}]},"error":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobErrorDto"}]},"billing":{"$ref":"#/components/schemas/ApiV2JobBillingDto"},"metadata":{"nullable":true,"description":"Caller-supplied JSON echoed back verbatim. Any JSON value: object, array, string, number, boolean, or null.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{}},{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["id","type","status","createdAt","updatedAt","input","options","billing"]},"ApiV2JobInputDto":{"type":"object","properties":{"filename":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"}},"required":["filename","sizeBytes","contentType"]},"ApiV2JobOptionsDto":{"type":"object","properties":{"faces":{"type":"boolean"},"plates":{"type":"boolean"},"style":{"$ref":"#/components/schemas/ApiV2JobStyleDto"},"regionOfInterest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2RegionDto"}]},"keepAudio":{"type":"boolean"},"generateJsonDetections":{"type":"boolean","description":"When true, GET /api/v2/jobs/{id}/detections is available after success."}},"required":["faces","plates","style","keepAudio","generateJsonDetections"]},"ApiV2JobStyleDto":{"type":"object","properties":{"type":{"type":"string","enum":["blur","pixelate","opaque"]},"intensity":{"type":"number","minimum":1,"maximum":10,"description":"Present when type is blur."},"pixels":{"type":"number","minimum":2,"maximum":10,"description":"Present when type is pixelate."},"color":{"type":"string","description":"Present when type is opaque. #RRGGBB."}},"required":["type"]},"ApiV2RegionDto":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."},"left":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"right":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"bottom":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."}},"required":["top","left","right","bottom"]},"ApiV2JobResultDto":{"type":"object","properties":{"retainedUntil":{"type":"string","format":"date-time","description":"When the result (and detections, if any) will be purged. Present only when status is succeeded. Download via GET /api/v2/jobs/{id}/result using this job's id — the JSON never embeds URLs or paths."}},"required":["retainedUntil"]},"ApiV2JobErrorDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"ApiV2JobBillingDto":{"type":"object","properties":{"method":{"type":"string","enum":["credits","usage","trial"]},"creditsCharged":{"type":"number"}},"required":["method"]},"ApiV2PaginationMetaDto":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","pageSize","total","totalPages"]}}}}
```

## The ApiV2JobEnvelopeDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2JobEnvelopeDto":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string","description":"Request path, including the query string when present."},"requestId":{"type":"string","description":"Present when the server assigned a request id."},"data":{"$ref":"#/components/schemas/ApiV2JobDto"}},"required":["timestamp","path","data"]},"ApiV2JobDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["image","video","batch"]},"status":{"type":"string","enum":["queued","processing","succeeded","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"retryAfter":{"type":"number","description":"Seconds to wait before polling again. Absent once the job is terminal."},"input":{"$ref":"#/components/schemas/ApiV2JobInputDto"},"options":{"$ref":"#/components/schemas/ApiV2JobOptionsDto"},"result":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobResultDto"}]},"error":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobErrorDto"}]},"billing":{"$ref":"#/components/schemas/ApiV2JobBillingDto"},"metadata":{"nullable":true,"description":"Caller-supplied JSON echoed back verbatim. Any JSON value: object, array, string, number, boolean, or null.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{}},{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["id","type","status","createdAt","updatedAt","input","options","billing"]},"ApiV2JobInputDto":{"type":"object","properties":{"filename":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"}},"required":["filename","sizeBytes","contentType"]},"ApiV2JobOptionsDto":{"type":"object","properties":{"faces":{"type":"boolean"},"plates":{"type":"boolean"},"style":{"$ref":"#/components/schemas/ApiV2JobStyleDto"},"regionOfInterest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2RegionDto"}]},"keepAudio":{"type":"boolean"},"generateJsonDetections":{"type":"boolean","description":"When true, GET /api/v2/jobs/{id}/detections is available after success."}},"required":["faces","plates","style","keepAudio","generateJsonDetections"]},"ApiV2JobStyleDto":{"type":"object","properties":{"type":{"type":"string","enum":["blur","pixelate","opaque"]},"intensity":{"type":"number","minimum":1,"maximum":10,"description":"Present when type is blur."},"pixels":{"type":"number","minimum":2,"maximum":10,"description":"Present when type is pixelate."},"color":{"type":"string","description":"Present when type is opaque. #RRGGBB."}},"required":["type"]},"ApiV2RegionDto":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."},"left":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"right":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"bottom":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."}},"required":["top","left","right","bottom"]},"ApiV2JobResultDto":{"type":"object","properties":{"retainedUntil":{"type":"string","format":"date-time","description":"When the result (and detections, if any) will be purged. Present only when status is succeeded. Download via GET /api/v2/jobs/{id}/result using this job's id — the JSON never embeds URLs or paths."}},"required":["retainedUntil"]},"ApiV2JobErrorDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"ApiV2JobBillingDto":{"type":"object","properties":{"method":{"type":"string","enum":["credits","usage","trial"]},"creditsCharged":{"type":"number"}},"required":["method"]}}}}
```

## The ApiV2JobListEnvelopeDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2JobListEnvelopeDto":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string","description":"Request path, including the query string when present."},"requestId":{"type":"string","description":"Present when the server assigned a request id."},"data":{"$ref":"#/components/schemas/ApiV2JobListDto"}},"required":["timestamp","path","data"]},"ApiV2JobListDto":{"type":"object","properties":{"elements":{"type":"array","items":{"$ref":"#/components/schemas/ApiV2JobDto"}},"meta":{"$ref":"#/components/schemas/ApiV2PaginationMetaDto"}},"required":["elements","meta"]},"ApiV2JobDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["image","video","batch"]},"status":{"type":"string","enum":["queued","processing","succeeded","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"retryAfter":{"type":"number","description":"Seconds to wait before polling again. Absent once the job is terminal."},"input":{"$ref":"#/components/schemas/ApiV2JobInputDto"},"options":{"$ref":"#/components/schemas/ApiV2JobOptionsDto"},"result":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobResultDto"}]},"error":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2JobErrorDto"}]},"billing":{"$ref":"#/components/schemas/ApiV2JobBillingDto"},"metadata":{"nullable":true,"description":"Caller-supplied JSON echoed back verbatim. Any JSON value: object, array, string, number, boolean, or null.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{}},{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["id","type","status","createdAt","updatedAt","input","options","billing"]},"ApiV2JobInputDto":{"type":"object","properties":{"filename":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"}},"required":["filename","sizeBytes","contentType"]},"ApiV2JobOptionsDto":{"type":"object","properties":{"faces":{"type":"boolean"},"plates":{"type":"boolean"},"style":{"$ref":"#/components/schemas/ApiV2JobStyleDto"},"regionOfInterest":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2RegionDto"}]},"keepAudio":{"type":"boolean"},"generateJsonDetections":{"type":"boolean","description":"When true, GET /api/v2/jobs/{id}/detections is available after success."}},"required":["faces","plates","style","keepAudio","generateJsonDetections"]},"ApiV2JobStyleDto":{"type":"object","properties":{"type":{"type":"string","enum":["blur","pixelate","opaque"]},"intensity":{"type":"number","minimum":1,"maximum":10,"description":"Present when type is blur."},"pixels":{"type":"number","minimum":2,"maximum":10,"description":"Present when type is pixelate."},"color":{"type":"string","description":"Present when type is opaque. #RRGGBB."}},"required":["type"]},"ApiV2RegionDto":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."},"left":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"right":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame width, from the left."},"bottom":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of the frame height, from the top."}},"required":["top","left","right","bottom"]},"ApiV2JobResultDto":{"type":"object","properties":{"retainedUntil":{"type":"string","format":"date-time","description":"When the result (and detections, if any) will be purged. Present only when status is succeeded. Download via GET /api/v2/jobs/{id}/result using this job's id — the JSON never embeds URLs or paths."}},"required":["retainedUntil"]},"ApiV2JobErrorDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"ApiV2JobBillingDto":{"type":"object","properties":{"method":{"type":"string","enum":["credits","usage","trial"]},"creditsCharged":{"type":"number"}},"required":["method"]},"ApiV2PaginationMetaDto":{"type":"object","properties":{"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","pageSize","total","totalPages"]}}}}
```

## The ApiV2ValidationIssueDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2ValidationIssueDto":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["field","message","code"]}}}}
```

## The ApiV2ErrorDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2ErrorDto":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string","description":"Stable machine code. Common values: AUTH_ERROR, VALIDATION_ERROR, NO_FILE, NO_ANONYMIZATION_TARGET, UNSUPPORTED_FILE_FORMAT, FILE_TOO_LARGE, INSUFFICIENT_CREDITS, PAYMENT_METHOD_EXPIRED, PAYMENT_METHOD_MISSING, TRIAL_LIMIT_EXCEEDED, SERVICE_NOT_SUBSCRIBED, RATE_LIMITED, JOB_NOT_FOUND, JOB_NOT_READY, FILE_PURGED, EXTERNAL_SERVICE_ERROR."},"message":{"type":"string"},"retryable":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"details":{"description":"Either a list of validation issues, or an object whose keys depend on code. Object examples: { jobId } on the sync timeout, { status } on JOB_NOT_READY, { creditsRequired, creditsAvailable } on INSUFFICIENT_CREDITS, { maxSizeBytes } on FILE_TOO_LARGE, { supportedFormats } on UNSUPPORTED_FILE_FORMAT, { detectionsRequested } when detections were not requested, { limitBytes, usedBytes } on TRIAL_LIMIT_EXCEEDED. Absent when there is nothing to add.","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ApiV2ValidationIssueDto"}},{"type":"object","additionalProperties":true}]}},"required":["statusCode","code","message","retryable","timestamp","path","method"]},"ApiV2ValidationIssueDto":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}},"required":["field","message","code"]}}}}
```

## The ApiV2CreditsDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2CreditsDto":{"type":"object","properties":{"balance":{"type":"number"}},"required":["balance"]}}}}
```

## The ApiV2TrialDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2TrialDto":{"type":"object","properties":{"limitBytes":{"type":"number"},"usedBytes":{"type":"number"},"remainingBytes":{"type":"number"}},"required":["limitBytes","usedBytes","remainingBytes"]}}}}
```

## The ApiV2PaymentMethodDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2PaymentMethodDto":{"type":"object","properties":{"status":{"type":"string","enum":["valid","expiring_soon","expired","missing"]},"expiresAt":{"type":"string","format":"date","nullable":true,"description":"Card expiry date. Null when status is missing."}},"required":["status"]}}}}
```

## The ApiV2RateLimitDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2RateLimitDto":{"type":"object","properties":{"jobsPerMinute":{"type":"number"}},"required":["jobsPerMinute"]}}}}
```

## The ApiV2AccountDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2AccountDto":{"type":"object","properties":{"billingMethod":{"type":"string","enum":["credits","usage"]},"credits":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2CreditsDto"}]},"trial":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2TrialDto"}]},"paymentMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2PaymentMethodDto"}]},"supportedFormats":{"type":"array","items":{"type":"string"}},"rateLimit":{"$ref":"#/components/schemas/ApiV2RateLimitDto"}},"required":["billingMethod","supportedFormats","rateLimit"]},"ApiV2CreditsDto":{"type":"object","properties":{"balance":{"type":"number"}},"required":["balance"]},"ApiV2TrialDto":{"type":"object","properties":{"limitBytes":{"type":"number"},"usedBytes":{"type":"number"},"remainingBytes":{"type":"number"}},"required":["limitBytes","usedBytes","remainingBytes"]},"ApiV2PaymentMethodDto":{"type":"object","properties":{"status":{"type":"string","enum":["valid","expiring_soon","expired","missing"]},"expiresAt":{"type":"string","format":"date","nullable":true,"description":"Card expiry date. Null when status is missing."}},"required":["status"]},"ApiV2RateLimitDto":{"type":"object","properties":{"jobsPerMinute":{"type":"number"}},"required":["jobsPerMinute"]}}}}
```

## The ApiV2AccountEnvelopeDto object

```json
{"openapi":"3.0.0","info":{"title":"BlurIt API v2","version":"1.20.0"},"components":{"schemas":{"ApiV2AccountEnvelopeDto":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"path":{"type":"string","description":"Request path, including the query string when present."},"requestId":{"type":"string","description":"Present when the server assigned a request id."},"data":{"$ref":"#/components/schemas/ApiV2AccountDto"}},"required":["timestamp","path","data"]},"ApiV2AccountDto":{"type":"object","properties":{"billingMethod":{"type":"string","enum":["credits","usage"]},"credits":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2CreditsDto"}]},"trial":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2TrialDto"}]},"paymentMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ApiV2PaymentMethodDto"}]},"supportedFormats":{"type":"array","items":{"type":"string"}},"rateLimit":{"$ref":"#/components/schemas/ApiV2RateLimitDto"}},"required":["billingMethod","supportedFormats","rateLimit"]},"ApiV2CreditsDto":{"type":"object","properties":{"balance":{"type":"number"}},"required":["balance"]},"ApiV2TrialDto":{"type":"object","properties":{"limitBytes":{"type":"number"},"usedBytes":{"type":"number"},"remainingBytes":{"type":"number"}},"required":["limitBytes","usedBytes","remainingBytes"]},"ApiV2PaymentMethodDto":{"type":"object","properties":{"status":{"type":"string","enum":["valid","expiring_soon","expired","missing"]},"expiresAt":{"type":"string","format":"date","nullable":true,"description":"Card expiry date. Null when status is missing."}},"required":["status"]},"ApiV2RateLimitDto":{"type":"object","properties":{"jobsPerMinute":{"type":"number"}},"required":["jobsPerMinute"]}}}}
```


