API reference/POST /remove-batch-url
Remove background, batch by URL
Same shape as /remove-batch but each input is a URL we fetch. Useful when you have a list of S3/CDN-hosted images you want processed.
POSThttps://useknockout--api.modal.run/remove-batch-url
Parameters
Send as multipart/form-data unless noted otherwise.
FieldTypeDefaultDescription
urls[]requiredstring[]—Array of HTTPS URLs. Up to 10. Each fetched image ≤10 MB.
formatstringpngOutput format — png (with alpha) or webp.
Request
curl -X POST "https://useknockout--api.modal.run/remove-batch-url" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"urls":["https://example.com/a.jpg","https://example.com/b.jpg"]}'Response
HTTP/1.1 200 OK
content-type: application/json
x-knockout-latency: 2104
x-knockout-model: BiRefNetErrors
FieldTypeDefaultDescription
401unauthorized—Missing or invalid token.
402payment_required—Free tier exhausted. Add a card to continue.
413payload_too_large—Image exceeds 10 MB or 4096×4096.
422no_subject_detected—Foreground could not be isolated from background.
429rate_limit_exceeded—Slow down. Retry-After header tells you when.
500internal_error—Something broke on our side. Include request_id when reporting.
424fetch_failed—One or more source URLs failed to fetch — see results array.
Every error response also includes a
request_id in the JSON body. Quote it when reporting issues.Notes
- Per-URL errors don't fail the whole batch. Each result row reports its own status.