>" />
參數名稱 | 類型 | 必填 | 說明 |
---|---|---|---|
pic | file/string | 是 | 圖片文件 POST上傳,支持傳base64格式的圖片內容 JPG識別率略高 最大300K |
type | string | 是 | 文字類型 cnen中英文 en英語 fr法語 pt葡萄牙語 de德語 it意大利語 es西班牙語 ru俄語 jp日語 |
參數名稱 | 類型 | 說明 |
---|---|---|
result | string | 識別結果 |
<?php require_once 'curl.func.php'; $appkey = 'your_appkey_here';//你的appkey $url = "https://api.jisuapi.com/generalrecognition/recognize?appkey=$appkey"; $post = array( 'type'=>'cnen', 'pic'=>base64_encode(file_get_contents('sfz1.jpg')), //'@'.realpath('11.jpg') ); $result = curlOpen($url, array('post'=>$post, 'isupfile'=>true)); $jsonarr = json_decode($result, true); if($jsonarr['status'] != 0) { echo $jsonarr['msg']; exit(); } $result = $jsonarr['result']; foreach($result as $key=>$val) { echo $key.' '.$val. '
'; }
{ "status": 0, "msg": "ok", "result": [ "此時此刻我好焦灼!", "你別再解釋了" ] }
代號 | 說明 |
---|---|
201 | 圖片為空 |
202 | 圖片格式錯誤 |
204 | 圖片大小超過300K |
208 | 識別失敗 |
210 | 沒有信息 |
代號 | 說明 |
---|---|
101 | APPKEY為空或不存在 |
102 | APPKEY已過期 |
103 | APPKEY無請求此數據權限 |
104 | 請求超過次數限制 |
105 | IP被禁止 |
106 | IP請求超過限制 |
107 | 接口維護中 |
108 | 接口已停用 |
計次套餐 | 套餐規格 | 價格 | ||
---|---|---|---|---|
免費套餐 | 10次 | 0.00元 | ≈0元/次 | |
Level1 | 10000次 | 70元 | ≈0.007元/次 | |
Level2 | 20000次 | 130元 | ≈0.0065元/次 | |
Level3 | 50000次 | 300元 | ≈0.006元/次 | |
Level4 | 100000次 | 550元 | ≈0.0055元/次 |