DocumentationAPI v1
Guide · Getting started

Quickstart

From nothing to a working upload in about two minutes.

What you need

An account on this instance, membership of an organisation, and one API token.

The sign-up page, /signup, creates your account and an organisation you own, and offers a first token on the way. It is closed when the operator closes it, and also while no storage quota is set for new organisations. When it is closed, ask the operator for an account, then open the invitation link your team sends you.

1. Create a token

If you generated one at the end of sign-up, skip to step 2. Otherwise open Tokens and create one. Give it only the scopes the resource actually needs. A phone that uploads photos, clips and voice notes needs the three upload scopes and nothing else.

The token is shown exactly once. It is stored hashed, so it cannot be recovered later. If you lose it, revoke it and mint another.

2. Send a file

Set the APERTURE_KEY environment variable to the token you just created.

curl -X POST https://your-instance/api/v1/uploads \
  -H "Authorization: ${APERTURE_KEY}" \
  -F "file=@screenshot.png"
{
    "status": "ok",
    "data": {
        "id": "01K2R7M8QF3V9XZ4B6NCDT0YAH",
        "url": "https://cdn.your-instance/your-org/01K2R7M8QF3V9XZ4B6NCDT0YAH.webp",
        "bytes": 184320,
        "original_bytes": 2201984,
        "savings_percent": 92
    }
}

The URL works immediately. Images are encoded inside the request, so what you get back is final.

3. Point your resource at it

Each integration has a guide with the block to paste: lb-phone and screenshot-basic. If your scripts already call the compatible routes (/api/v3/file, /api/v2/{kind} or the legacy /api/{kind}), Migrating shows the two values to change: the base URL and the key.

What happens next

Every upload appears in Media within a second, without a refresh, and moves the counters on Overview. If a clip is still shrinking you will see it marked as processing: the URL already works, the file simply gets smaller underneath it.