Image Checksum
GET /api/image/checksum
Returns a perceptual hash of the current rendered frame for a scene, as a 16-character hexadecimal string. Perceptual (rather than cryptographic / pixel-perfect) so that minor codec / colour drift doesn't trip the comparison — useful for visual-regression checks where two near-identical frames should compare equal but a meaningful change should not.
Pairs with /api/image/checksum/compareorstore for stored-reference workflows.
Parameters:
| Parameter | Required | Description |
|---|---|---|
scene |
No | Scene name. If omitted, uses the topmost scene. |
Response:
200 OK— JSON:{ "checksum": "A1B2C3D4E5F60718" }503 Service Unavailable— JSON:{ "error": "No rendered frame available" }when the scene has not produced a frame yet.
GET /api/image/checksum/compareorstore
Compares the current rendered scene's perceptual hash against a stored reference identified by step. If no reference exists for that step name yet, the current hash is stored as the new reference (so the first call to a step is always a "store"; subsequent calls compare against it). Stored references live in-memory for the lifetime of the running Composer session.
The natural workflow is for autotest / regression scripts: drive the project to a known state, call compareorstore?step=intro to seed a baseline, then re-run the test and call the same URL to confirm the rendered output still matches.
Parameters:
| Parameter | Required | Description |
|---|---|---|
scene |
No | Scene name. If omitted, uses the topmost scene. |
step |
Yes | Reference name to compare against or store. |
Response:
200 OK— JSON:{ "match": true, "step": "intro" }.matchistruewhen the current frame matches the stored reference (or when this call stored a new reference).falseonly when a reference existed and the current frame differs from it.400 Bad Request— JSON:{ "error": "Missing required 'step' query parameter" }.