{
    "openapi": "3.0.0",
    "info": {
        "title": "通用文字识别 - API文档",
        "version": "1.0.0",
        "description": "通用文字识别接口服务，支持识别网络上png、jpg、jpeg、bmp格式的文字图片，并根据图片中文字的不同位置返回数组。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/ocrimg\/index": {
            "post": {
                "summary": "OCR文字识别",
                "tags": [
                    "通用文字识别"
                ],
                "description": "OCR通用文字识别支持绝大部分含字图片",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "img": {
                                        "type": "string",
                                        "example": "base64",
                                        "description": "图片base64编码（与imgurl参数二选一）"
                                    },
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "imgurl": {
                                        "type": "string",
                                        "example": "https:\/\/www.tianapi.com\/static\/img\/ocr\/textimg.jpg",
                                        "description": "图片URL（支持jpg\/png\/bmp\/gif格式）"
                                    }
                                },
                                "required": [
                                    "img",
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "texts": {
                                            "type": "string",
                                            "example": "天行微信图文编辑器",
                                            "description": "识别到的文本内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "texts": "API"
                                            },
                                            {
                                                "texts": "天行数据通用文字识别"
                                            },
                                            {
                                                "texts": "ocR功能测试"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}