Skip to content

Snapshots ​

PUT /v1/snapshot uploads the camera's latest JPEG image.

Upload loop ​

Request ​

Send the raw JPEG as the body, with the authentication headers.

ItemRule
BodyRaw JPEG bytes, not empty
Content-Typeimage/jpeg (image/jpg is also accepted)
Content-LengthRequired (chunked transfer is rejected)
User-AgentRequired, names your firmware and version
Maximum size1 MB
bash
curl -X PUT https://camera-service.prusa3d.com/v1/snapshot \
  -H "Token: $TOKEN" -H "Fingerprint: $FINGERPRINT" -H "User-Agent: MyCam/1.2.0" \
  -H "Content-Type: image/jpeg" --data-binary @snapshot.jpg

Response ​

Status 200:

json
{ "status": "OK" }

Only the latest snapshot is kept ​

Each upload replaces the previous one, so upload periodically while the camera is active. Upload every 10, 30 or 60 seconds, matching the config.trigger_scheme you send in camera info (TEN_SEC, THIRTY_SEC, SIXTY_SEC, TEN_MIN).

Rate limits ​

Snapshot uploads are limited to 6 uploads per minute per camera. Uploading every 10, 30 or 60 seconds stays within the limit.

Size and resolution ​

The maximum snapshot size is 1 MB. A JPEG of 1280x720 to 1920x1080 at quality 80 fits comfortably. Larger images are rejected with 413.

Handling failures ​

The full list of status codes for this endpoint, with their bodies, is in errors. In short:

  • 200 means the snapshot was accepted.
  • 400, 401, 403, 411, 413, 415, 422 mean the request is wrong. Fix it before sending again; retrying the same request gives the same answer.
  • 429 or 503 mean you are over the rate limit. Wait, then keep to the upload cadence.
  • 500 is a server error. Retry later with backoff.

Keep the fingerprint 16 to 64 characters. A fingerprint longer than 64 characters is currently rejected with a server error (500) on the first call, so do not retry: shorten it.

The first authenticated call to any endpoint, including this one, must arrive within 15 minutes of creating the camera. See getting a token.