tencent cloud

Cloud Object Storage

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Use Cases
Strengths
Concepts
Regions and Access Endpoints
Specifications and Limits
Service Regions and Service Providers
Billing
Billing Overview
Billing Method
Billable Items
Free Tier
Billing Examples
Viewing and Downloading Bill
Payment Overdue
FAQs
Getting Started
Console
Getting Started with COSBrowser
User Guide
Creating Request
Bucket
Object
Data Management
Batch Operation
Global Acceleration
Monitoring and Alarms
Operations Center
Data Processing
Content Moderation
Smart Toolbox
Data Processing Workflow
Application Integration
User Tools
Tool Overview
Installation and Configuration of Environment
COSBrowser
COSCLI (Beta)
COSCMD
COS Migration
FTP Server
Hadoop
COSDistCp
HDFS TO COS
GooseFS-Lite
Online Tools
Diagnostic Tool
Use Cases
Overview
Access Control and Permission Management
Performance Optimization
Accessing COS with AWS S3 SDK
Data Disaster Recovery and Backup
Domain Name Management Practice
Image Processing
Audio/Video Practices
Workflow
Direct Data Upload
Content Moderation
Data Security
Data Verification
Big Data Practice
COS Cost Optimization Solutions
Using COS in the Third-party Applications
Migration Guide
Migrating Local Data to COS
Migrating Data from Third-Party Cloud Storage Service to COS
Migrating Data from URL to COS
Migrating Data Within COS
Migrating Data Between HDFS and COS
Data Lake Storage
Cloud Native Datalake Storage
Metadata Accelerator
GooseFS
Data Processing
Data Processing Overview
Image Processing
Media Processing
Content Moderation
File Processing Service
File Preview
Troubleshooting
Obtaining RequestId
Slow Upload over Public Network
403 Error for COS Access
Resource Access Error
POST Object Common Exceptions
API Documentation
Introduction
Common Request Headers
Common Response Headers
Error Codes
Request Signature
Action List
Service APIs
Bucket APIs
Object APIs
Batch Operation APIs
Data Processing APIs
Job and Workflow
Content Moderation APIs
Cloud Antivirus API
SDK Documentation
SDK Overview
Preparations
Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Flutter SDK
Go SDK
iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
React Native SDK
Mini Program SDK
Error Codes
Harmony SDK
Endpoint SDK Quality Optimization
Security and Compliance
Data Disaster Recovery
Data Security
Cloud Access Management
FAQs
Popular Questions
General
Billing
Domain Name Compliance Issues
Bucket Configuration
Domain Names and CDN
Object Operations
Logging and Monitoring
Permission Management
Data Processing
Data Security
Pre-signed URL Issues
SDKs
Tools
APIs
Agreements
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Submitting Tasks

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2026-01-09 22:30:47

Feature Overview

Submit a card OCR task.

Authorization Guide

When submitting an ID Card Recognition task using a sub-account, you need to set action to ci:CreateMediaJobs in the authorization policy. For all operation APIs supported by Cloud Infinite, please refer to action.
Also, you need to grant the cam:PassRole permission for role passing, making it easy for the asynchronous processing API to perform read and write operations on COS resource through CAM's "role".

Service Activation

Using this feature requires enabling Cloud Infinite in advance and binding a bucket. For details, see Binding CI.
Using this feature requires enabling AI Content Recognition service in advance through console or API.

Use Limits

When using this API, please first confirm the relevant restrictions. For details, see Specifications and Limits.

Fee Description

This API is a paid service. The incurred costs will be collected by Cloud Infinite. For detailed billing information, see Content Recognition Expenses.

Request

Request Sample

POST /jobs HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Content-Length: <length>
Content-Type: application/xml

<body>
Note:
Authorization: Auth String. For details, see Request Signature documentation.
When used with a sub-account, the required permissions must be granted. For details, see Authorization Granularity Details.

Request Header

This API only uses common request headers. For details, see Common Request Headers documentation.

Request Body

