DeepSeek OCR
deepseek_ocrExtract text from PDF, Word, PowerPoint, and image files sent as base64, returning page-by-page OCR results without storing the files.
Instructions
识别 PDF、Word、PowerPoint 文档或图片中的文字,按页返回识别结果。文件通过 base64 传入,不会存入 Files API。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fileBase64": "<fileBase64>",
"fileName": "<fileName>"
},
"name": "deepseek_ocr"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| purpose | No | text_recognition:不含图片的 Word、PowerPoint 直接提取文字,其他文件逐页识别;rich_layout_recognition:所有文件都逐页识别。 | text_recognition |
| fileName | Yes | 文件名,需保留扩展名,用于判断文件类型,例如 document.pdf、scan.png。 | |
| fileBase64 | Yes | 待识别文件的 base64 编码,支持 data URL 前缀。 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | 本次识别的 ID | |
| pages | Yes | 逐页识别结果 | |
| purpose | Yes | 请求中的 purpose | |
| page_count | Yes | 页数 |