# Convert animated images

Convert an animation between GIF, animated WebP, animated PNG (APNG) and AVIF, keeping the frame timing.

- Endpoint: `POST https://setget.net/v1/tools/animated-convert` with JSON `{"input": {...}}` (add `"wait": 30` to hold the reply until the job finishes)
- MCP: `run_tool` with `slug` = `animated-convert`
- Page: https://setget.net/tools/animated-convert

## Files in, files out

This is a file tool. Its file inputs take file references, not file contents and not web addresses.

- Get a reference by uploading: `curl -T FILE https://setget.net/drop/` prints a line `ref  <id>/f1`. Or `POST https://setget.net/v1/drops` with `{"files":[{"name","size"}]}`, PUT the bytes to the returned `upload.url` with the listed headers, and use the file's `ref`. Over MCP use the `drop` tool. A file under about 700 KB can also be sent in place as a `data:<type>;base64,<content>` URI.
- Uploads are at most 100 MB per file, are readable by anyone with the link, and expire (one hour by default). Programs are refused.
- The tool runs as a job. The reply is `{"tool", "ms", "result", "files", "job"}`: `result` is JSON, and every result file comes back in `files` as `{"name", "size", "content_type", "kind", "url", "ref"}`. Download it from `url`, or pass `ref` as the input of another file tool.
- A job still running when the wait ends answers 202 with `job`. Follow it with `GET https://setget.net/v1/jobs/<id>?wait=30`, or stream progress from `GET https://setget.net/v1/jobs/<id>/events` (over MCP: the `job` tool). A person can watch it at `job.url`.

## Inputs

- `image` (required, file, a file reference such as `DROP_ID/f1`, accepts image): The animation to convert: GIF, animated WebP, animated PNG or AVIF.
- `format` (optional, string, one of `gif`, `webp`, `png`, `avif`, default `"webp"`): Format to convert to. png makes an animated PNG.
- `quality` (optional, integer, default `80`, range 1..100): Quality for WebP and AVIF, 1-100. Higher looks better and is larger. GIF and PNG ignore it.

## Example 1: GIF to animated WebP

Upload first. Each placeholder below stands for the reference of one upload: `DROP_ID/f1` = [sample.gif](https://setget.net/static/samples/sample.gif).

```json
{"input":{"image":"DROP_ID/f1"},"wait":30}
```

## Example 2: GIF to animated PNG

Upload first. Each placeholder below stands for the reference of one upload: `DROP_ID/f1` = [sample.gif](https://setget.net/static/samples/sample.gif).

```json
{"input":{"image":"DROP_ID/f1","format":"png"},"wait":30}
```

## Example 3: GIF to animated AVIF

Upload first. Each placeholder below stands for the reference of one upload: `DROP_ID/f1` = [sample.gif](https://setget.net/static/samples/sample.gif).

```json
{"input":{"image":"DROP_ID/f1","format":"avif","quality":60},"wait":30}
```

**Which format is smallest?** Usually AVIF, then WebP. Both are far smaller than GIF for the same picture. Animated PNG is lossless and often the largest.

**Is the timing kept?** Yes, every frame keeps its own duration. Frames shorter than 20 milliseconds are raised to 20, the shortest time browsers honour.

**What about a still image?** It is converted as a single frame. For still images image-convert offers more formats.

**Does converting to GIF lose quality?** It can: GIF holds 256 colours per frame and transparency is on or off, with no soft edges.