The implementation of this request operation requires the following request body.
<Request>
<Tag>ImageLicenseRec</Tag>
<Input>
<Object>input/test.doc</Object>
</Input>
<Operation>
<ImageLicenseRec>
<CardType>IDCard</CardType>
</ImageLicenseRec>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
<CallBack>http://callback.demo.com</CallBack>
<CallBackFormat>JSON</CallBackFormat>
</Request>
The data content is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Request
None
Container for saving requests
Container
Yes
The data description of container Request is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Tag
Request
Tag for creating a task: ImageLicenseRec
String
Yes
Input
Request
Object information to be operated
Container
Yes
Operation
Request
Operation rules
Container
Yes
CallBackFormat
Request
Task callback format, JSON or XML, default XML, which has a higher priority than the callback format of the queue
String
No
CallBackType
Request
Task callback type, URL or TDMQ, default URL, which has a higher priority than the callback type of the queue
String
No
CallBack
Request
Task callback address, which has a higher priority than the callback address of the queue. When set to "no", the callback address will not trigger a callback.
String
No
CallBackMqConfig
Request
Task callback TDMQ configuration, required when CallBackType is TDMQ. For details, see CallBackMqConfig.
Container
No
The data description of container Input is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Object
Request.Input
File path
String
Yes
The data description of container Operation is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
ImageLicenseRec
Request.Operation
Card OCR task parameters
Container
Yes
UserData
Request.Operation
Pass through user information in printable ASCII code, with length not exceeding 1024
String
No
JobLevel
Request.Operation
Task priority, level limit: 0, 1, 2. Higher level indicate higher task priority, default is 0.
String
No
The data description of container ImageLicenseRec is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
CardType
Request.Operation.ImageLicenseRec
Card OCR type, value is:
IDCard: refers to identity card
DriverLicense: refers to driving license
String
Yes

Response

Response Header

This API only returns common response headers. For details, see Common Response Headers documentation.

Response Body

