Skip to content

API Server Protocol

neolgu edited this page Jun 13, 2021 · 4 revisions

Split Detection Network API Protocol

Send protocol

Server address : http://sdnetapi.cf:5001/predict

The protocol uses HTTP POST method & FORM.

The image file must be sent in the HTTP

http://sdnetapi.cf:5001/predict FORM(img: img file)

Receive Protocol

In a normal case, a json file is returned.

{"pred_result": 0 or 1, "pred_probability": probability(float type) // 0: Fake, 1: Real}

Error

When sent with GET

{"msg":"Try POSTing to the /predict endpoint with an RGB image attachment"}

When image fill error

{"msg": 'File Error. Please Check file is image.'}

Clone this wiki locally