API

photo-resize

Runs in your own browser. One upload produces the whole set of platform-correct crops at once, delivered as a ZIP — which is why this is one call and not fifteen. The subject is kept in frame rather than centre-cropped blindly.

v1 beta browser · 1 tokens

Call it

POST https://tembrica.com/v1/tools/photo-resize/runs
Authorization: Bearer $TIMBRICA_KEY
Idempotency-Key: <your retry-safe key>
Content-Type: application/json

Input

FieldTypeRequiredNotes
format string no Output format. `same` keeps the source format.
one of: same, jpeg, png, webp
default: same

Browser recipe

This tool runs in your own browser. The work order you receive carries this recipe with the placeholders filled in; the selectors below are a versioned contract, not implementation detail — they do not change without a version bump.

{
    "engine": "dom",
    "steps": [
        {
            "action": "upload",
            "selector": "[data-tmb-api=\"input-file\"]",
            "accept": [
                ".jpg",
                ".jpeg",
                ".png",
                ".webp"
            ]
        },
        {
            "action": "select",
            "selector": "[data-tmb-api=\"format\"]",
            "value": "{{format}}"
        },
        {
            "action": "click",
            "selector": "[data-tmb-api=\"run\"]"
        },
        {
            "action": "wait",
            "selector": "[data-tmb-api=\"download\"]",
            "timeout_s": 300
        },
        {
            "action": "click",
            "selector": "[data-tmb-api=\"download\"]"
        }
    ],
    "result": {
        "kind": "download",
        "settles": "automatically"
    }
}

Errors it can return

validation_failed  insufficient_tokens 

History

  • v1 — 2026-08-02 — Initial release (browser lane).

This contract cannot change without a new version and a line above: a test compares the published schema, pricing and limits against a committed lockfile and fails the build otherwise. Subscribe to /v1/changelog to be told when something moves.