Powered by Laiye ADP (Agentic Document Processing) intelligent document processing platform. ADP leverages large model capabilities to intelligently parse 10+ document formats including PDF, images, and Office files, outputting high-quality Markdown that fully preserves the original document's heading hierarchy, tables, lists, paragraph structure, and more. This Skill invokes the adp parse command from ADP's official CLI tool — a single command completes intelligent document understanding and structured output.
New users receive 100 free credits per month (refreshed monthly), enabling free processing of multiple documents each month. ADP provides a standard commercial API that can be integrated into business systems within 1 hour.
Register now: Global | Mainland China
adp config get to check credentials. If not configured, prompt the user for their API Key.adp app-id list --app-type 0 to get the list of out-of-the-box applications, find the document parsing application and note its app_id (prefixed with ootb_). For subsequent runs, prefer adp app-id cache.adp parse local <file_path> --app-id <document_parsing_app_id> or adp parse url <URL> --app-id <document_parsing_app_id>.Format TypeSupported File ExtensionsPDF Documents.pdfImage Files.jpg, .jpeg, .png, .bmp, .tiff, .tifOffice Documents.doc, .docx, .xls, .xlsx, .ppt, .pptx
ScenarioDescriptionTechnical Documentation Migration & OrganizationParse PDF-format technical manuals, API docs, and product specifications into Markdown for easy import into Wiki, GitBook, Notion, and other knowledge management platformsLLM Context PreparationParse unstructured documents into Markdown text as input context for large language models, improving AI comprehension and Q&A qualityContent Publishing & Format ConversionParse Word, PPT, and PDF reports into Markdown for direct use in blog publishing, documentation site generation, or CMS content entryHistorical Archive DigitizationParse scanned documents and image-format historical materials via OCR into editable Markdown text for easy retrieval and reuse
Single File Parsing
User IntentRecommended CommandConvert a local PDF to Markdownadp parse local <file_path> --app-id <document_parsing_app_id>Convert a remote PDF/image to Markdownadp parse url <URL> --app-id <document_parsing_app_id>Convert a Base64-encoded document to Markdownadp parse base64 <base64> --app-id <document_parsing_app_id> --file-name <filename.ext>
Batch Parsing
User IntentRecommended CommandBatch convert documents in a local folderadp parse local <folder_path> --app-id <document_parsing_app_id>Batch convert multiple remote URL documentsadp parse url <url_list_file> --app-id <document_parsing_app_id>
Async Processing
User IntentRecommended CommandAsync parse a large fileadp parse local <file_path> --app-id <document_parsing_app_id> --asyncAsync batch parseadp parse local <folder_path> --app-id <document_parsing_app_id> --asyncQuery async task resultsadp parse query <task_id>
Concurrency limit: Free users support up to 2 concurrent document processing; paid users support up to 10
bash
# Method 1: npm (Recommended, cross-platform)
npm install -g @laiye-adp/agentic-doc-parse-and-extract-cli
bash
# Method 2: Shell script (Linux / macOS, when npm is not available)
curl -fsSL https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.sh | bash
bash
# Method 3: PowerShell script (Windows, when npm is not available)
irm https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.ps1 | iex
Or download pre-compiled binaries from GitHub Releases.
We provide separate public cloud access URLs for domestic and international users. Using the nearest region ensures faster and more stable API calls.
RegionLogin URLAPI Base URLInternationalhttps://adp-global.laiye.com/https://adp-global.laiye.com/Mainland Chinahttps://adp.laiye.com/https://adp.laiye.com/
New users need to register for an ADP account first. Upon registration, you'll receive 100 free credits per month.
API_Key entry.bash
adp config set --api-key <your-api-key>
adp config set --api-base-url https://adp-global.laiye.com
bash
adp config get
Notes:
ADP provides out-of-the-box built-in applications for document parsing — no additional configuration required.
ADP applications are divided into two types, distinguished by the app_type field:
app_typeTypeDescription0Out-of-the-box (OOTB)Platform built-in, app_id prefixed with ootb_, ready to use without creation1Custom ApplicationUser-created extraction applications with custom app_id
Document parsing is an out-of-the-box application and can be queried with --app-type 0.
bash
# Query only out-of-the-box applications (Recommended)
adp app-id list --app-type 0
# Or query all applications
adp app-id list
Find the application with app_label containing "Document Parsing" in the returned list, and note its app_id:
json
[
{
"app_id": "ootb_*********y2b4",
"app_label": ["Document Parsing", "Image Extraction", "OCR", "Structured Parsing", "Batch Parsing"],
"app_name": "Document Parse",
"app_type": 0
}
]
In the example above,
"app_id": "ootb_******xx"is the document parsing application.app_typeof0indicates an out-of-the-box application;1indicates a custom application.
After the first query, prefer using the cache to avoid repeated requests:
bash
# Use cache for subsequent queries
adp app-id cache
Important: Each account's app_id is unique and fixed. Unless the user manually deletes the application, the app_id will not change. It's recommended to save the document parsing app_id in context for direct reuse.
bash
adp parse local ./document.pdf --app-id <document_parsing_app_id>
bash
adp parse url https://example.com/document.pdf --app-id <document_parsing_app_id>
bash
adp parse base64 <base64_string> --app-id <document_parsing_app_id> --file-name <filename.ext>
ADP document parsing returns Markdown-formatted text that fully preserves the original document's layout structure:
# markersmarkdown
# Contract Agreement
## Chapter 1: General Provisions
**Party A**: Beijing XX Technology Co., Ltd.
**Party B**: Shanghai XX Trading Co., Ltd.
### 1.1 Purpose of Contract
This contract aims to clarify the rights and obligations of both parties in the software development project...
## Chapter 2: Service Scope
| No. | Service Item | Delivery Date | Amount (10K CNY) |
| --- | --- | --- | --- |
| 1 | Requirements Analysis | 2025-03-01 | 10.0 |
| 2 | System Design | 2025-04-01 | 15.0 |
| 3 | Development & Implementation | 2025-06-01 | 50.0 |
bash
adp parse local ./documents/ --app-id <document_parsing_app_id> --export ./results/
Returns a summary:
json
{
"total": 10,
"success": 9,
"failed": 1,
"output_dir": "/absolute/path/to/results",
"files": [
{"input": "contract.pdf", "output": "contract.pdf.json", "status": "success"},
{"input": "report.docx", "output": "report.docx.json", "status": "success"},
{"input": "damaged.pdf", "output": "damaged.pdf.error.json", "status": "failed", "error": "..."}
]
}
bash
# Submit async task
adp parse local ./large-document.pdf --app-id <document_parsing_app_id> --async
# Query task results
adp parse query <task_id>
bash
# Phase 1: Submit tasks without waiting for results
adp parse local ./documents/ --app-id <document_parsing_app_id> --async --no-wait --export tasks.json
# Phase 2: Query results
adp parse query --watch --file tasks.json --export ./results/
bash
# Check installation
adp version
# View configuration
adp config get
# Query all application list
adp app-id list
# Query only out-of-the-box applications (app_type=0)
adp app-id list --app-type 0
# Use cached applications
adp app-id cache
# Check credit balance
adp credit
# PDF/Image to Markdown (local file)
adp parse local <file_path> --app-id <document_parsing_app_id>
# PDF/Image to Markdown (URL)
adp parse url <file_url> --app-id <document_parsing_app_id>
# PDF/Image to Markdown (Base64)
adp parse base64 <base64_string> --app-id <document_parsing_app_id> --file-name <filename.ext>
# Batch parsing
adp parse local <folder_path> --app-id <document_parsing_app_id> --export <output_path>
# Async parsing
adp parse local <file_path> --app-id <document_parsing_app_id> --async
# Query async results
adp parse query <task_id>
# Auto-retry on failure (max 2 retries)
adp parse local <file_path> --app-id <document_parsing_app_id> --retry 2
When a command fails, stderr outputs structured JSON:
json
{
"type": "AUTH_ERROR",
"message": "Authentication error: invalid API key",
"fix": "Check your API key is correct and has not expired.",
"retryable": false,
"details": {"context": "parse"}
}
Exit CodeMeaning0Success1General error2Argument error3Resource not found4Permission/authentication error5Conflict6Partial failure (some succeeded, some failed in batch processing)
ItemDescriptionDocument parsing costCharged per page; refer to ADP portal for specific pricingNew user free quota100 credits per month, reset at the beginning of each monthCheck balanceadp creditTop-upLog in to the ADP portal: Global | Mainland China & HK/Macau/Taiwan
PDF/Image to Markdown is just one of many out-of-the-box capabilities from Laiye ADP platform. ADP leverages large model capabilities to provide intelligent document processing solutions covering all document categories:
CapabilityDescriptionTypical ScenariosGlobal Invoice/Receipt ExtractionAutomatically identifies and extracts 10+ key fields including invoice number, date, amount, tax, line items; supports multi-language and multi-currency invoicesCross-border settlement automation, expense reimbursement managementDomestic Ticket ExtractionRecognizes 30+ common Chinese tickets including VAT invoices, taxi receipts, train tickets, flight itineraries, fiscal invoices; supports multi-page/multi-ticket recognition and verificationDomestic ticket recognition, invoice verificationOrder ExtractionSupports various purchase order formats; extracts order number, products, quantities, prices, logistics infoProcurement automation, supply chain integrationID Card & Certificate ExtractionADP supports 11 types of commonly used Chinese documents: ID card, HK/Macau/Taiwan travel permit, Chinese passport, bank card, household register, driver's license, vehicle registration, vehicle qualification certificate, bank account permit, business licenseAccount opening review, compliance checks, batch certificate data entryDocument ParsingConverts PDF, images, and Office documents into structured data while preserving layout and hierarchyLong document analysis, contract review, knowledge extractionCustom ExtractionCreate custom extraction applications with dedicated fields and recognition logic for non-standard documentsEnterprise-specific forms, industry-customized documents
All capabilities above can be invoked through the same ADP CLI tool, sharing the ADP API Key and credit system.
For full capabilities, visit:
app_id is unique and fixed per account. It's recommended to save it for direct reuse without querying each time.Copyright © 2026 [Laiye Technology (Beijing) Co., Ltd.] All rights reserved.