> For the complete documentation index, see [llms.txt](https://developer.topazlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.topazlabs.com/video-models/other-utilities/themis-2-motion-deblur.md).

# Themis 2 (Motion Deblur)

Restore clarity to fast-moving footage

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Click to view</td><td><a href="https://4007072434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJkSwaYgAsTQke14gpXAF%2Fuploads%2FJKxKzGjUqqSsVNXvPysl%2FThemis_2_(Motion_Deblur)_slider.jpg?alt=media&#x26;token=3811d12a-5f3f-4f7f-a830-a0966af8163c">https://4007072434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJkSwaYgAsTQke14gpXAF%2Fuploads%2FJKxKzGjUqqSsVNXvPysl%2FThemis_2_(Motion_Deblur)_slider.jpg?alt=media&#x26;token=3811d12a-5f3f-4f7f-a830-a0966af8163c</a></td><td><a href="https://compare.topazlabs.com/share/image?src1=https%3A%2F%2Fdownloads.topazlabs.com%2Fweb-assets%2Fmodel-examples%2F347888_Sunset-Silhouette-Twilight-Atmospheric_By_Brad_Day_Artlist_4K.mp4&#x26;src1label=Before&#x26;src2=https%3A%2F%2Fdownloads.topazlabs.com%2Fweb-assets%2Fmodel-examples%2F347888_Sunset-Silhouette-Twilight-Atmospheric_By_Brad_Day_Artlist_4K_thm2.mp4&#x26;src2label=After&#x26;zoom=1">https://compare.topazlabs.com/share/image?src1=https%3A%2F%2Fdownloads.topazlabs.com%2Fweb-assets%2Fmodel-examples%2F347888_Sunset-Silhouette-Twilight-Atmospheric_By_Brad_Day_Artlist_4K.mp4&#x26;src1label=Before&#x26;src2=https%3A%2F%2Fdownloads.topazlabs.com%2Fweb-assets%2Fmodel-examples%2F347888_Sunset-Silhouette-Twilight-Atmospheric_By_Brad_Day_Artlist_4K_thm2.mp4&#x26;src2label=After&#x26;zoom=1</a></td></tr></tbody></table>

### Model Overview

**Themis 2** reduces blur caused by rapid camera movement or fast-moving subjects. It recovers clarity and sharpness while avoiding the harsh edges and artifacts aggressive sharpening introduces.

It is best suited to action footage, handheld shots, and fast motion where traditional sharpening can't recover lost detail.

### Best Use Cases

* **Action footage.** Recover detail in fast motion.
* **Handheld shots.** Reduce blur from camera shake.
* **Sports.** Sharper fast-moving subjects.
* **Legibility.** Make text and details in motion readable.
* **Before upscaling.** Deblur first, then upscale.

### Endpoint

`https://api.topazlabs.com/video/`

`https://api.topazlabs.com/video/express`

### Model Parameters

Model parameters go inside the filter object in `filters`.

Themis 2 uses the Precision filter parameter set. Every parameter below is optional except `model`; any value you don't send is estimated automatically.

| Parameter                    | Type      | Required / Default | Accepted values                                            | Description                                                                                                                                    |
| ---------------------------- | --------- | ------------------ | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`                      | `string`  | Required           | `"thm-2"`                                                  | —                                                                                                                                              |
| `videoType`                  | `string`  | Optional           | `"Progressive"`, `"Interlaced"`, `"ProgressiveInterlaced"` | Frame/field type of the source.                                                                                                                |
| `auto`                       | `string`  | Optional           | `"Auto"`, `"Manual"`, `"Relative"`                         | Parameter mode. `Auto` estimates every value, `Relative` nudges the estimated values by the amounts you send, `Manual` uses your values as-is. |
| `fieldOrder`                 | `string`  | Optional           | `"TopFirst"`, `"BottomFirst"`, `"Auto"`                    | Field order for interlaced sources.                                                                                                            |
| `focusFixLevel`              | `string`  | Optional           | `"None"`, `"Normal"`, `"Strong"`                           | Downscales the input for stronger correction of blurred subjects.                                                                              |
| `compression`                | `decimal` | Optional           | `-1.0` to `1.0`                                            | Strength of compression artifact recovery.                                                                                                     |
| `details`                    | `decimal` | Optional           | `-1.0` to `1.0`                                            | Amount of detail reconstruction.                                                                                                               |
| `prenoise`                   | `decimal` | Optional           | `0.0` to `0.1`                                             | Adds noise to the input to reduce over-smoothing.                                                                                              |
| `noise`                      | `decimal` | Optional           | `-1.0` to `1.0`                                            | Amount of noise reduction.                                                                                                                     |
| `halo`                       | `decimal` | Optional           | `-1.0` to `1.0`                                            | Amount of halo reduction.                                                                                                                      |
| `preblur`                    | `decimal` | Optional           | `-1.0` to `1.0`                                            | Anti-aliasing and deblurring strength.                                                                                                         |
| `blur`                       | `decimal` | Optional           | `-1.0` to `1.0`                                            | Amount of sharpening applied.                                                                                                                  |
| `grain`                      | `decimal` | Optional           | `0.0` to `0.1`                                             | Adds grain after processing.                                                                                                                   |
| `grainSigma`                 | `decimal` | Optional           | `0.0` to `1.0`                                             | Grain granularity.                                                                                                                             |
| `grainSize`                  | `decimal` | Optional           | `0.0` to `5.0`                                             | Size of generated grain.                                                                                                                       |
| `grainType`                  | `string`  | Optional           | `"silver_rich"`, `"gaussian"`, `"grey"`                    | Type of grain.                                                                                                                                 |
| `recoverOriginalDetailValue` | `decimal` | Optional           | `0.0` to `1.0`                                             | Reintroduces source detail into the output.                                                                                                    |

For the shared video pipeline parameters (`source`, `output`, encoders and profiles), reference the Denoising intent page. The full set of accepted parameters is also available in our API Reference page.

For request parameters shared by every video model (source, output, destination, and notifications), see Request Parameters. The full schema is also available in our API Reference page.

### Model Pricing

#### 1080p Output

| Duration | 24 fps | 30 fps | 60 fps |
| -------- | ------ | ------ | ------ |
| 5 s      | 1      | 1      | 2      |
| 10 s     | 1      | 2      | 3      |
| 30 s     | 3      | 4      | 8      |
| 1 min    | 6      | 8      | 15     |
| 5 min    | 29     | 37     | 73     |
| 10 min   | 58     | 73     | 145    |

#### 4K Output

| Duration | 24 fps | 30 fps | 60 fps |
| -------- | ------ | ------ | ------ |
| 5 s      | 2      | 3      | 5      |
| 10 s     | 4      | 5      | 10     |
| 30 s     | 12     | 15     | 29     |
| 1 min    | 24     | 29     | 58     |
| 5 min    | 116    | 145    | 290    |
| 10 min   | 232    | 290    | 580    |

{% hint style="info" %}
These are estimates. For a quote on a specific file, use our [Credit Calculator](https://developer.topazlabs.com/credit-calculator) or create the request with `POST /video/`, which returns an estimate before processing starts.
{% endhint %}

### Example Request

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST "https://api.topazlabs.com/video/express" \
  -H "X-API-Key: $TOPAZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": { "container": "mp4" },
    "filters": [ { "model": "thm-2", "auto": "Auto" } ],
    "output": { "resolution": { "width": 1920, "height": 1080 } }
  }'
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const payload = {
  "source": {
    "container": "mp4"
  },
  "filters": [
    {
      "model": "thm-2",
      "auto": "Auto"
    }
  ],
  "output": {
    "resolution": {
      "width": 1920,
      "height": 1080
    }
  }
};

const response = await fetch("https://api.topazlabs.com/video/express", {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.TOPAZ_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(payload),
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status} ${await response.text()}`);
}

