CLOVA OCR VM PROXY
- Print
- PDF
CLOVA OCR VM PROXY
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in Classic and VPC
This document describes how to integrate CLOVA OCR VM PROXY to use the CLOVA OCR service in-house. API Gateway integration is required to use the CLOVA OCR service.
This guide describes the following.
- How to integrate API Gateway
- How to specify control information as IP information or APIGW invoke URL to whitelist on the internal network
- How to avoid exposing the secret key required for CLOVA OCR calls
Based on the above, we recommend that you integrate CLOVA OCR VM PROXY to make API calls.
Note
The IP information assigned to the API Gateway invoke URL is subject to change.
Configuring method
The following describes how to configure it.
1. Create VM
For more information on VM creation, See Getting started with Server in NAVER Cloud Platform.
2. Configure NGINX proxy
Start the service after adding the following settings to the ngnix.config file.
server {
....
location /ocrproxy {
proxy_set_header x-ocr-secret {Secret key issued when registering the app};
rewrite ^/ocrproxy/(.*)$ break;
proxy_pass {Invoke URL issued when registering the app};
....
}
Request example
The following is a sample request.
curl -X POST http://{VM IP}/ocrproxy
-d '{"images": [{"format": "jpg","name": "proxytest","data": null,"url": "{your image url}"}],"lang": "ko","requestId": "string","timestamp": 0,"version": "V2"}'
Response example
The following is a sample example.
- General OCR response example
- Template OCR response example
- Business card OCR response example
- Business registration certificate OCR response example
- Credit card OCR response example
- Receipt OCR response example
- Passport OCR response example
- Alien registration card OCR response example
- Driver's license OCR response example
- 주민등록증 OCR 응답 예시
Was this article helpful?