Skip to main content
SocialCutter

AI and agents

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.

  • 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

HeaderValue
X-API-Keysc_your_key
Content-Typeapplication/json
Idempotency-KeyOptional: 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}}):

{
  "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

PlatformFormatDimensionsRatio
instagrampost1080x10801:1
instagramstory1080x19209:16
instagramlandscape1080x5661.91:1
facebookpost1200x6301.91:1
facebookstory1080x19209:16
facebookcover820x3122.63:1
twitterpost1200x67516:9
twitterheader1500x5003:1
linkedinpost1200x6271.91:1
linkedincover1128x1915.9:1
youtubethumbnail1280x72016:9
youtubebanner2560x144016:9
tiktokcover1080x19209: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:

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

CodeMeaning
401The X-API-Key header is missing or the key is wrong
429Quota exhausted: you passed the daily uses of your plan
413The image is over 5 MB
422Validation error: source or destinations are malformed
400Invalid 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

Frequently asked questions

Do I need an official SocialCutter integration in Zapier?

No. A single HTTP step is enough: Webhooks by Zapier with the POST action, or a custom request action. SocialCutter is a REST API and only needs a URL, an auth header and a JSON body.

Why not upload the file from Zapier directly?

Because Zapier's HTTP step handles JSON well but is fragile with the multipart/form-data that carries a binary file: depending on the version, the attachment arrives corrupted or with the wrong length. The path that always works is sending the file's public URL in the source field of the JSON body.

Where should I keep the API key?

As a connection field value or an environment variable, never pasted into the action text. Zapier stores plain text values in the run history, so treat it as a secret.

How is each run billed?

1 use per destination, meaning each platform and format pair you request. A step asking for Instagram post and LinkedIn post costs 2 uses from your daily quota.

What size is allowed?

5 MB per image. Above that the API answers 413. If the master is heavier, resize it first or serve a smaller version at the URL.