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.

endpointrequiredstringPath of the endpoint you'd call (e.g. /remove, /upscale).
scaleintFor /upscale, the requested scale factor.
stroke_widthintFor /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: 4

Errors

400invalid_endpointEndpoint 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.