API
Uploads & outputs.
Send files as multipart today; presigned R2 uploads and larger limits arrive next.
Multipart
Use multipart/form-data with an image part and optional mask. The current Worker limit is 15 MB per file. The API streams the file to R2 and runs the same job pipeline.
cURL
curl https://api.erasa.app/v1/erase \
-H "Authorization: Bearer $ERASA_KEY" \
-H "Idempotency-Key: upload-001" \
-F image=@product.jpg \
-F mask=@mask.png \
-F output_format=webpJSON URLs
If your storage already exposes an HTTPS URL, send image_url and optional mask_url. URLs must be HTTPS and reachable from the provider.
Outputs
Output is stored in R2 and returned through a signed URL. The URL expires; call GET /v1/jobs/{id} to get a fresh one.
Presigned S3/R2 uploads for 50 MB originals are the next step. Until then, keep multipart files under 15 MB.