# Favicon pack

Make a complete favicon set from one image: favicon.ico, PNG icons, Apple touch icon and the HTML tags.

Upload one image, ideally square and at least 512 x 512 pixels. You get favicon.ico (holding 16, 32 and 48 pixel versions), favicon-16.png, favicon-32.png, apple-touch-icon.png (180), icon-192.png and icon-512.png. The result also holds the HTML link tags for your page head and a site.webmanifest to save next to the icons.

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

## 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 image to turn into icons. Square and at least 512 x 512 pixels works best.
- `background` (optional, string, default `"transparent"`): Colour that fills the square around a non-square image and any padding. A hex colour, a colour name or transparent.
- `padding` (optional, integer, default `0`, range 0..40): Empty space on every side, as a percentage of the icon size.
- `site_name` (optional, string, default `"My site"`): Name of the site or app, used in the web manifest.
- `theme_color` (optional, string, default `"#ffffff"`): Theme colour for the web manifest, as a hex colour.

## Example 1: Favicon set from a square logo

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

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

## Example 2: Pad a wide image onto a dark square

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

```json
{"input":{"image":"DROP_ID/f1","background":"#0f172a","padding":10,"site_name":"Example"},"wait":30}
```

**Where do the files go?** Put all six files in the top folder of your site, save the manifest text as site.webmanifest next to them, and paste the HTML tags into the head of your pages.

**Why is the Apple touch icon not transparent?** iPhones and iPads show transparent areas as black. When the background is transparent, the Apple icon alone is placed on white instead.

**My image is not square. What happens?** It is centred on a square and the rest is filled with the background colour. Nothing is cropped or stretched.
