Skip to main content
POST
/
idcard
/
recognize
ID Card Recognition API
curl --request POST \
  --url https://geekai.dev/api/v1/idcard/recognize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "image": "<string>",
  "model": "glm-4v-flash"
}'
{
  "name": "San Zhang",
  "sex": "male",
  "nation": "Han",
  "birth": "1990-01-01",
  "address": "Room XX, Unit XX, Building XX, XX Community, Shangcheng District, Hangzhou City, Zhejiang Province.",
  "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

token

Body

application/json
image
string
required

ID card image, support image URL or Base64 encoding data, support png/jpg/jpeg format.

model
string

model name, support image recognition model, default is glm-4v-flash(free)

Example:

"glm-4v-flash"

Response

successful response

name
string

name

Example:

"San Zhang"

sex
enum<string>

gender

Available options:
male,
female
Example:

"male"

nation
string

nation

Example:

"Han"

birth
string<date>

birth date

Example:

"1990-01-01"

address
string

address

Example:

"Room XX, Unit XX, Building XX, XX Community, Shangcheng District, Hangzhou City, Zhejiang Province."

id
string

ID number

I