Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request PATCH \
--url http://localhost:3000/v2/file_uploads/{id}/metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"classification": {
"document_type": "balance_sheet",
"confidence": 0.95,
"description": "Company balance sheet Q4 2024",
"tags": [
"financial",
"quarterly"
],
"entities": {
"cnpj": [
"12.345.678/0001-90"
]
}
},
"structured": {
"__preview": {
"page_01_object_key": "uploads/o_x/fl_y/__preview/page_01.png"
}
}
}
'import requests
url = "http://localhost:3000/v2/file_uploads/{id}/metadata"
payload = {
"classification": {
"document_type": "balance_sheet",
"confidence": 0.95,
"description": "Company balance sheet Q4 2024",
"tags": ["financial", "quarterly"],
"entities": { "cnpj": ["12.345.678/0001-90"] }
},
"structured": { "__preview": { "page_01_object_key": "uploads/o_x/fl_y/__preview/page_01.png" } }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
classification: {
document_type: 'balance_sheet',
confidence: 0.95,
description: 'Company balance sheet Q4 2024',
tags: ['financial', 'quarterly'],
entities: {cnpj: ['12.345.678/0001-90']}
},
structured: {__preview: {page_01_object_key: 'uploads/o_x/fl_y/__preview/page_01.png'}}
})
};
fetch('http://localhost:3000/v2/file_uploads/{id}/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/file_uploads/{id}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'classification' => [
'document_type' => 'balance_sheet',
'confidence' => 0.95,
'description' => 'Company balance sheet Q4 2024',
'tags' => [
'financial',
'quarterly'
],
'entities' => [
'cnpj' => [
'12.345.678/0001-90'
]
]
],
'structured' => [
'__preview' => [
'page_01_object_key' => 'uploads/o_x/fl_y/__preview/page_01.png'
]
]
]),
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 := "http://localhost:3000/v2/file_uploads/{id}/metadata"
payload := strings.NewReader("{\n \"classification\": {\n \"document_type\": \"balance_sheet\",\n \"confidence\": 0.95,\n \"description\": \"Company balance sheet Q4 2024\",\n \"tags\": [\n \"financial\",\n \"quarterly\"\n ],\n \"entities\": {\n \"cnpj\": [\n \"12.345.678/0001-90\"\n ]\n }\n },\n \"structured\": {\n \"__preview\": {\n \"page_01_object_key\": \"uploads/o_x/fl_y/__preview/page_01.png\"\n }\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("http://localhost:3000/v2/file_uploads/{id}/metadata")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"classification\": {\n \"document_type\": \"balance_sheet\",\n \"confidence\": 0.95,\n \"description\": \"Company balance sheet Q4 2024\",\n \"tags\": [\n \"financial\",\n \"quarterly\"\n ],\n \"entities\": {\n \"cnpj\": [\n \"12.345.678/0001-90\"\n ]\n }\n },\n \"structured\": {\n \"__preview\": {\n \"page_01_object_key\": \"uploads/o_x/fl_y/__preview/page_01.png\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/file_uploads/{id}/metadata")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"classification\": {\n \"document_type\": \"balance_sheet\",\n \"confidence\": 0.95,\n \"description\": \"Company balance sheet Q4 2024\",\n \"tags\": [\n \"financial\",\n \"quarterly\"\n ],\n \"entities\": {\n \"cnpj\": [\n \"12.345.678/0001-90\"\n ]\n }\n },\n \"structured\": {\n \"__preview\": {\n \"page_01_object_key\": \"uploads/o_x/fl_y/__preview/page_01.png\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyUpdate metadata for specific fields. Each field is updated independently to avoid concurrency conflicts.
curl --request PATCH \
--url http://localhost:3000/v2/file_uploads/{id}/metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"classification": {
"document_type": "balance_sheet",
"confidence": 0.95,
"description": "Company balance sheet Q4 2024",
"tags": [
"financial",
"quarterly"
],
"entities": {
"cnpj": [
"12.345.678/0001-90"
]
}
},
"structured": {
"__preview": {
"page_01_object_key": "uploads/o_x/fl_y/__preview/page_01.png"
}
}
}
'import requests
url = "http://localhost:3000/v2/file_uploads/{id}/metadata"
payload = {
"classification": {
"document_type": "balance_sheet",
"confidence": 0.95,
"description": "Company balance sheet Q4 2024",
"tags": ["financial", "quarterly"],
"entities": { "cnpj": ["12.345.678/0001-90"] }
},
"structured": { "__preview": { "page_01_object_key": "uploads/o_x/fl_y/__preview/page_01.png" } }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
classification: {
document_type: 'balance_sheet',
confidence: 0.95,
description: 'Company balance sheet Q4 2024',
tags: ['financial', 'quarterly'],
entities: {cnpj: ['12.345.678/0001-90']}
},
structured: {__preview: {page_01_object_key: 'uploads/o_x/fl_y/__preview/page_01.png'}}
})
};
fetch('http://localhost:3000/v2/file_uploads/{id}/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/file_uploads/{id}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'classification' => [
'document_type' => 'balance_sheet',
'confidence' => 0.95,
'description' => 'Company balance sheet Q4 2024',
'tags' => [
'financial',
'quarterly'
],
'entities' => [
'cnpj' => [
'12.345.678/0001-90'
]
]
],
'structured' => [
'__preview' => [
'page_01_object_key' => 'uploads/o_x/fl_y/__preview/page_01.png'
]
]
]),
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 := "http://localhost:3000/v2/file_uploads/{id}/metadata"
payload := strings.NewReader("{\n \"classification\": {\n \"document_type\": \"balance_sheet\",\n \"confidence\": 0.95,\n \"description\": \"Company balance sheet Q4 2024\",\n \"tags\": [\n \"financial\",\n \"quarterly\"\n ],\n \"entities\": {\n \"cnpj\": [\n \"12.345.678/0001-90\"\n ]\n }\n },\n \"structured\": {\n \"__preview\": {\n \"page_01_object_key\": \"uploads/o_x/fl_y/__preview/page_01.png\"\n }\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("http://localhost:3000/v2/file_uploads/{id}/metadata")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"classification\": {\n \"document_type\": \"balance_sheet\",\n \"confidence\": 0.95,\n \"description\": \"Company balance sheet Q4 2024\",\n \"tags\": [\n \"financial\",\n \"quarterly\"\n ],\n \"entities\": {\n \"cnpj\": [\n \"12.345.678/0001-90\"\n ]\n }\n },\n \"structured\": {\n \"__preview\": {\n \"page_01_object_key\": \"uploads/o_x/fl_y/__preview/page_01.png\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/file_uploads/{id}/metadata")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"classification\": {\n \"document_type\": \"balance_sheet\",\n \"confidence\": 0.95,\n \"description\": \"Company balance sheet Q4 2024\",\n \"tags\": [\n \"financial\",\n \"quarterly\"\n ],\n \"entities\": {\n \"cnpj\": [\n \"12.345.678/0001-90\"\n ]\n }\n },\n \"structured\": {\n \"__preview\": {\n \"page_01_object_key\": \"uploads/o_x/fl_y/__preview/page_01.png\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyOAuth2 Authorization Code flow
Classification result from classification subgraph
{
"document_type": "balance_sheet",
"confidence": 0.95,
"description": "Company balance sheet Q4 2024",
"tags": ["financial", "quarterly"],
"entities": { "cnpj": ["12.345.678/0001-90"] }
}
Structured metadata blob (holds first-page preview metadata under __preview)
{
"__preview": {
"page_01_object_key": "uploads/o_x/fl_y/__preview/page_01.png"
}
}
Metadata updated successfully