Photos
Any step can capture photos in addition to its primary answer. Photos are uploaded directly from the device to Rundun's cloud storage — the API never handles photo bytes.
Photo overlay
To enable the camera on any step, set the photo field to an object:
{
"id": "s-cl01",
"type": "boolean",
"label": "Is the unit clean and ready?",
"required": true,
"photo": { "min": 1, "max": 4, "annotate": false },
"config": { "true_label": "Yes", "false_label": "No" }
}
The executor must take at least min photos before the step can be completed. The camera button appears after the primary answer is given.
| Field | Description |
|---|---|
min |
Minimum number of photos required. 0 = optional, 1+ = required. |
max |
Maximum photos allowed (1–10). |
annotate |
Drawing overlay on photos. Post-MVP feature — always false for now. |
Setting photo: false or omitting photo entirely means no camera is shown for that step (default).
Photo step type
Use type: "photo" when the primary answer itself is one or more photos — no other answer type is involved:
{
"id": "s-fp01",
"type": "photo",
"label": "Front of vehicle",
"hint": "Take a straight-on shot from 3 metres away",
"required": true,
"photo": false,
"config": { "min": 1, "max": 3, "annotate": false }
}
For photo type steps, the photo overlay field is false — the config on the step itself controls the min/max. The answer value in webhook payloads is null; the photos are in the photos array.
Upload flow
Photos use a two-phase upload to keep the API fast and the webhook payload lightweight:
-
On step completion: The device compresses the photo to a 320px wide JPEG thumbnail (~25KB each) and sends it inline in the API request that records the step answer. This thumbnail is immediately embedded in the
step.completedwebhook — no separate fetch required. -
Full-resolution upload: Simultaneously, the device requests a pre-signed upload URL from the API:
POST /v1/runs/:run_id/steps/:step_id/photos/upload-url
The device uploads the full-resolution photo directly to Rundun's cloud storage using the pre-signed URL. The API is not in the upload path — it never handles photo bytes.
- After run completion: The
run.completedwebhook includes full-resolution photo URLs instead of base64 thumbnails. By the time the run is submitted, the background uploads are typically complete.
Webhook payload shapes
In step.completed — base64 thumbnail
Available immediately when the step is answered. Approximately 25KB per photo.
"photos": [
{
"photo_index": 0,
"preview": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...",
"width": 320,
"height": 240
},
{
"photo_index": 1,
"preview": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...",
"width": 320,
"height": 240
}
]
A step with 5 photos adds approximately 125KB to the step.completed payload — acceptable for live progress tracking.
In run.completed — full-resolution media URL
Full-resolution photos uploaded from the device. At 25–50 photos per run, inline base64 would exceed 1.25MB which most receivers reject — so run.completed uses URLs instead.
"photos": [
{
"photo_index": 0,
"url": "https://media.rundun.app/runs/r-550e8400-e29b-41d4-a716-446655440000/s-dm02/photo_0.jpg"
},
{
"photo_index": 1,
"url": "https://media.rundun.app/runs/r-550e8400-e29b-41d4-a716-446655440000/s-dm02/photo_1.jpg"
}
]
URLs are stable and publicly accessible for the duration of your plan's storage retention period.
Storage
Photos are stored in Rundun's cloud storage at media.rundun.app. Each plan includes a storage allowance:
| Plan | Included storage | Approximate coverage |
|---|---|---|
| PAYG | 2 GB | ~80 runs (at 50 photos/run × 500KB) |
| Starter | 5 GB | ~6 months of included runs |
| Pro | 20 GB | ~9 months of included runs |
| Business | 100 GB | ~16 months of included runs |
Storage add-ons are available at any tier (10GB/$0.50/mo, 50GB/$2.50/mo, 200GB/$10/mo, 1TB/$50/mo). Photo count never affects run cost — run credits and storage are billed separately.
At 100% storage quota, new runs are paused. Existing data is untouched and always exportable. See Pricing for full details.
Photo estimation
| Scenario | Photos per run | Storage per run | Monthly (12 runs) |
|---|---|---|---|
| STR 1-bed turnover | ~25 | ~12.5 MB | ~150 MB |
| Car rental walkthrough | ~50 | ~25 MB | ~300 MB |
| Quick inspection | ~10 | ~5 MB | ~60 MB |
Based on 500KB per photo after device compression from typical 4MB camera output.