- Print
- PDF
CLOVA OCR VM proxy linkage guide
- Print
- PDF
CLOVA OCR VM proxy linkage guide
Linkage with API Gateway is required in the process of using the CLOVA OCR product.
The VM proxy linkage guide provides information on the IP to be managed with the whitelist for the use of the CLOVA OCR product within the company's internal network, or information for controlling it through the API Gateway invoke URL.
In addition, the guide describes how to avoid exposing the secret key for calling the CLOVA OCR product.
NAVER Cloud Platform recommends the method of linking and calling the CLOVA OCR VM proxy through the process below.
The IP information assigned to the API Gateway invoke URL is subject to change.
You can configure it as shown below.
Create VM
Refer to Getting started with Server for more details about creating a VM.
Configure NGINX proxy
Add the following settings to the nginx.config file, and then start the service.
server {
....
location /ocrproxy {
proxy_set_header x-ocr-secret {your secret key};
rewrite ^/ocrproxy/(.*)$ break;
proxy_pass {your api gw Invoke url};
....
}
Examples
Request examples
curl -XPOST 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 examples
You can view the examples of responses for each domain in Text OCR/template response examples and Document response examples.