{"message": "Invalid image","inference_time(s)": "0.035","reason_codes": {"account_name":"Field not detected","account_number":"Field not detected","bank_branch":"Field not detected","bank_name":"Field not detected" },"status": 400}
Sample Requests
curl --location --request POST 'https://api.iapp.co.th/book-bank-ocr/file'
--header 'apikey: --- Your API Key ---'
--form 'file=@"/your/path/to/image.jpg"'
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api.iapp.co.th/book-bank-ocr/file")
.header("apikey", "--- Your API Key ---")
.field("file", new File("/your/path/to/image.jpg"))
.asString();
var client = new RestClient("https://api.iapp.co.th/book-bank-ocr/file");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("apikey", "--- Your API Key ---");
request.AddFile("file", "/your/path/to/image.jpg");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var request = require('request');
var fs = require('fs');
var options = {
'method': 'POST',
'url': 'https://api.iapp.co.th/book-bank-ocr/file',
'headers': {
'apikey': '--- Your API Key ---'
},
formData: {
'file': {
'value': fs.createReadStream('/your/path/to/image.jpg'),
'options': {
'filename': 'image.jpg',
'contentType': null
}
}
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});