CLOVA OCR VM proxy linkage guide
    • PDF

    CLOVA OCR VM proxy linkage guide

    • PDF

    Article Summary

    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.


    Note

    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.


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.