Upload a customer photo using a 3-step signed-URL flow. Returns a fileId used when creating generations.
Overview
Step 1: Prepare Upload
POST /public/prepare-upload
No body required.
curl -X POST "https://your-store.myshopify.com/apps/proxy_genlook-x/public/prepare-upload"
Response
Short-lived signed URL for uploading directly to cloud storage.
Opaque key identifying this upload. Pass it to the complete step.
{
"uploadUrl": "https://storage.googleapis.com/bucket-name/tmp/abc123?X-Goog-Signature=...",
"uploadKey": "tmp/abc123"
}
Step 2: Upload to Storage
PUT the raw file directly to the signed URL. This goes to cloud storage, not through the app proxy.
Send raw bytes with Content-Type: application/octet-stream.
Supported formats: JPEG, PNG, WebP, HEIC/HEIF. Max size: 20 MB.
curl -X PUT "${UPLOAD_URL}" \
-H "Content-Type: application/octet-stream" \
--data-binary @customer-photo.jpg
Step 3: Complete Upload
POST /public/upload-complete
Notify the backend to validate and process the image. Processing includes HEIC-to-JPEG conversion, HDR-to-SDR, and auto-crop to 4:5 aspect ratio centered on the detected person.
The uploadKey from Step 1.
curl -X POST "https://your-store.myshopify.com/apps/proxy_genlook-x/public/upload-complete" \
-H "Content-Type: application/json" \
-d '{ "uploadKey": "tmp/abc123" }'
Response
Unique identifier for the processed file. Use this when creating generations.
Signed URL for previewing the processed image.
{
"fileId": "customer-media/acc_123/file_abc123xyz.jpg",
"fileUrl": "https://storage.googleapis.com/bucket-name/customer-media/acc_123/file_abc123xyz.jpg?X-Goog-Signature=...",
"message": "Image processed successfully"
}