Skip to content

URL API

Deterministic, human-readable URLs for transformed image delivery.

Every image is served from a deterministic, human-readable URL. Append query params to resize, crop, and re-format on the fly — the edge transforms once and caches forever.

URL structure

https://cdn.auraimage.ai/[projectName]/[filename]?[params]
SegmentDescriptionExample
projectNameYour project identifier — same as NEXT_PUBLIC_AURA_PROJECT_NAME.my-app
filenameThe key returned by upload (or whatever you stored).abc123xyz0-hero.jpg
paramsTransformation query string.w=800&q=75&fmt=auto
https://cdn.auraimage.ai/my-app/abc123xyz0-hero.jpg?w=800&q=75&fmt=auto

Transformation parameters

Sizing

ParamTypeDefaultNotes
wintegerWidth in pixels. Capped at 8192. Height scales proportionally unless h is also set.
hintegerHeight in pixels. Capped at 8192.
fitstringcoverHow to fit the image into the requested box. Only meaningful when w or h is set.

fit values:

ValueBehavior
coverCrop to fill the exact box.
containLetterbox — full image visible, no crop.
faceCloudflare-native face detection. Crops the most prominent face into the box.
autoCloudflare-native saliency detection. Crops to the most visually important region.

When fit=face or fit=auto succeeds, the response carries X-Aura-Smart-Crop: ok. When no face / salient region is detected, the result falls back to a centered cover crop (the header is omitted).

Quality & format

ParamTypeDefaultNotes
q1–10080Compression quality. Ignored for lossless masters served pass-through.
fmtstringautoOutput format.

fmt values:

ValueBehavior
autoRecommended. Picks the best format the client accepts.
avifForce AVIF.
webpForce WebP.
jpegForce JPEG.

Loading helpers

ParamTypeDescription
blur=trueflagReturns the BlurHash string as JSON instead of an image — { "blurhash": "..." }. The <AuraImage /> component uses this internally.
lqip=trueflagReturns a low-quality image preview (small, heavily compressed) for placeholder rendering.

Content negotiation

When fmt=auto (or fmt is omitted), the edge reads the Accept header and serves in priority order:

AVIF  →  WebP  →  JPEG

The response carries Vary: Accept so the cache stores one variant per accept-class — no cross-browser cache poisoning.

SEO filenames

Descriptive filenames improve image rankings in Google Images. The key returned by signUpload preserves the filename you posted (prefixed with a 10-char collision-resistant ID):

# Good — descriptive
https://cdn.auraimage.ai/my-app/abc123xyz0-golden-gate-bridge-sunset.jpg

# Avoid — opaque
https://cdn.auraimage.ai/my-app/abc123xyz0-img-00432.jpg

Pass a meaningful filename form field at upload time. Use hyphens as separators.

Project names are immutable

A project name is permanent. Renaming would break every published URL, so the dashboard does not allow it. Pick carefully during aura init or MCP install.

Reserved names (cannot be used as a project name): api, admin, cdn, health, registry, static, test, v1.

Caching behavior

VisibilityCache-ControlEdge cache
Publicpublic, max-age=31536000, immutableYes — first request transforms, every subsequent request hits the edge.
Private (?token=)private, max-age=300No — every request bypasses the shared edge cache and hits origin.

Cache tags are set on every public response so you can purge surgically:

TagApplies to
project-<projectName>Every public image in the project.
fit-facePublic images served with fit=face.
fit-autoPublic images served with fit=auto.

Purge a single project from the dashboard without affecting any other project, and re-render smart-cropped variants without invalidating exact-size crops.

Response headers

Every successful image response carries:

HeaderValuesMeaning
X-Aura-CacheHIT | MISSWhether the edge cache served this response.
X-Aura-Smart-CropokSet only when fit=face / fit=auto produced a crop. Absent on fallback.
Server-Timingsee belowPer-stage timings, set on both hits and misses.
VaryAcceptRequired for correct format negotiation caching.

Server-Timing

A standard Server-Timing header lets you measure delivery in DevTools or RUM without any custom instrumentation.

On a cache hit:

Server-Timing: cache;desc="HIT";dur=<ms>

On a cache miss:

Server-Timing: cache;desc="MISS";dur=<ms>, r2;dur=<ms>, process;desc="transformed";dur=<ms>

Pass-through misses (no transformation needed) report process;desc="passthrough";dur=0.

StageWhat it measures
cacheEdge cache lookup.
r2Origin object fetch from R2.
processTransformation (resize, format conversion, smart crop). passthrough when the master is served as-is.

Open Chrome DevTools → Network → click any image response → Timing tab to see these stages plotted alongside browser timings.