Schema JSON: estrarre una fattura italiana
JSON Schema per estrarre una fattura italiana con un LLM: fornitore e partita IVA, numero, data, righe, imponibile, IVA e totale in euro.
Estrai i dati della fattura. Gli importi sono numeri in euro, senza simbolo. Se un dato manca, non inventarlo.
JSON Schema
{
"type": "object",
"required": [
"fornitore",
"data",
"totale"
],
"properties": {
"iva": {
"type": "number"
},
"data": {
"type": "string",
"format": "date",
"description": "Data di emissione (AAAA-MM-GG)"
},
"righe": {
"type": "array",
"items": {
"type": "object",
"required": [
"descrizione",
"importo"
],
"properties": {
"importo": {
"type": "number"
},
"quantita": {
"type": "number"
},
"descrizione": {
"type": "string"
}
}
}
},
"numero": {
"type": "string"
},
"totale": {
"type": "number"
},
"fornitore": {
"type": "string",
"description": "Ragione sociale del fornitore"
},
"imponibile": {
"type": "number"
},
"partita_iva": {
"type": "string",
"description": "Partita IVA del fornitore (11 cifre)"
},
"aliquota_iva": {
"type": "number",
"description": "Aliquota IVA in percentuale (22, 10, 5 o 4)"
}
}
}Beispielausgabe
{
"fornitore": "Tipografia Russo S.r.l.",
"partita_iva": "01234567890",
"numero": "FT-2026-0412",
"data": "2026-09-15",
"righe": [
{
"descrizione": "Biglietti da visita x500",
"quantita": 1,
"importo": 80.0
},
{
"descrizione": "Volantini A5 x1000",
"quantita": 1,
"importo": 120.0
}
],
"imponibile": 200.0,
"aliquota_iva": 22,
"iva": 44.0,
"totale": 244.0
}Geschätzte Kosten
Eingabe-Tokens pro Aufruf : ≈ 611
| Modell | Pro Aufruf | Pro 1.000 Aufrufe |
|---|---|---|
| Mistral Large · Mistral AI | 0,00027 € | 0,27 € |
| DeepSeek Flash · DeepSeek | 0,00016 € | 0,16 € |
| DeepSeek V4 Pro · DeepSeek | 0,00071 € | 0,71 € |
| GPT-6 Luna · OpenAI | 0,00005 € | 0,05 € |
| GPT-6 Sol · OpenAI | 0,00108 € | 1,08 € |
| Claude Sonnet 5.5 · Anthropic | 0,00108 € | 1,08 € |
| Claude Opus 5.5 · Anthropic | 0,00215 € | 2,15 € |
| Selbst gehostetes Open-Source-Modell (Ollama, vLLM) | 0 € API-Kosten (nur Serverkosten) | |
Nur Eingabekosten, ohne die Antwort des Modells. Öffentliche Standardpreise der Anbieter (Mistral AI, DeepSeek, OpenAI, Anthropic) von USD in Euro umgerechnet zum EZB-Kurs vom 29. September 2026. Schätzung: 1 Token ≈ 3,6 Zeichen.
Common to all 3 regions
Created by the author, no outside source.
Commercial use allowed · credit the author · changes allowed.
Text or data only: no access to files, network or commands.
Hosted in France (Scaleway, Paris). No transfer outside the EU.
European Union · 5/5
No personal data.
No training data: no summary required.
United States · 5/5
No personal data.
No training data: no documentation to publish.
China · 5/5
No personal data.
No training data; AI-generated content published in China must be labelled (2025).
Indicative summary as of 30/09/2026, not a legal certification. Method and sources →
Statistiken
Gefällt mir : 0 · Kommentare : 0
Klicken Sie auf einen Zähler, um ihn ein- oder auszublenden; fahren Sie über das Diagramm für Details. Ein Aufruf pro Besucher und Tag, ohne Bots; Zählung seit dem 30. September 2026.
- Kennung
- contextetech--estrarre-fattura-italiana
- Typ
- Ausgabeschemas
- Datei
- estrarre-fattura-italiana.schema.json
- Format
- JSON (application/json)
- Größe
- 1.157 Bytes (1,1 KB)
- Kodierung
- UTF-8
- Geschätzte Tokens
- ≈ 321
- Sprache
- Italienisch
- Lizenz
- MIT
- Kommerzielle Nutzung
- Erlaubt
- Personenbezogene Daten
- Keine
- Version
- 1.0
- Veröffentlicht am
- 3. Oktober 2026 um 05:20
- Aktualisiert am
- 3. Oktober 2026 um 05:20
- Speicherung
- in der Datenbank
- Nutzungen
- 0
- Gefällt mir
- 0
estrarre-fattura-italiana.schema.json
{
"type": "object",
"required": [
"fornitore",
"data",
"totale"
],
"properties": {
"iva": {
"type": "number"
},
"data": {
"type": "string",
"format": "date",
"description": "Data di emissione (AAAA-MM-GG)"
},
"righe": {
"type": "array",
"items": {
"type": "object",
"required": [
"descrizione",
"importo"
],
"properties": {
"importo": {
"type": "number"
},
"quantita": {
"type": "number"
},
"descrizione": {
"type": "string"
}
}
}
},
"numero": {
"type": "string"
},
"totale": {
"type": "number"
},
"fornitore": {
"type": "string",
"description": "Ragione sociale del fornitore"
},
"imponibile": {
"type": "number"
},
"partita_iva": {
"type": "string",
"description": "Partita IVA del fornitore (11 cifre)"
},
"aliquota_iva": {
"type": "number",
"description": "Aliquota IVA in percentuale (22, 10, 5 o 4)"
}
}
}Anthropic-API (Python)
import json, anthropic
schema = json.load(open("estrarre-fattura-italiana.schema.json"))
client = anthropic.Anthropic()
resp = client.messages.create(model="claude-sonnet-5", max_tokens=1024,
tools=[{"name": "extraire", "description": "Renvoie les données extraites", "input_schema": schema}],
tool_choice={"type": "tool", "name": "extraire"},
messages=[{"role": "user", "content": "deine Eingabe hier"}])
print(resp.content[0].input)OpenAI-Format (response_format)
{
"type": "json_schema",
"json_schema": {
"name": "estrarre-fattura-italiana",
"schema": {
"type": "object",
"required": [
"fornitore",
"data",
"totale"
],
"properties": {
"iva": {
"type": "number"
},
"data": {
"type": "string",
"format": "date",
"description": "Data di emissione (AAAA-MM-GG)"
},
"righe": {
"type": "array",
"items": {
"type": "object",
"required": [
"descrizione",
"importo"
],
"properties": {
"importo": {
"type": "number"
},
"quantita": {
"type": "number"
},
"descrizione": {
"type": "string"
}
}
}
},
"numero": {
"type": "string"
},
"totale": {
"type": "number"
},
"fornitore": {
"type": "string",
"description": "Ragione sociale del fornitore"
},
"imponibile": {
"type": "number"
},
"partita_iva": {
"type": "string",
"description": "Partita IVA del fornitore (11 cifre)"
},
"aliquota_iva": {
"type": "number",
"description": "Aliquota IVA in percentuale (22, 10, 5 o 4)"
}
}
},
"strict": true
}
}
Community
Noch keine Kommentare. Teile deine Erfahrung, sie hilft den Nächsten.