console.log(await response.json());
```

{% endtab %}

{% tab title="Python" %}

```python
import os
import requests

payload = {'source': {'container': 'mp4'},
 'filters': [{'model': 'thm-2', 'auto': 'Auto'}],
 'output': {'resolution': {'width': 1920, 'height': 1080}}}

response = requests.post(
    "https://api.topazlabs.com/video/express",
    headers={"X-API-Key": os.environ["TOPAZ_API_KEY"]},
    json=payload,
)
response.raise_for_status()
print(response.json())
```

{% endtab %}
{% endtabs %}

### Limitations

Themis 2 doesn't upscale.

### Helpful Resources

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><i class="fa-play">:play:</i></td><td><h4>Video Quickstart</h4></td><td>Quickly get started with our Video API.</td><td><a href="https://developer.topazlabs.com/getting-started/video-quickstart.md">Video Quickstart</a></td></tr><tr><td><i class="fa-file-brackets-curly">:file-brackets-curly:</i></td><td><h4>API Reference</h4></td><td>View our API reference to view the entire schema.</td><td><a href="https://developer.topazlabs.com/reference/">Reference</a></td></tr><tr><td><i class="fa-square-root-variable">:square-root-variable:</i></td><td><h4>Model Pricing</h4></td><td>Learn how we price our models.</td><td><a href="https://developer.topazlabs.com/getting-started/model-pricing.md">Model Pricing</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.topazlabs.com/video-models/other-utilities/themis-2-motion-deblur.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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