Skip to main content
POST
/
idcard
/
recognize
身份证识别接口
curl --request POST \
  --url https://geekai.co/api/v1/idcard/recognize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "image": "",
  "model": "glm-4v-flash"
}
'
{
  "name": "张三",
  "sex": "男",
  "nation": "汉",
  "birth": "2025年2月10日",
  "address": "浙江省杭州市上城区XX小区XX幢元XX室",
  "id": "<string>"
}
Note: If the model value is not passed, the free glm-4v-flash is used by default. You can also choose other image recognition models supported by GeekAI in the Model Marketplace. The cost is based on the model price (API) displayed in the list.

cURL Request Example

curl --location 'https://geekai.dev/api/v1/idcard/recognize' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--data '{
    "image": "https://example.com/idcard.jpg"
}'

Authorizations

Authorization
string
header
required

API认证token

Body

application/json
image
string
required

支持图片URL或Base64编码图片,支持主流图片格式,如png/jpg/jpeg等

Example:

""

model
string

支持图片识别的模型,不传默认是免费的glm-4v-flash

Example:

"glm-4v-flash"

Response

成功响应

name
string

姓名

Example:

"张三"

sex
enum<string>

性别

Available options:
,
Example:

"男"

nation
string

民族

Example:

"汉"

birth
string<date>

出生日期

Example:

"2025年2月10日"

address
string

住址

Example:

"浙江省杭州市上城区XX小区XX幢元XX室"

id
string

身份证号码