1. OCR API 사용하기
lPostman 설치
lhttps://www.postman.com/downloads/ 로 이동하여 사용중인 PC OS 에 맞는 postman 다운로드 후 설치
l
2. API Gateway 사용 신청
. Text OCR 에서 판독할 이미지 오브젝트 스토리지에 업로드
lObject Storage 서비스 이용 신청
lObject Storage-> Bucket Management-> 버킷 생성
•버킷명 : ocredu100 (각자 입력)
•잠금설정 : 비활성화
•암호화 관리 : 비활성화
•권한 관리 : 비공개
•공개 및 권한관리 : 공개
•Object Storage 버킷에 sample_general_ocr_demo.png ,sample_insurance_claim.png 파일 업로드
•업로드 후, 2개의 파일 선택 후 상단의 편집 > 폴더/파일 공개하기 클릭
4. Text OCR API 호출
lCLOVA OCR -> Domain -> API Gateway연동 선택
lSecret Key 생성
5.POST 방식으로 APIGW Invoke URL 주소 복사 후 입력
5.Postman Headers 설정
•Content-Type : application/json
•X-OCR-SECRET : secret key 입력
API GW 설정
•Post URL : API GW Invoke URL
lTemplate OCR API 호출
lCLOVA OCR -> 템플릿 도메인의 템플릿 빌더로 이동
l템플릿 빌더의 설정 -> API Gateway연동 클릭 > 연동 버튼 클릭 > secret key 생성 클릭
8.Postman Headers 설정
•Content-Type : application/json
•X-OCR-SECRET : secret key 입력
API GW : Post URL : API Gateway Invoke URL
. Request Body 설정
•Template ID : 사용하려는 TemplateID
•오브젝트 스토리지 파일 : sample_insurance_claim.png
다음
https://brunch.co.kr/@topasvga/5001