Skip to main content
The checked-in Go OpenAPI and handler tests define these routes, but a usable deployment also needs the studio-asset and event-image-import adapters, authorized API-key scopes, backing state stores, and deployment configuration. Do not treat source routes or CLI help as deployment evidence. The public batchrelay CLI source provides a Smart Crop V2 folder workflow and a raw request alternative. Public HTTPS source ingestion and durable image-import commit remain fail-closed until their server adapters are configured and deployed.
An asset session is studio-scoped and carries a declared purpose and destination. The current route contract does not promise one universal session implementation for every catalog, branding, event, and template use case. Permanent records should reference Batch Relay asset IDs, never a third-party URL.
The current OpenAPI session routes are:
The current OpenAPI event-import routes are:
An import request references an asset_session_id, an expected_session_revision, and a manifest. A raw request may use either a staged or smart_crop_masters_preview manifest; the latter also carries the frozen smart_crop_manifest document. Nothing should bind to the event until the durable commit adapter rechecks the current state.

Resolution policy

Every requested output reports source pixels, output inches, effective PPI, grade, and a human message. A below-minimum override requires both an acknowledgement and a non-empty reason. Batch Relay records the actor, time, policy version, affected output, effective PPI, and reason. It does not upscale the source or suppress the warning. Use a deployment that has the required adapters and scopes. The CLI’s Smart Crop V2 folder workflow creates the session, uploads declared masters, finalizes it, and prepares the import with one stable root idempotency key:
--mapping-csv is optional. The folder must contain the declared JPEG masters. The CLI rejects an incomplete or altered manifest before any request: it requires schema version batchrelay.smart-crops/v1, coordinate space oriented-source-pixels-top-left, a producer name/version, 1–500 declared JPEGs, and matching local bytes, SHA-256, dimensions, and safe filenames. It passes the frozen Smart Crop manifest through unchanged; it does not recalculate crop rectangles. For an already-created session or a non-folder caller, the raw primitive is still available:
The asset and import lifecycle uses authoritative optimistic-concurrency revisions. The raw request bodies are:
Review returns PPI diagnostics with source pixels, output inches, effective PPI, grade, and human message. Below-minimum work requires an explicit audit override; it is not silently upscaled. Re-read the returned revision after every lifecycle step and use that value for the next review, commit, or cancel. The lower-level commands remain available for explicitly managed sessions: batchrelay assets sessions create|upload|get|finalize|cancel and batchrelay events images get|cancel. A session upload is one declared local JPEG; do not substitute a public HTTPS URL until ingestion is deployed. The CLI source currently has the folder/manifest path above, but its local build must stay in lockstep with the generated public API client before it can be released. The configured deployment is still the product gate: source ingestion from public HTTPS URLs and durable event-image commit fail closed without their corresponding server-side adapters.

Recovery

Retry uploads with the same session and idempotency key. Fix a manifest or CSV before retrying prepare. Review unresolved bindings rather than committing them. A stale commit returns a conflict, so prepare and review again with the current revisions. Cancel abandoned sessions and imports instead of reusing an expired upload grant.