Updated on 2024-09-04 GMT+08:00

OCR SDK Overview

SDK Introduction

Optical Character Recognition (OCR) detects and extracts text from images or scanned copies and converts the text into an editable format, freeing you from burdensome manual input while improving the efficiency of your business.

OCR provides services through open APIs. You can obtain inference results by accessing and calling APIs in real time, significantly improving the efficiency of your business.

OCR SDK encapsulates RESTful APIs provided by OCR to simplify development. You can directly call API functions provided by OCR SDKs to use OCR.

The developer guides for SDKs in various programming languages are as follows:

Table 1 Developer guides for SDKs in various programming languages

Programming Language

Developer Guide

Java

Java SDK Developer Guide

Python

Python SDK Developer Guide

Node.js

Node.js SDK Developer Guide

PHP

PHP SDK Developer Guide

C++

C++ SDK Developer Guide

Go

Go SDK Developer Guide

NET

NET SDK Developer Guide

Automatic Generation of Sample SDK Code

API Explorer allows for API search and platform debugging, with features such as quick and comprehensive search, visual debugging, access to help documentation, and online consultation.

You only need to modify API parameters in the API Explorer to automatically generate the corresponding sample code. In addition, you can build, debug, and run code in CloudIDE.

Figure 1 API Explorer

Mapping Between Services and APIs

Table 2 lists the mappings between OCR services and APIs.

Table 2 Mapping between services and APIs

Service

API

ID Document

POST /v2/{project_id}/ocr/id-document

General Table

POST /v2/{project_id}/ocr/general-table

General Text

POST /v2/{project_id}/ocr/general-text

Web Image

POST /v2/{project_id}/ocr/web-image

Passport

POST /v2/{project_id}/ocr/passport

Thailand ID Card

POST /v2/{project_id}/ocr/thailand-id-card

Cambodian ID Card

POST /v2/{project_id}/ocr/cambodian-idcard

Myanmar ID Card

POST /v2/{project_id}/myanmar-id-card

Myanmar Driving License

POST /v2/{project_id}/ocr/myanmar-driver-license

Chile ID Card

POST /v2/{project_id}/ocr/chile-id-card

Vietnam ID Card

POST /v2/{project_id}/ocr/vietnam-id-card

Thailand Plate Number

POST /v2/{project_id}/ocr/thailand-license-plate