Tencent Cloud Ad OCR: Calling AdvertiseOCR in an Agent

Introduction

When working on content moderation, advertising compliance, or poster archiving, a common requirement is to extract readable text from an image while preserving the position of each text block in the image. Integrating an OCR SDK yourself, handling rotation and vertical text layouts, and then wrapping it into a tool callable by an Agent involves many steps and high maintenance costs. This article introduces the enterprise-grade Skill “Tencent Cloud AdvertiseOCR” on SkillHub, which wraps the Tencent Cloud AdvertiseOCR interface into a capability that Agents can invoke on-demand, enabling natural language-based “image text recognition” within conversations.

What Is This

Tencent Cloud AdvertiseOCR (identifier @tencent-adm/tencentcloud-ocr-general, current version 1.0.3) is an interface invocation skill designed for large model Agents. It is published by the Tencent Cloud OCR Team, sourced as enterprise, and categorized under design-media on SkillHub.

In one sentence: when a user needs to recognize text content from an image, the Agent should use this skill, which maps to Tencent Cloud’s AdvertiseOCR capability—not generic web crawlers or offline solutions like local Tesseract.

Official entry points:

  • API documentation page: https://api.skillhub.cn/tencent-adm/tencentcloud-ocr-general
  • SkillHub showcase page: https://www.skillhub.cn/skills/tencent-adm/tencentcloud-ocr-general

Core Features

All capabilities listed below are from the Skill’s official description; details not present in the source material are not elaborated.

  1. Language & Layout: Supports Chinese and English; recognizes text in horizontal, vertical, and skewed layouts.
  2. Rotation: Supports image recognition with 90°, 180°, and 270° rotations.
  3. Return Structure: Returns text box positions along with corresponding text content, facilitating subsequent alignment, highlighting, or structured processing.
  4. Input Methods: Supports both Base64 and URL image inputs.

The Skill tag indicates requires_api_key=true, meaning Tencent Cloud OCR-related API credentials must be configured before use. Specific key field names and configuration methods are defined in the SKILL.md within the installed package (this article did not retrieve the full package contents, so no environment variable names are fabricated here).

Installation & Activation

The installation guide provided on the SkillHub page instructs the Agent to follow the SkillHub installation and priority source configuration to install @tencent-adm/tencentcloud-ocr-general. Below are reproducible steps based on that document.

1. Check or Install SkillHub CLI

First, confirm whether skillhub is already installed on your machine:

command -v skillhub && skillhub --version

If not installed, use the official installation script (full installation includes CLI and default Skills; add --cli-only if only the CLI is needed):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

2. Install This Skill to the Current Agent’s Skills Directory

When installing, you must use --dir to point to the actual skills directory recognized by your Agent; installing to the default ./skills/ may not be loaded. Common paths listed in the official documentation are as follows (choose one based on your client):

Client Skills Directory
Claude Code ~/.claude/skills/
Cursor ~/.cursor/skills/
Codex ~/.codex/skills/ or .agents/skills/ under the project
Windsurf ~/.codeium/windsurf/skills/ or .windsurf/skills/

The installation command takes the form:

skillhub install @tencent-adm/tencentcloud-ocr-general --dir <your skills directory>

You can also search first and then install:

skillhub search tencentcloud-ocr
skillhub install @tencent-adm/tencentcloud-ocr-general --dir <your skills directory>

3. Configure API Key

The tag requires_api_key=true indicates that Tencent Cloud API keys must be configured according to the instructions in the package after installation; otherwise, API calls will fail. After configuration, refresh or restart according to each Agent’s requirements to enable the new Skill.

Typical Usage

The source material does not provide standalone CLI example scripts; the Skill is designed with the intent that when a user requests text recognition from an image during a conversation (e.g., providing an image URL, converting a local image to Base64, or uploading an image path for Agent processing), the Agent reads the SKILL instructions and calls AdvertiseOCR, returning recognition results (text + box positions) to the user or using them for subsequent steps.

Examples of reproducible interaction starting points (phrasing varies by Agent, but the core is triggering OCR intent):

  1. User provides a publicly accessible image URL and requests extraction of all text and layout information from the image.
  2. User provides Base64-encoded image data and requests recognition of Chinese-English mixed or vertically arranged advertisement images.
  3. User provides scanned images rotated by 90°/180°/270° and requests corrected recognition.

Specific request parameter names, authentication headers, and error code handling are governed by the SKILL.md in the installed package and Tencent Cloud AdvertiseOCR official API documentation.

Use Cases & Considerations

Who It’s For

  • Developers already using Cursor, Claude Code, Codex, or other Skill-supporting tools who want to perform OCR on advertisement images, posters, and material images directly within Agent workflows.
  • Scenarios requiring box-level results (not just plain text strings), such as compliance comparison and region annotation.

Usage Notes

  1. Billing & Quota: This calls the Tencent Cloud online OCR API; the corresponding product must be activated and account quotas and costs must be monitored. The Skill itself does not replace cloud-side billing rules.
  2. Key Security: requires_api_key=true; do not write SecretId, SecretKey, etc. into public repositories. Store them locally or in a key management service as recommended by the SKILL.
  3. Input Compliance: URLs must be retrievable by the server; for Base64, pay attention to size and format limits as per API documentation.
  4. Scope Boundaries: The introduction explicitly states this is for AdvertiseOCR scenarios; if the requirement is for general printed text, receipts, ID cards, or other OCR product lines, corresponding Tencent Cloud interfaces or other Skills should be selected to avoid misuse.

As of the data retrieval time, this Skill on SkillHub has a rating of 100000, 8315 downloads, and 903 installations (page data changes over time; refer to SkillHub’s real-time display).

Conclusion

Tencent Cloud AdvertiseOCR wraps AdvertiseOCR as @tencent-adm/tencentcloud-ocr-general, enabling unified Skill-based image text recognition for Chinese-English, multiple layouts, and rotation scenarios on the Agent side, returning box positions and text. Installation via SkillHub CLI and API key configuration enables integration.

  • SkillHub: https://www.skillhub.cn/skills/tencent-adm/tencentcloud-ocr-general
  • Official API Page: https://api.skillhub.cn/tencent-adm/tencentcloud-ocr-general
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye