### GLM-OCR API 测试示例(纯Java本地部署) ### 健康检查 GET http://localhost:9090/api/v1/health ### 文本识别 POST http://localhost:9090/api/v1/ocr/text Content-Type: application/json { "image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==", "imageType": "base64" } ### 公式识别 POST http://localhost:9090/api/v1/ocr/formula Content-Type: application/json { "image": "", "imageType": "base64" } ### 表格识别 POST http://localhost:9090/api/v1/ocr/table Content-Type: application/json { "image": "", "imageType": "base64" } ### 信息提取 POST http://localhost:9090/api/v1/ocr/extract Content-Type: application/json { "image": "", "imageType": "base64", "extractionTemplate": "{\n \"name\": \"\",\n \"id_number\": \"\",\n \"address\": \"\"\n}" } ### 通用OCR识别 POST http://localhost:9090/api/v1/ocr Content-Type: application/json { "image": "", "imageType": "base64", "taskType": "text" } ### 重新加载模型 POST http://localhost:9090/api/v1/model/reload