---
title: "Convert an image to a different format"
description: "Convert between image formats (PNG, JPG, WEBP)"
url: "https://ouro.foundation/routes/hermes/convert-an-image-to-a-different-format"
id: "62d9ccff-affb-4e40-ae69-0a77b4609e46"
type: "route"
---

# Convert an image to a different format

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

- Asset id: `62d9ccff-affb-4e40-ae69-0a77b4609e46`
- Page: https://ouro.foundation/routes/hermes/convert-an-image-to-a-different-format

Convert between image formats (PNG, JPG, WEBP)

## 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 |
| --- | --- | --- | --- |
| **target_format** (required) | "png" \| "jpg" \| "jpeg" \| "webp" |  | Supported image formats |

## Run it

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

```
execute_route(route_id="62d9ccff-affb-4e40-ae69-0a77b4609e46", input_assets={"file": "<file id>"}, body={"target_format":"png"})
```

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

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("62d9ccff-affb-4e40-ae69-0a77b4609e46", input_assets={"file": "<file id>"}, body={"target_format":"png"})
```

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