# Automatize image resizing with Zapier
> Build a Zap that takes a new image and generates every size with SocialCutter: public URL in the JSON body, headers, outputs and common errors.
- URL: https://socialcutter.theboomer.dev/en/guides/zapier/
- Idioma: en
- Familia: ia
- Actualizado: 2026-09-24
- Palabras clave: Zapier, no-code, automation, Webhooks by Zapier, SocialCutter, API key, social media
## Why automate resizing in Zapier

A master image has to serve Instagram, LinkedIn, X and the blog hero, and every slot asks for a different ratio. Doing it by hand, format by format, does not scale when you publish daily or when a catalogue has hundreds of entries.

Zapier fits because it already watches where new images show up (a form, Google Drive, Dropbox, an email) and because any plan allows an HTTP call to a REST API. SocialCutter crops the image **centered** to the exact dimensions of each destination and returns one URL per output; Zapier moves that URL to the right place. The framing is predictable: it does not analyse the content or decide what to crop.

## How the API works

The REST API lives at `https://api.socialcutter.theboomer.dev` and authentication goes in the `X-API-Key` header (`Authorization: Bearer sc_your_key` also works).

- `POST /api/v1/images/process` — takes an image and returns one output per destination.
- `POST /api/v1/images/upload` — accepts the image as a base64 string in the JSON body.
- `POST /api/v1/images/process/upload` — multipart with the file in `file` and `destinations` as a form field.
- `POST /api/v1/images/batch` — several images in one call.
- `GET /api/v1/history`, `GET /api/v1/wallet`, `GET /api/v1/platforms` — history, quota and the real destination catalogue.

The full reference is at https://docs.socialcutter.theboomer.dev.

## Zapier and binary data: why we avoid multipart

Zapier's HTTP step handles JSON well, but the `multipart/form-data` that carries a binary file is fragile: depending on the version and the trigger, the attachment arrives corrupted, with a wrong length, or without the right `Content-Type` part, and the API answers `422` or returns a broken image. So this guide does not send binary:

1. **Recommended path: the file's public URL** in the `source` field of the JSON body. It works whenever the origin is reachable from outside.
2. **Alternative: base64** with `POST /api/v1/images/upload`, when the origin exposes no URL (a private Drive, a form attachment).

Do not hand-build multipart with form fields in Zapier: that is where the failures happen.

## Create the API key

Open https://dash.socialcutter.theboomer.dev, go to **Profile → API keys**, create a key with a recognisable name (for example `zapier-prod`) and copy it: it starts with `sc_` and is shown only once. Store it as a connection field value or an environment variable, not pasted into the action text.

## The HTTP step: headers and body

| Header | Value |
|---|---|
| `X-API-Key` | `sc_your_key` |
| `Content-Type` | `application/json` |
| `Idempotency-Key` | Optional: a stable file id so a retry does not duplicate work |

Add a **Webhooks by Zapier → POST** step and paste this raw body, replacing the `value` with your trigger field (for example `{{image_url}}`):

```json
{
  "source": { "type": "url", "value": "https://example.com/photo.jpg" },
  "destinations": [
    { "platform": "instagram", "format": "post" },
    { "platform": "linkedin", "format": "post" },
    { "platform": "twitter", "format": "post" }
  ],
  "options": { "fit_mode": "cover" }
}
```

`source` accepts `url` or base64; `destinations` is the list of platform and format. `fit_mode: cover` scales and crops the overflow with a centered crop (the default); to fit the whole image, use `contain` with `background_color`.

### Destinations the API accepts

| Platform | Format | Dimensions | Ratio |
|---|---|---|---|
| instagram | post | 1080x1080 | 1:1 |
| instagram | story | 1080x1920 | 9:16 |
| instagram | landscape | 1080x566 | 1.91:1 |
| facebook | post | 1200x630 | 1.91:1 |
| facebook | story | 1080x1920 | 9:16 |
| facebook | cover | 820x312 | 2.63:1 |
| twitter | post | 1200x675 | 16:9 |
| twitter | header | 1500x500 | 3:1 |
| linkedin | post | 1200x627 | 1.91:1 |
| linkedin | cover | 1128x191 | 5.9:1 |
| youtube | thumbnail | 1280x720 | 16:9 |
| youtube | banner | 2560x1440 | 16:9 |
| tiktok | cover | 1080x1920 | 9:16 |

These come from `GET /api/v1/platforms`, which is public. The catalogue has no 4:5 format.

## Saving the result (output URLs)

The response carries `image_id` and an `outputs` array, one entry per destination, with the result URL, the platform, the format and the dimensions. In Zapier, add a **Formatter → Utilities → Line item to text** step (or **Looping by Zapier**) over `outputs` to walk the outputs, store each `url` in a Sheets column or a note, and keep `platform` and `format` too so a router knows which URL goes where.

Check the raw response before chaining anything:

```bash
curl -s -X POST "https://api.socialcutter.theboomer.dev/api/v1/images/process" \
  -H "X-API-Key: sc_your_key" \
  -H "Content-Type: application/json" \
  -d '{"source":{"type":"url","value":"https://example.com/photo.jpg"},"destinations":[{"platform":"instagram","format":"post"}]}' \
  | jq '.image_id, (.outputs[] | {url, platform, format, width, height})'
```

## Chaining to a CMS or storage

- **WordPress**: push the output to the media library (`POST /wp-json/wp/v2/media`) and set the attachment id on the post's `featured_media`.
- **Shopify**: use the product `image` field with the output URL.
- **Storage**: the upload module needs the binary, not the URL. Download the output first with a `GET` step, then upload; if it rejects binary, hand the URL to the CMS and let it download.

## Plan limits

- **5 MB** max per image; above that the API answers `413`.
- **1 use per destination** (platform and format) per request. Repeated destinations are not charged twice and failed items are refunded.
- Daily quota per plan: Free (€0) 3 uses/day, Basic (€3) 10/day, Pro (€9) 30/day, Agency (€29) 100/day. All include API and MCP.
- In Zapier, every step spends a task from your plan; do not add steps just to reformat data.

## Common errors

| Code | Meaning |
|---|---|
| 401 | The `X-API-Key` header is missing or the key is wrong |
| 429 | Quota exhausted: you passed the daily uses of your plan |
| 413 | The image is over 5 MB |
| 422 | Validation error: `source` or `destinations` are malformed |
| 400 | Invalid payload: unknown platform or format |

## Cost per run

1 use per destination. A Zap asking for Instagram post, LinkedIn post and X post costs 3 uses per image. If the trigger gets bursts, group them before calling or use `POST /api/v1/images/batch`. Check `GET /api/v1/wallet` for the daily quota and what is left.

## Next steps

- n8n guide: [Automate image resizing with n8n](/en/guides/n8n/)
- API guide with curl: [Process images from the terminal](/en/guides/curl/)
- WordPress guide: [Integrate SocialCutter with WordPress and WooCommerce](/en/guides/wordpress/)
- API documentation: https://docs.socialcutter.theboomer.dev