Skip to main content
POST
/
templates
/
autoschema
Generate automatic schema
curl --request POST \
  --url https://api.anycheck.ai/templates/autoschema \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "Extract personal information from Indonesian ID card including name, NIK, birth date, and address"
}
'
{
"schema": {
"schema": {
"properties": {
"address": {
"description": "Full residential address as stated on the Indonesian ID card",
"type": "string"
},
"birth_date": {
"description": "Date of birth in YYYY-MM-DD format as stated on the ID card",
"type": "string"
},
"name": {
"description": "Full name as stated on the Indonesian ID card",
"type": "string"
},
"nik": {
"description": "Nomor Induk Kependudukan (NIK), the unique identification number on the Indonesian ID card",
"type": "string"
}
},
"required": [
"name",
"nik",
"birth_date",
"address"
],
"type": "object"
}
}
}

Authorizations

Authorization
string
header
required

JWT token obtained from /auth/login endpoint.

Example:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Body

application/json
description
string
required

Description of what data should be extracted

Example:

"Extract personal information from Indonesian ID card including name, NIK, birth date, and address"

Response

Auto-generated schema

schema
object

Generated extraction schema

Example:
{
"schema": {
"properties": {
"address": {
"description": "Full residential address as stated on the Indonesian ID card",
"type": "string"
},
"birth_date": {
"description": "Date of birth in YYYY-MM-DD format as stated on the ID card",
"type": "string"
},
"name": {
"description": "Full name as stated on the Indonesian ID card",
"type": "string"
},
"nik": {
"description": "Nomor Induk Kependudukan (NIK), the unique identification number on the Indonesian ID card",
"type": "string"
}
},
"required": ["name", "nik", "birth_date", "address"],
"type": "object"
}
}