The response body is returned as application/xml. An example including the complete node data is shown below:
<Response>
<JobsDetail>
<Code>Success</Code>
<Message/>
<JobId>ac7c990a00bf211ed946af9e0691f2b7a</JobId>
<State>Submitted</State>
<CreationTime>2022-06-27T14:44:10+0800</CreationTime>
<StartTime>-</StartTime>
<EndTime>-</EndTime>
<QueueId>pcd463e1467964d39ad2d3f66aacd8199</QueueId>
<Tag>ImageLicenseRec</Tag>
<Input>
<BucketId>test-123456789</BucketId>
<Object>input/test.jpg</Object>
<Region>ap-chongqing</Region>
</Input>
<Operation>
<ImageLicenseRec>
<CardType>IDCard</CardType>
</ImageLicenseRec>
<ImageLicenseRecResult>
<Code>Success</Code>
<State>Success</State>
<InputObjectName>input/test.jpg</InputObjectName>
<InputObjectUrl>https://test-123456789.cos.ap-chongqing.myqcloud.com/input/test.jpg</InputObjectUrl>
<Status>1</Status>
<IdInfo>
<Name>Name</Name>
<DetectedText>xxx</DetectedText>
<Score>99</Score>
<Location>
<Point>553,439</Point>
<Point>553,576</Point>
<Point>989,576</Point>
<Point>989,439</Point>
</Location>
</IdInfo>
<IdInfo>
<Name>Gender</Name>
<DetectedText>Male</DetectedText>
<Score>98</Score>
<Location>
<Point>541,597</Point>
<Point>541,723</Point>
<Point>798,723</Point>
<Point>798,597</Point>
</Location>
</IdInfo>
<IdInfo>
<Name>Ethnicity</Name>
<DetectedText>Han</DetectedText>
<Score>98</Score>
<Location>
<Point>1032,599</Point>
<Point>1032,725</Point>
<Point>1265,725</Point>
<Point>1265,599</Point>
</Location>
</IdInfo>
<IdInfo>
<Name>Birth (Date)</Name>
<DetectedText>December 1, 1974</DetectedText>
<Score>99</Score>
<Location>
<Point>532,748</Point>
<Point>532,906</Point>
<Point>1346,906</Point>
<Point>1346,748</Point>
</Location>
</IdInfo>
<IdInfo>
<Name>Address</Name>
<DetectedText>Hu’nan Province xxxxx</DetectedText>
<Score>99</Score>
<Location>
<Point>534,931</Point>
<Point>534,1253</Point>
<Point>1587,1253</Point>
<Point>1587,931</Point>
</Location>
</IdInfo>
<IdInfo>
<Name>Identification Number (ID Number)</Name>
<DetectedText>43xxxx</DetectedText>
<Score>99</Score>
<Location>
<Point>842,1372</Point>
<Point>842,1615</Point>
<Point>2284,1615</Point>
<Point>2284,1372</Point>
</Location>
</IdInfo>
<ImageLicenseRecResult>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
</JobsDetail>
</Response>
The data content is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None
Container for saving results
Container
The content of container node Response:
Node Name (Keyword)
Parent Node
Description
Type
JobsDetail
Response
Task detailed information
Container
The content of container node JobsDetail:
Node Name (Keyword)
Parent Node
Description
Type
Code
Response.JobsDetail
Error code, which takes effect when State is Failed
String
Message
Response.JobsDetail
Error description, which takes effect when State is Failed
String
JobId
Response.JobsDetail
ID of the newly created task
String
Tag
Response.JobsDetail
Tag for the newly created task: ImageOCR
String
State
Response.JobsDetail
Task status, which can be one of the following: Submitted, Running, Success, Failed, Pause, Cancel
String
CreationTime
Response.JobsDetail
Task creation time
String
StartTime
Response.JobsDetail
Task start time
String
EndTime
Response.JobsDetail
Task end time
String
QueueId
Response.JobsDetail
Queue ID of the task
String
Input
Response.JobsDetail
Same as Request.Input in the request
Container
Operation
Response.JobsDetail
Operation rule
Container
The content of container node Operation:
Node Name (Keyword)
Parent Node
Description
Type
ImageLicenseRec
Response.JobsDetail.Operation
Same as Request.Operation.ImageLicenseRec in the request
Container
ImageLicenseRecResult
Response.JobsDetail.Operation
Card OCR result
Container
UserData
Response.JobsDetail.Operation
Pass through user information
String
JobLevel
Response.JobsDetail.Operation
Task priority
String
The content of container node ImageLicenseRecResult:
Node Name (Keyword)
Parent Node
Description
Type
State
Response.JobsDetail.Operation.ImageLicenseRecResult
Current node's task status, either Success or Failed
Container
Code
Response.JobsDetail.Operation.ImageLicenseRecResult
Error code, which takes effect when State is Failed
Container
Message
Response.JobsDetail.Operation.ImageLicenseRecResult
Error description, which takes effect when State is Failed
Container
InputObjectName
Response.JobsDetail.Operation.ImageLicenseRecResult
Current node's input object name
String
InputObjectUrl
Response.JobsDetail.Operation.ImageLicenseRecResult
Current node's input object URL
String
Status
Response.JobsDetail.Operation.ImageLicenseRecResult
Card OCR result
1: Result is detected
0: No result is detected
String
IdInfo
Response.JobsDetail.Operation.ImageLicenseRecResult
Card OCR information
Container
The content of container node IdInfo:
Node Name (Keyword)
Parent Node
Description
Type
Name
Response.JobsDetail.Operation.ImageLicenseRecResult.IdInfo
Field name
String
Score
Response.JobsDetail.Operation.ImageLicenseRecResult.IdInfo
Confidence degree of the field, value range: [0-100], the higher the value, the higher the probability
Integer
Location
Response.JobsDetail.Operation.ImageLicenseRecResult.IdInfo
Coordinate of the field
Container
DetectedText
Response.JobsDetail.Operation.ImageLicenseRecResult.IdInfo
Field content
String
The content of container node Location:
Node Name (Keyword)
Parent Node
Description
Type
Point
Response.JobsDetail.Operation.ImageLicenseRecResult.IdInfo.Location
Coordinate point (X coordinate, Y coordinate)
String

