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.

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: BiRefNet

Errors

401unauthorizedMissing or invalid token.
402payment_requiredFree tier exhausted. Add a card to continue.
413payload_too_largeImage exceeds 10 MB or 4096×4096.
422no_subject_detectedForeground could not be isolated from background.
429rate_limit_exceededSlow down. Retry-After header tells you when.
500internal_errorSomething broke on our side. Include request_id when reporting.
424fetch_failedOne 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.