跳转到主要内容
POST
/
ai
/
service
/
v1
/
medical_recognize
医疗票据v1接口识别
curl --request POST \
  --url https://api.textin.com/ai/service/v1/medical_recognize \
  --header 'Content-Type: application/octet-stream' \
  --header 'x-ti-app-id: <api-key>' \
  --header 'x-ti-secret-code: <api-key>' \
  --data '"success"'
{
  "code": 200,
  "message": "success",
  "duration": 100,
  "version": "v1.0.0",
  "result": {
    "success_count": 1,
    "page_count": 1,
    "ppi": 144,
    "image_list": [
      {
        "image_angle": 0,
        "rotated_image_width": 1000,
        "rotated_image_height": 3000,
        "page_id": 0,
        "image_position": [
          100,
          100,
          200,
          100,
          200,
          200,
          100,
          200
        ],
        "image_base64": ""
      }
    ],
    "object_list": [
      {
        "type": "inpatient_medical_invoice",
        "page_ids": [
          0
        ],
        "image_ids": [
          0
        ],
        "type_description": "",
        "details": {
          "invoice_information": {
            "document_title_name": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "invoice_code": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "invoice_number": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "business_serial_number": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "bill_verification_code": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "issuance_date": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "total_pages_of_invoice": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "current_page_number": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            }
          },
          "patient_information": {
            "name": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "gender": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "age": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "inpatient_number": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "medical_record_number": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "bed_number": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "ward": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "medical_insurance_number": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "medical_insurance_type": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "social_security_card_number": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            }
          },
          "medical_visit_institution_information": {
            "name_of_medical_institution": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "type_of_medical_institution": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "admission_time": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "discharge_time": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "hospitalization_days": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "medical_treatment_date": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "department": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            }
          },
          "expense_information": {
            "total_amount_in_words": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "total_expense_amount": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "personal_account_balance": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "personal_self_payment_amount": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "personal_self_funded_amount": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "prepaid_amount": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "supplementary_payment_amount": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "refund_amount": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "personal_account_payment": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "personal_cash_payment": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "other_payments": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "payee_organization": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "payee": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "reviewer": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "payer": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "category_self_payment_amount": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "rounding_amount": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "medical_insurance_payment": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "additional_fund_payment": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "current_year_balance": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "cumulative_balance": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "cumulative_insurance_payment": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            },
            "cumulative_deductible_amount": {
              "value": "",
              "description": "",
              "bounding_regions": [
                {
                  "page_id": 0,
                  "image_id": 0,
                  "value": "",
                  "position": [
                    100,
                    100,
                    200,
                    100,
                    200,
                    200,
                    100,
                    200
                  ],
                  "char_pos": [
                    [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ]
                  ]
                }
              ]
            }
          },
          "item_summary_table": [
            {
              "project_name": {
                "value": "",
                "description": "",
                "bounding_regions": [
                  {
                    "page_id": 0,
                    "image_id": 0,
                    "value": "",
                    "position": [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ],
                    "char_pos": [
                      [
                        100,
                        100,
                        200,
                        100,
                        200,
                        200,
                        100,
                        200
                      ]
                    ]
                  }
                ]
              },
              "project_number": {
                "value": "",
                "description": "",
                "bounding_regions": [
                  {
                    "page_id": 0,
                    "image_id": 0,
                    "value": "",
                    "position": [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ],
                    "char_pos": [
                      [
                        100,
                        100,
                        200,
                        100,
                        200,
                        200,
                        100,
                        200
                      ]
                    ]
                  }
                ]
              },
              "quantity": {
                "value": "",
                "description": "",
                "bounding_regions": [
                  {
                    "page_id": 0,
                    "image_id": 0,
                    "value": "",
                    "position": [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ],
                    "char_pos": [
                      [
                        100,
                        100,
                        200,
                        100,
                        200,
                        200,
                        100,
                        200
                      ]
                    ]
                  }
                ]
              },
              "unit": {
                "value": "",
                "description": "",
                "bounding_regions": [
                  {
                    "page_id": 0,
                    "image_id": 0,
                    "value": "",
                    "position": [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ],
                    "char_pos": [
                      [
                        100,
                        100,
                        200,
                        100,
                        200,
                        200,
                        100,
                        200
                      ]
                    ]
                  }
                ]
              },
              "amount": {
                "value": "",
                "description": "",
                "bounding_regions": [
                  {
                    "page_id": 0,
                    "image_id": 0,
                    "value": "",
                    "position": [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ],
                    "char_pos": [
                      [
                        100,
                        100,
                        200,
                        100,
                        200,
                        200,
                        100,
                        200
                      ]
                    ]
                  }
                ]
              },
              "reimbursement_type": {
                "value": "",
                "description": "",
                "bounding_regions": [
                  {
                    "page_id": 0,
                    "image_id": 0,
                    "value": "",
                    "position": [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ],
                    "char_pos": [
                      [
                        100,
                        100,
                        200,
                        100,
                        200,
                        200,
                        100,
                        200
                      ]
                    ]
                  }
                ]
              },
              "remarks": {
                "value": "",
                "description": "",
                "bounding_regions": [
                  {
                    "page_id": 0,
                    "image_id": 0,
                    "value": "",
                    "position": [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ],
                    "char_pos": [
                      [
                        100,
                        100,
                        200,
                        100,
                        200,
                        200,
                        100,
                        200
                      ]
                    ]
                  }
                ]
              },
              "expense_item": {
                "value": "",
                "description": "",
                "bounding_regions": [
                  {
                    "page_id": 0,
                    "image_id": 0,
                    "value": "",
                    "position": [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ],
                    "char_pos": [
                      [
                        100,
                        100,
                        200,
                        100,
                        200,
                        200,
                        100,
                        200
                      ]
                    ]
                  }
                ]
              }
            }
          ],
          "expense_item_summary_table": [
            {
              "expense_item": {
                "value": "",
                "description": "",
                "bounding_regions": [
                  {
                    "page_id": 0,
                    "image_id": 0,
                    "value": "",
                    "position": [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ],
                    "char_pos": [
                      [
                        100,
                        100,
                        200,
                        100,
                        200,
                        200,
                        100,
                        200
                      ]
                    ]
                  }
                ]
              },
              "amount": {
                "value": "",
                "description": "",
                "bounding_regions": [
                  {
                    "page_id": 0,
                    "image_id": 0,
                    "value": "",
                    "position": [
                      100,
                      100,
                      200,
                      100,
                      200,
                      200,
                      100,
                      200
                    ],
                    "char_pos": [
                      [
                        100,
                        100,
                        200,
                        100,
                        200,
                        200,
                        100,
                        200
                      ]
                    ]
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}

授权

x-ti-app-id
string
header
必填

登录Textin后前往 "工作台-账号设置-开发者信息" 查看 x-ti-app-id

x-ti-secret-code
string
header
必填

登录Textin后前往 "工作台-账号设置-开发者信息" 查看 x-ti-secret-code

查询参数

crop_image
enum<integer>
默认值:0

选择是否需要进行图片切分,0关闭切分,1开启切分,默认为0

可用选项:
0,
1
return_image_base64
enum<integer>
默认值:0

选择是否需要输出图片base64,对应image_list中image_base64,0关闭,1开启,默认为0

可用选项:
0,
1
category
enum<integer>
默认值:0

指定样本类型,不进行样本分类,直接抽取结果,默认为0不使用该功能 1: 住院发票 2: 门诊发票 3: 医疗费用结算单 4: 医疗费用明细 5: 医疗处方单 6: 医疗检验报告单 7: 医疗诊断报告单 8: 门诊病历 9: 出院小结 10: 诊断证明

可用选项:
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
coord_restore
enum<integer>
默认值:0

调整各字段的返回坐标逻辑,1代表坐标以原图为基准,0代表坐标以切图后转正图为基准,默认为0

可用选项:
0,
1
is_same_file
enum<integer>
默认值:0

PDF是否为一个整份文件,开启则不再对每一页进行单独切图和分类

可用选项:
0,
1

请求体

application/octet-stream

要上传的图片,目前支持jpg, png, bmp, pdf, tiff, ofd, webp, 单帧gif等大部分格式.

The body is of type file.

示例:

"success"

响应

200 - application/json
code
enum<integer>
必填

错误码

  • 200: success
  • 40101: x-ti-app-id 或 x-ti-secret-code 为空
  • 40102: x-ti-app-id 或 x-ti-secret-code 无效,验证失败
  • 40103: 客户端IP不在白名单
  • 40003: 余额不足,请充值后再使用
  • 40004: 参数错误,请查看技术文档,检查传参
  • 40007: 机器人不存在或未发布
  • 40008: 机器人未开通,请至市场开通后重试
  • 40301: 图片类型不支持
  • 40302: 上传文件大小不符,文件大小不超过 20M
  • 40303: 文件类型不支持,接口会返回实际检测到的文件类型
  • 40304: 图片尺寸不符,长宽比小于2的图片宽高需在20~20000像素范围内,其他图片的宽高需在20~10000像素范围内
  • 40305: 识别文件未上传
  • 40422: 文件损坏(The file is corrupted.)
  • 40423: PDF密码错误(Password required or incorrect password.)
  • 30203: 基础服务故障,请稍后重试
  • 500: 服务器内部错误
可用选项:
200,
40101,
40102,
40103,
40003,
40004,
40007,
40008,
40301,
40302,
40303,
40304,
40305,
40422,
40423,
30203,
500
示例:

200

message
string
必填

错误信息

示例:

"success"

duration
integer
必填

接口总耗时,单位为毫秒

示例:

100

version
string
必填

接口版本

示例:

"v1.0.0"

result
object
必填

样本识别结果