Quickstart
Fastest path: the browser form — no account, no setup
Open https://api.apertureapi.com/ in a browser, choose a hologram, and submit. Nothing to install and no credentials required. Wait about three seconds after the page loads before submitting; the form carries a short-lived page token and a faster submission is rejected.
From the command line, no account
The same no-account path in two calls. Fetch a page token, wait out the dwell, then submit it with your file:
TOKEN=$(curl -sS https://api.apertureapi.com/public/form_token \
| grep -o '"token":"[^"]*"' | cut -d'"' -f4)
sleep 3
curl -sS -X POST https://api.apertureapi.com/public/reconstruct \
-F "file=@hologram.png" \
-F "form_token=$TOKEN" \
-F "wavelength_um=0.635" \
-F "pixel_pitch_um=1.85" \
-F "z_min_mm=0.5" \
-F "z_max_mm=3.0" \
-o reconstruction.zip
On this path the optical parameters are form fields. The token is bound to your IP and User-Agent, so both calls must come from the same client, and each token may be used once. Public access is rate-limited — see the tier-limits page.
With an API account
Requires an API account. /reconstruct_pdhm is authenticated: pass your
API key as a bearer credential. See the auth-and-signup page to get one. This
path accepts larger inputs and higher quota.
curl -sS -X POST "https://api.apertureapi.com/reconstruct_pdhm?\
wavelength_um=0.635&pixel_pitch_um=1.85&z_min_mm=0.5&z_max_mm=3.0" \
-H "Authorization: Bearer $APERTURE_API_KEY" \
-F "file=@hologram.png" \
-o reconstruction.zip
Here the optical parameters are query parameters, not form fields — that differs from the public path above.
In both cases
The response is a ZIP archive — save it as .zip, not .npz. The archive
contains an .npz of the raw arrays alongside the other outputs; see the
output-zip page.