← 返回
数据分析 Key 中文

easydoc-parse

Use when tasks need EasyDoc REST API to convert unstructured documents into structured JSON or markdown on either China EasyLink platform or global EasyDoc p...
用于需要使用EasyDoc REST API将非结构化文档转换为结构化JSON或markdown,应用于中国EasyLink平台或全球EasyDoc。
sycamore792
数据分析 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 1
Stars
📥 702
下载
💾 9
安装
1
版本
#latest

概述

EasyLink EasyDoc Parse

Overview

Use this skill to call EasyDoc async parsing APIs and return stable structured output.

Always follow the same lifecycle: select platform, validate inputs, submit task, poll result, normalize output.

RAG Retrieval

If the parsed output is being used for RAG, do not load the entire JSON file into context by default.

  1. Use grep-style search first
    • If the host agent provides a text-search tool such as Grep, Search, or equivalent "search within file content" capability, use that tool first.
    • Prefer grep-style search to locate candidate passages, headings, node ids, table markers, or metadata fields inside parsed JSON.
    • Search for user query terms, entity names, date ranges, section headers, and node type values before opening any large file.
    • Do not introduce a custom in-skill Python search script for this retrieval path.
    • Do not shell out to grep or rg if the host agent already exposes an equivalent search tool.
  1. Read only local slices
    • After the search tool identifies relevant hits, read only the matching lines or a narrow surrounding window.
    • Extract only the needed nodes, sections, or pages for downstream summarization or embedding.
  1. Escalate to full-load only when necessary
    • Load the full JSON only when the task truly requires global document structure, full-tree reconstruction, or complete export.
    • If full-load is required, say why.

Onboarding

If user has no API key, guide first:

  1. cn platform key flow
    • Open https://platform.easylink-ai.com
    • Register or sign in
    • Enter API key management page and create a key
    • Store as EASYLINK_API_KEY
  1. global platform key flow
    • Open https://platform.easydoc.sh
    • Register or sign in
    • Enter API key management page and create a key
    • Store as EASYDOC_API_KEY

When user does not specify platform, ask whether they want cn or global first.

Platform Selection

Choose platform before calling any endpoint:

  1. cn platform
    • Base URL: https://api.easylink-ai.com
    • Submit: POST /v1/easydoc/parse
    • Poll: GET /v1/easydoc/parse/{task_id}
    • File form field: files
    • Recommended modes: easydoc-parse-flash, easydoc-parse-premium
  1. global platform
    • Base URL: https://api.easydoc.sh
    • Submit: POST /api/v1/parse
    • Poll: GET /api/v1/parse/{task_id}/result
    • File form field: file
    • Recommended mode: lite

Workflow

  1. Validate request inputs
    • Require api-key from user input or secure environment variable.
    • Require parse mode when needed; if omitted in script mode, use platform default (cn: easydoc-parse-premium, global: lite).
    • Validate file type and size (<= 100MB) using platform-specific extension list.
    • If key is missing, return platform-specific onboarding steps and expected env var name.
  1. Submit async parse task
    • Use platform-specific submit URL and form-data file field.
    • Include mode.
    • Read task_id from response.
  1. Poll task status
    • Use platform-specific result endpoint.
    • Continue polling while task is pending or processing.
    • Stop on terminal status (SUCCESS, ERROR, FAILED, COMPLETED, DONE) or timeout.
  1. Normalize output
    • Keep raw response as raw.
    • Return stable envelope for downstream consumers: task_id, status, files.
  1. Handle failures predictably
    • Include task_id in error reports when available.
    • Report HTTP status and response body for API errors.
    • For parse failures, suggest mode switch or resubmission.
  1. Apply RAG-safe retrieval
    • When parsed JSON is large, use the host agent's text-search tool or equivalent grep-style retrieval before any full read.
    • Avoid pasting or loading entire parsed payloads into context unless the task depends on full-document traversal.

Quick Commands

China platform:

curl -X POST "https://api.easylink-ai.com/v1/easydoc/parse" \
  -H "api-key: $EASYLINK_API_KEY" \
  -F "files=@document.pdf" \
  -F "mode=easydoc-parse-premium"

Global platform:

curl -X POST "https://api.easydoc.sh/api/v1/parse" \
  -H "api-key: $EASYDOC_API_KEY" \
  -F "file=@demo_document.pdf" \
  -F "mode=lite"

Bundled Python helper:

python3 scripts/easydoc_parse.py --platform cn --api-key "$EASYLINK_API_KEY" \
  --mode easydoc-parse-premium --file ./document.pdf --save ./result-cn.json

python3 scripts/easydoc_parse.py --platform global --api-key "$EASYDOC_API_KEY" \
  --mode lite --file ./document.pdf --save ./result-global.json

# key can come from environment if --api-key is omitted
export EASYLINK_API_KEY="your-cn-key"
python3 scripts/easydoc_parse.py --platform cn --file ./document.pdf --save ./result-cn.json

export EASYDOC_API_KEY="your-global-key"
python3 scripts/easydoc_parse.py --platform global --file ./document.pdf --save ./result-global.json

References And Scripts

  • Read references/easydoc-rest-api.md for endpoint-level differences between cn and global.
  • Use scripts/easydoc_parse.py for deterministic submit and polling.
  • Script default output is normalized; use --output-format raw for raw payload only.
  • In RAG workflows, prefer the host agent's built-in content search tool on saved JSON results before opening large file sections.

Output Contract

{
  "task_id": "string",
  "status": "SUCCESS|ERROR|PENDING|PROCESSING|FAILED|COMPLETED|DONE",
  "files": [
    {
      "file_name": "string",
      "markdown": "string or null",
      "nodes": []
    }
  ],
  "raw": {}
}

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 17:31 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 366 📥 139,959
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 162 📥 59,672
data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 269 📥 56,890