curl --request POST \
--url https://api.scanify.com.br/classify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": {
"fileUrl": "<string>",
"fileBase64": "<string>",
"filename": "<string>"
},
"referenceId": "<string>",
"metadata": {},
"timeout": 60000
}
'import requests
url = "https://api.scanify.com.br/classify"
payload = {
"file": {
"fileUrl": "<string>",
"fileBase64": "<string>",
"filename": "<string>"
},
"referenceId": "<string>",
"metadata": {},
"timeout": 60000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file: {fileUrl: '<string>', fileBase64: '<string>', filename: '<string>'},
referenceId: '<string>',
metadata: {},
timeout: 60000
})
};
fetch('https://api.scanify.com.br/classify', 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.scanify.com.br/classify",
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([
'file' => [
'fileUrl' => '<string>',
'fileBase64' => '<string>',
'filename' => '<string>'
],
'referenceId' => '<string>',
'metadata' => [
],
'timeout' => 60000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.scanify.com.br/classify"
payload := strings.NewReader("{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"timeout\": 60000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.scanify.com.br/classify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"timeout\": 60000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanify.com.br/classify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"timeout\": 60000\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"status": "success",
"document_type": "NFE",
"confidence": 0.5,
"reason": "<string>",
"document_type_detection": {
"source": "provided",
"provided_document_type": "<string>",
"detected_document_type": "<string>",
"confidence": 123,
"threshold": 123,
"accepted": true,
"reason": "<string>"
}
}{
"message": "<string>",
"request_id": "<string>"
}{
"error": "Unauthorized"
}{
"success": false,
"status": "failed",
"code": "SYNC_TIMEOUT",
"message": "<string>",
"request_id": "<string>"
}Classificar documento
Classifica um documento de forma síncrona, retornando apenas o tipo detectado, a confiança e a justificativa, sem extrair os campos. XML não é suportado.
curl --request POST \
--url https://api.scanify.com.br/classify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": {
"fileUrl": "<string>",
"fileBase64": "<string>",
"filename": "<string>"
},
"referenceId": "<string>",
"metadata": {},
"timeout": 60000
}
'import requests
url = "https://api.scanify.com.br/classify"
payload = {
"file": {
"fileUrl": "<string>",
"fileBase64": "<string>",
"filename": "<string>"
},
"referenceId": "<string>",
"metadata": {},
"timeout": 60000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file: {fileUrl: '<string>', fileBase64: '<string>', filename: '<string>'},
referenceId: '<string>',
metadata: {},
timeout: 60000
})
};
fetch('https://api.scanify.com.br/classify', 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.scanify.com.br/classify",
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([
'file' => [
'fileUrl' => '<string>',
'fileBase64' => '<string>',
'filename' => '<string>'
],
'referenceId' => '<string>',
'metadata' => [
],
'timeout' => 60000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.scanify.com.br/classify"
payload := strings.NewReader("{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"timeout\": 60000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.scanify.com.br/classify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"timeout\": 60000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scanify.com.br/classify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": {\n \"fileUrl\": \"<string>\",\n \"fileBase64\": \"<string>\",\n \"filename\": \"<string>\"\n },\n \"referenceId\": \"<string>\",\n \"metadata\": {},\n \"timeout\": 60000\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"status": "success",
"document_type": "NFE",
"confidence": 0.5,
"reason": "<string>",
"document_type_detection": {
"source": "provided",
"provided_document_type": "<string>",
"detected_document_type": "<string>",
"confidence": 123,
"threshold": 123,
"accepted": true,
"reason": "<string>"
}
}{
"message": "<string>",
"request_id": "<string>"
}{
"error": "Unauthorized"
}{
"success": false,
"status": "failed",
"code": "SYNC_TIMEOUT",
"message": "<string>",
"request_id": "<string>"
}document_type, confidence, reason) sem extrair os campos. Mais barato e rápido que a extração completa quando você só precisa identificar o tipo.
Exemplos
curl -X POST https://api.scanify.com.br/classify \
-H "Authorization: Bearer SUA_CHAVE_DE_API" \
-H "Content-Type: application/json" \
-d '{
"file": {
"fileUrl": "https://exemplo.com/documento.pdf"
},
"referenceId": "pedido-123",
"timeout": 60000
}'
import axios from 'axios';
const { data } = await axios.post(
'https://api.scanify.com.br/classify',
{
file: {
fileUrl: 'https://exemplo.com/documento.pdf',
},
referenceId: 'pedido-123',
timeout: 60000,
},
{
headers: {
Authorization: 'Bearer SUA_CHAVE_DE_API',
},
},
);
console.log(data.document_type, data.confidence);
import requests
response = requests.post(
"https://api.scanify.com.br/classify",
headers={"Authorization": "Bearer SUA_CHAVE_DE_API"},
json={
"file": {
"fileUrl": "https://exemplo.com/documento.pdf",
},
"referenceId": "pedido-123",
"timeout": 60000,
},
timeout=70,
)
response.raise_for_status()
print(response.json()["document_type"], response.json()["confidence"])
Authorizations
Chave de API enviada no cabeçalho Authorization no formato: Authorization: Bearer <API_KEY>.
Body
Origem do arquivo. Forneça fileUrl OU fileBase64 (com filename obrigatório), nunca ambos.
Show child attributes
Show child attributes
Identificador externo para rastreamento.
Metadados arbitrários associados à requisição.
Tempo máximo de espera em milissegundos.
10000 <= x <= 300000Response
Documento classificado.
Resultado da classificação. Não inclui campos extraídos (fields), markdown, processed_at nem o bloco scanify — apenas o tipo detectado e a justificativa. Para o resultado completo, use /extract/sync ou /extract.
success Tipo de documento. Quando omitido na extração, o tipo é detectado automaticamente.
NFE, BOLETO, CONTRATO, RECIBO, CNH, RG, COMPROVANTE_RESIDENCIA, CONTRATO_SOCIAL, IRPF, CERTIDAO_NASCIMENTO, CERTIDAO_CASAMENTO, LAUDO_MEDICO, CERTIDAO_OBITO, PROCURACAO, HOLERITE, DOCUMENTO_VEICULAR, DOCUMENTO_JURIDICO, EXTRATO_BANCARIO, INFORME_RENDIMENTOS_EMPREGADOR_INSS, INFORME_RENDIMENTOS_BANCOS, INFORME_RENDIMENTOS_CORRETORAS, INFORME_PLANO_SAUDE, DESPESA_MEDICA, COMPROVANTE_EDUCACAO, DECLARACAO_IR_ANTERIOR Confiança da classificação (0–1).
0 <= x <= 1Justificativa textual gerada pelo modelo.
Show child attributes
Show child attributes