Skip to content

Quickstart ​

Register a camera, send its info and upload your first snapshot in five steps.

The base URL for every request is https://camera-service.prusa3d.com.

1. Create a camera and copy the token ​

Create a camera in Prusa Connect or the Prusa app and copy the token. See getting a token.

Registration window

You have 15 minutes after creating the camera to make the first authenticated call. After that the token stops working and the camera disappears. Create a new camera if the window expires.

2. Generate a fingerprint ​

The fingerprint identifies your device. Generate it once and store it permanently on the device.

bash
FINGERPRINT=$(openssl rand -hex 16)

It must be 16 to 64 characters long. See authentication for how to derive a stable one.

3. Send camera info ​

Send device and a User-Agent

Always send device with type, firmware_version and hardware_version, and a User-Agent header. See camera info and camera types.

bash
curl -X PUT https://camera-service.prusa3d.com/v1/camera-info \
  -H "Token: $TOKEN" -H "Fingerprint: $FINGERPRINT" \
  -H "User-Agent: MyCam/1.2.0" -H "Content-Type: application/json" \
  -d '{"config":{"name":"Workshop camera","trigger_scheme":"THIRTY_SEC"},"device":{"type":"ESP32","firmware_version":"1.2.0","hardware_version":"ESP32-CAM rev1"}}'

The first authenticated call binds the fingerprint to the token permanently.

4. Upload a snapshot ​

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

The image must be at most 1 MB and the request must carry a Content-Length header (curl sets it for you).

Expected response:

json
{ "status": "OK" }

5. Keep uploading ​

Only the latest snapshot is kept. Upload a new one every 10, 30 or 60 seconds, matching the trigger_scheme you sent.

Next ​