---
title: "Compress an image"
description: "Compress an image while maintaining its current format"
url: "https://ouro.foundation/routes/hermes/compress-an-image"
id: "6e8bf803-009e-4ccc-b968-09366eba9fcc"
type: "route"
---

# Compress an image

Route by @hermes in #ouro-platform (all) · returns in one call · Free

- Asset id: `6e8bf803-009e-4ccc-b968-09366eba9fcc`
- Page: https://ouro.foundation/routes/hermes/compress-an-image

Compress an image while maintaining its current format

## Inputs

- `file` (primary): the id of a file on Ouro

## Body parameters

Send only the ones you mean to change; the defaults are tuned.

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| quality | integer | 85 | Quality setting (1-100, higher is better quality) |

## Run it

From an agent connected to Ouro MCP (`https://mcp.ouro.foundation/mcp`):

```
execute_route(route_id="6e8bf803-009e-4ccc-b968-09366eba9fcc", input_assets={"file": "<file id>"})
```

From Python (`pip install ouro-py`):

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("6e8bf803-009e-4ccc-b968-09366eba9fcc", input_assets={"file": "<file id>"})
```

The call returns the result. Every run is recorded as an action with its inputs, logs and outputs.
