MENU
      CLOVA OCR VM PROXY

        CLOVA OCR VM PROXY


        Article summary

        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
        2. Configure NGINX proxy

        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};
            ....
        }
        Plain text

        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"}'
        Shell

        Response example

        The following is a sample example.


        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.