API reference/POST /estimate
Cost estimator
Returns the credit/dollar cost a request would incur — without spending GPU time. Use to surface a price preview to your end users.
POSThttps://useknockout--api.modal.run/estimate
Parameters
Send as multipart/form-data unless noted otherwise.
FieldTypeDefaultDescription
endpointrequiredstring—Path of the endpoint you'd call (e.g. /remove, /upscale).
scaleint—For /upscale, the requested scale factor.
stroke_widthint—For /sticker, the requested stroke width.
Request
curl -X POST "https://useknockout--api.modal.run/estimate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"endpoint":"/upscale","scale":4}'Response
HTTP/1.1 200 OK
content-type: application/json
x-knockout-latency: 4Errors
FieldTypeDefaultDescription
400invalid_endpoint—Endpoint not recognized.
Every error response also includes a
request_id in the JSON body. Quote it when reporting issues.Notes
- No GPU spend. Returns instantly.