API Documentation
Last updated
Last updated
Signature or any sort of verification text can be detected from the image.
POST
https://api.iapp.co.th/signature-detection/file/
Name | Type | Description |
---|---|---|
apikey* | String | Your API Key to call this API |
Name | Type | Description |
---|---|---|
file* | File | The binary data of the image, uploaded via POST multipart/form-data |
{
"inference_time(s)": "0.023",
"message": "success",
"signature": {
"confidence": "88.43",
"coordinates": {
"X": 30,
"X1": 235,
"Y": 349,
"Y1": 422
},
"crop": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr/2wBDAQICAgICAgUDAwUKBwYHCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgr/wAARCABJAM0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9+KK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RVCP/Vr9P61Pb9G+lAExuYQceav/fQ/xoFxCeRMn03Ci1/1f4/1qQdPxoAYZowpfeMAdQc1Bf6xp+m2UuoahexW8EMRklnnfYiKOpLHp+NA/wBZL+FeM/8ABQH/AJNG8e/9g1v/AEFKAPlG7/Zgj/4Kv/trH9of482j3vwT+G8xh+G3huWTEGv3/wD0EsZy0fsQOnev0J0fR9P8O6bDoejWsdrb28QjhiihCoOey/zxXkv7Bf8AyZh4D/7Fc/8AoTV7Lb/8e7/X/wBloAelyrgHaw3HoyMv8xUgk+YIoz15waz9M/5Clz9B/IV45+15/wAgiP8A3h/I0Ae03Gv6PaHbc6nBGxxgSShc56da5vW/2gvgd4bA/t74weGbMl9qrc65bqxJ9i+cda/J/wDak/1cP/XCP/0IV+aXjv8A5F65/wCvv/GgD+jL4h/8FWP+Ce3wruTZeL/2rvC8EuT+5gnkuG/8hK1eH+NP+Dij/gntoV+1j4Fu/GvjGcZB/wCEV8JSyg44+9IBkH3r+e39lz/ktMf/AF3P/oVfu7+w7/yDx/17RfyFAE91/wAF4Pij40uYrX9nf/gl98VtfiuDhLvUo4NOQ9cn7xYD3xTvFP7S/wDwcJ+NNSa++FP7Evw58JaYhIjsvE/il725kBPDFwOO/HbPtX374N/5BFt/17n/ANANdDbf66b/AHz/ADNAH//Z",
"message": "Detected"
},
"status": 200
}
{
"inference_time(s)": "0.031",
"message": "Not found",
"signature": {
"message": "No signature detected"
},
"status": 404
}
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"'
import requests
url = "https://api.iapp.co.th/book-bank-ocr/file"
payload={}
files=[ ('file',('image.jpg',open('/your/path/to/image.jpg','rb'),'image/jpeg')) ]
headers = { 'apikey': '--- Your API Key ---' }
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
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);
});
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.iapp.co.th/book-bank-ocr/file"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"apikey": @"--- Your API Key ---"
};
[request setAllHTTPHeaderFields:headers];
NSArray *parameters = @[
@{ @"name": @"file", @"fileName": @"/your/path/to/image.jpg" }
];
NSString *boundary = @"----WebKitFormBoundary7MA4YWxkTrZu0gW";
NSError *error;
NSMutableString *body = [NSMutableString string];
for (NSDictionary *param in parameters) {
[body appendFormat:@"--%@\r\n", boundary];
if (param[@"fileName"]) {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
[body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
if (error) {
NSLog(@"%@", error);
}
} else {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
[body appendFormat:@"%@", param[@"value"]];
}
}
[body appendFormat:@"\r\n--%@--\r\n", boundary];
NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.iapp.co.th/book-bank-ocr/file');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apikey' => '--- Your API Key ---'
));
$request->addUpload('file', '/your/path/to/image.jpg', 'image.jpg', '<Content-Type Header>');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
Fields | Type | Description |
Message | string | Signature found / Not found |
Status | int | API code |
Signature: Confidence Score | string | Confidence score of the detection |
Signature: Coordinates | string | (X, Y), (X1, Y1) coordinates of the detected signature |
Signature: Crop | string | Base64 string of the detected signature crop |
Signature: Message | string | Signature detected / Not detected |
Inference_time(s) | float | Time taken to process bank book |