Getting started: resize images with a REST API
In ten minutes: a “responsive images” workflow, published, then called from your terminal with an API key.
Create an account
Sign up on the app (email, GitHub or Google), then open the verification link sent to you by email. Turn on two-step verification in Settings → Security.
Create and publish a workflow
Workflows → New workflow → Responsive images WebP + AVIF template. Pick a sample image to preview every block, adjust the widths, then Publish: version v1 is frozen. Note the
wf_…identifier in the page address.Create an API key
Settings → API keys → Create a key, with the
runs:readandruns:writescopes. It is only shown once:export API_KEY=sk_live_… export WORKFLOW=wf_…Upload an image
Images do not go through the API: request a signed upload URL, send the file directly, then confirm.
UPLOAD=$(curl -s -X POST "https://app.imagebake.com/v1/uploads" \ -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \ -d '{"files":[{"name":"hero.jpg","size":'"$(wc -c < hero.jpg)"'}]}') ASSET=$(echo "$UPLOAD" | jq -r '.data[0].id') curl -s -X PUT -T hero.jpg "$(echo "$UPLOAD" | jq -r '.data[0].upload.url')" curl -s -X POST "https://app.imagebake.com/v1/uploads/$ASSET/confirm" -H "Authorization: Bearer $API_KEY"Run the workflow
With
?wait=30, the API waits for the run to finish (30 s at most) and returns the files produced right away, with their download URLs:curl -s -X POST "https://app.imagebake.com/v1/workflows/$WORKFLOW/runs?wait=30" \ -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \ -H "Idempotency-Key: build-$(git rev-parse --short HEAD)" \ -d '{"assets":["'"$ASSET"'"]}' | jq '.outputs[] | {path, url}'For a whole folder, start the run with
"archive": truewithout waiting, pollGET /runs/{run}or receive a signed webhook, then download the ZIP withGET /runs/{run}/archive.What's next
- The Integrate tab of each workflow gives these snippets in curl, Node.js, Python, PHP, Go, C#, Ruby and Java.
- The API reference describes every operation, its scopes and its errors.
- The MCP server runs your workflows from Claude, Cursor or VS Code, in plain language.
Idempotency-Key: a CI job that retries the same step gets the same run back, without paying twice.- A problem, an idea? Use the “Send feedback” button in the app.