Error Codes

This request returns common error responses and error codes. For more information, see Error Codes.

Practical Example

Request

POST /jobs HTTP/1.1
Authorization: q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=28e9a4986df11bed0255e97ff90500557e0ea057
Host: test-1234567890.ci.ap-beijing.myqcloud.com
Content-Length: 166
Content-Type: application/xml

<Request>
<Tag>ImageLicenseRec</Tag>
<Input>
<Object>input/test.jpg</Object>
</Input>
<Operation>
<ImageLicenseRec>
<CardType>IDCard</CardType>
</ImageLicenseRec>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
<CallBack>http://callback.demo.com</CallBack>
<CallBackFormat>JSON</CallBackFormat>
</Request>

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 230
Connection: keep-alive
Date: Mon, 28 Jun 2022 15:23:12 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****

<Response>
<JobsDetail>
<Code>Success</Code>
<Message/>
<JobId>ac7c990a00bf211ed946af9e0691f2b7a</JobId>
<State>Submitted</State>
<CreationTime>2022-06-27T14:44:10+0800</CreationTime>
<StartTime>-</StartTime>
<EndTime>-</EndTime>
<QueueId>pcd463e1467964d39ad2d3f66aacd8199</QueueId>
<Tag>ImageLicenseRec</Tag>
<Input>
<BucketId>test-123456789</BucketId>
<Object>input/test.jpg</Object>
<Region>ap-chongqing</Region>
</Input>
<Operation>
<ImageLicenseRec>
<CardType>IDCard</CardType>
</ImageLicenseRec>
<ImageLicenseRecResult>
<Code>Success</Code>
<State>Success</State>
<InputObjectName>input/test.jpg</InputObjectName>
<InputObjectUrl>https://test-123456789.cos.ap-chongqing.myqcloud.com/input/test.jpg</InputObjectUrl>
<Status>1</Status>
<IdInfo>
<Name>Name</Name>
<DetectedText>xxx</DetectedText>
<Score>99</Score>
<Location>
<Point>553,439</Point>
<Point>553,576</Point>
<Point>989,576</Point>
<Point>989,439</Point>
</Location>
</IdInfo>
<IdInfo>
<Name>Gender</Name>
<DetectedText>Male</DetectedText>
<Score>98</Score>
<Location>
<Point>541,597</Point>
<Point>541,723</Point>
<Point>798,723</Point>
<Point>798,597</Point>
</Location>
</IdInfo>
<IdInfo>
<Name>Ethnicity</Name>
<DetectedText>Han</DetectedText>
<Score>98</Score>
<Location>
<Point>1032,599</Point>
<Point>1032,725</Point>
<Point>1265,725</Point>
<Point>1265,599</Point>
</Location>
</IdInfo>
<IdInfo>
<Name>Birth (Date)</Name>
<DetectedText>December 1, 1974</DetectedText>
<Score>99</Score>
<Location>
<Point>532,748</Point>
<Point>532,906</Point>
<Point>1346,906</Point>
<Point>1346,748</Point>
</Location>
</IdInfo>
<IdInfo>
<Name>Address</Name>
<DetectedText>Hu’nan Province xxxxx</DetectedText>
<Score>99</Score>
<Location>
<Point>534,931</Point>
<Point>534,1253</Point>
<Point>1587,1253</Point>
<Point>1587,931</Point>
</Location>
</IdInfo>
<IdInfo>
<Name>Identification Number (ID Number)</Name>
<DetectedText>43xxxx</DetectedText>
<Score>99</Score>
<Location>
<Point>842,1372</Point>
<Point>842,1615</Point>
<Point>2284,1615</Point>
<Point>2284,1372</Point>
</Location>
</IdInfo>
<ImageLicenseRecResult>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
</JobsDetail>
</Response>


Ajuda e Suporte

Esta página foi útil?

comentários