Create an upload URL
POST/v1/uploads
Returns a presigned URL for a direct PUT and an upload_id to use in POST /v1/jobs. The URL expires at expires_at; request a new one if it has passed. The file size limit is your plan's input cap.
Request
# Step 1: ask for an upload URL (must include file size)
curl -X POST https://www.photo-rescue.com/api/v1/uploads \
-H "Authorization: Bearer $PHOTORESCUE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"size": 482113}'
# Step 2: send the file to the returned url
curl -X PUT "https://uploads.photo-rescue.com/...signed-url..." \
-H "Content-Type: image/jpeg" \
-H "Content-Length: 482113" \
--data-binary @shoe.jpgResponse
{
"upload_id": "upl_5d9q0w2e",
"url": "https://uploads.photo-rescue.com/...signed-url...",
"expires_at": "2026-10-10T14:18:21Z"
}Status 200. The PUT must send the Content-Length header with exactly the same byte count as specified in the request. Use the same Content-Type as the file has.