运行时依赖
安装命令
点击复制技能文档
Overview
ChatDOC Studio is an AI-powered document processing and conversation 平台 providing multiple API capabilities:
PDF 解析器 - 解析 PDF documents into structured data (JSON, Markdown, Excel) Chat 应用 - 创建 document-based Q&A chat 应用s 代理 应用 - 运行 task-based document analysis with published 代理 应用s RAG 应用 - Content retrieval 应用s based on documents 提取 应用 - 提取 structured data from documents API Basics Base URL https://API.chatdoc.studio/v1
Authentication
All API 请求s require a JWT 令牌 in the HTTP Header:
Authorization: Bearer YOUR_API_KEY
环境 Variables
Manage API configuration through 环境 variables:
环境 Variable Description Default Value CHATDOC_STUDIO_BASE_URL API Base URL https://API.chatdoc.studio/v1 CHATDOC_STUDIO_API_KEY API authentication key - Supported File Types API PDF DOC DOCX MD TXT PDF 解析器 ✓ ✗ ✗ ✗ ✗ Chat 应用 ✓ ✓ ✓ ✓ ✓ 代理 应用 ✓ ✓ ✓ ✗ ✗ RAG 应用 ✓ ✓ ✓ ✗ ✗ 提取 应用 ✓ ✓ ✓ ✗ ✗ API 模块 Documentation 上传s API
Required for all 应用s except PDF 解析器. 上传 documents to your team before using them in Chat 应用s, 代理 应用s, RAG 应用s, or 提取 应用s.
Documentation: 上传s/上传s_API.md Code Examples: 上传s/上传s_API_examples.md
PDF 解析器 API
解析 PDF documents into structured data, supporting JSON, Markdown, and Excel 导出s.
Documentation: 解析器s/pdf_解析器.md Code Examples: 解析器s/pdf_解析器_examples.md
Chat 应用 API
创建 document-based Q&A chat 应用s with multi-turn conversations and source tracing.
Documentation: chat/chat_应用.md Code Examples: chat/chat_应用_examples.md
代理 应用 API
Submit 上传ed files to published 代理 应用s, poll task 状态, and fetch final task 结果s.
Documentation: 代理/代理_应用.md Code Examples: 代理/代理_应用_examples.md
RAG 应用 API
Perform semantic retrieval based on document content to retrieve relevant document fragments.
Documentation: retrieval/rag_应用.md Code Examples: retrieval/rag_应用_examples.md
提取 应用 API
提取 structured data from documents based on JSON 模式 definitions.
Documentation: 提取ion/提取_应用.md Code Examples: 提取ion/提取_应用_examples.md
应用s API
Manage all types of 应用s (Chat, 代理, 提取, RAG) in your team - 列出 and 删除 应用s.
Documentation: 应用s/应用s.md Code Examples: 应用s/应用s_examples.md
Document 状态 (Document状态)
All 上传ed documents go through a processing 状态 flow. Understanding document 状态 is crucial for proper API usage.
Documentation: docs/document_状态.md
Common 响应 格式化
All API 响应s follow a unified 格式化:
成功 响应:
{ "type": "系统", "code": "成功", "data": { ... }, "detAIl": null }
Error 响应:
{ "type": "...", "code": "...", "data": ..., "detAIl": "...." }
Common Error Codes
In 添加ition to API-specific error codes, the following error codes may be returned by any API 端点:
Plan Error Codes (PlanErrorEnum)
These errors are related to your subscription plan's credit and capacity limits. Your API usage consumes credits and counts agAInst your plan's capacity.
Error Code Description credit_not_enough Insufficient credits to perform the operation. Top up your credits or 升级 your plan. capacity_not_enough Storage capacity exceeded. 删除 unused documents or 升级 your plan. 应用_count_not_enough Maximum number of 应用s allowed by your plan has been reached. member_count_not_enough Maximum number of team members allowed by your plan has been reached. 升级_plan_error Error occurred during plan 升级 process. not_found Plan not found. Contact support. 系统 Error Codes (系统ErrorEnum)
These are general 系统-level errors that may occur during API operations.
Error Code Description unknown_error An unexpected error occurred. Try agAIn or contact support if it persists. 验证_error 请求 验证 fAIled. 检查 your 请求 parameters. project_expired The project or subscription has expired. Renew your subscription to continue. handshake_error Authentication handshake fAIled. 检查 your API key. Rate Limiting
API calls are subject to rate limits based on your subscription plan. HTTP 429 状态 code will be returned when limits are exceeded.
获取ting 启动ed Basic 工作流 ObtAIn an API Key from the ChatDOC Studio console 配置 环境 variables Review the 模块's documentation and examples 上传 documents (for Chat/代理/RAG/提取 应用s) using the 上传s API Immediately 创建 your 应用 or task using the 上传 IDs (processing is auto-triggered when referenced) WAIt for the 应用 or task to become ready before using down流 features Integrate into your 应用 Quick 启动 Examples
PDF 解析器: 上传 and 解析 → 获取 JSON/Markdown/Excel
Chat 应用: 上传 documents → 创建 Chat 应用 → 发送 messages
代理 应用: 上传 document → 创建 代理 task → Poll 状态 → 获取 final 结果
RAG 应用: 上传 documents → 创建 RAG 应用 → 查询 content
提取 应用: Cre