Generate automatic schema
curl --request POST \
--url https://api.anycheck.ai/templates/autoschema \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"description": "Extract personal information from Indonesian ID card including name, NIK, birth date, and address"
}
'import requests
url = "https://api.anycheck.ai/templates/autoschema"
payload = { "description": "Extract personal information from Indonesian ID card including name, NIK, birth date, and address" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Extract personal information from Indonesian ID card including name, NIK, birth date, and address'
})
};
fetch('https://api.anycheck.ai/templates/autoschema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anycheck.ai/templates/autoschema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Extract personal information from Indonesian ID card including name, NIK, birth date, and address'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anycheck.ai/templates/autoschema"
payload := strings.NewReader("{\n \"description\": \"Extract personal information from Indonesian ID card including name, NIK, birth date, and address\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anycheck.ai/templates/autoschema")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Extract personal information from Indonesian ID card including name, NIK, birth date, and address\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anycheck.ai/templates/autoschema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Extract personal information from Indonesian ID card including name, NIK, birth date, and address\"\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}
}Templates
Generate automatic schema
Generate schema automatically based on description using AI
POST
/
templates
/
autoschema
Generate automatic schema
curl --request POST \
--url https://api.anycheck.ai/templates/autoschema \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"description": "Extract personal information from Indonesian ID card including name, NIK, birth date, and address"
}
'import requests
url = "https://api.anycheck.ai/templates/autoschema"
payload = { "description": "Extract personal information from Indonesian ID card including name, NIK, birth date, and address" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Extract personal information from Indonesian ID card including name, NIK, birth date, and address'
})
};
fetch('https://api.anycheck.ai/templates/autoschema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anycheck.ai/templates/autoschema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Extract personal information from Indonesian ID card including name, NIK, birth date, and address'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anycheck.ai/templates/autoschema"
payload := strings.NewReader("{\n \"description\": \"Extract personal information from Indonesian ID card including name, NIK, birth date, and address\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anycheck.ai/templates/autoschema")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Extract personal information from Indonesian ID card including name, NIK, birth date, and address\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anycheck.ai/templates/autoschema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Extract personal information from Indonesian ID card including name, NIK, birth date, and address\"\n}"
response = http.request(request)
puts response.read_body{
"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
API key for service-to-service authentication
Body
application/json
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
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"
}
}
Was this page helpful?
⌘I