JSON-Schema: deutsche Rechnung extrahieren
JSON Schema, um eine deutsche Rechnung mit einem LLM zu extrahieren: Rechnungssteller, USt-IdNr., Nummer, Datum, Positionen, Netto, USt und Brutto.
Extrahiere die Rechnungsdaten. Beträge sind Zahlen in Euro, ohne Währungszeichen. Fehlt eine Angabe, erfinde sie nicht.
JSON Schema
{
"type": "object",
"required": [
"rechnungssteller",
"rechnungsdatum",
"brutto"
],
"properties": {
"netto": {
"type": "number"
},
"brutto": {
"type": "number"
},
"ust_idnr": {
"type": "string",
"description": "Umsatzsteuer-Identifikationsnummer (DE…)"
},
"ust_satz": {
"type": "number",
"description": "Umsatzsteuersatz in Prozent (19 oder 7)"
},
"positionen": {
"type": "array",
"items": {
"type": "object",
"required": [
"bezeichnung",
"netto"
],
"properties": {
"menge": {
"type": "number"
},
"netto": {
"type": "number"
},
"bezeichnung": {
"type": "string"
}
}
}
},
"ust_betrag": {
"type": "number"
},
"rechnungsdatum": {
"type": "string",
"format": "date",
"description": "Ausstellungsdatum (JJJJ-MM-TT)"
},
"rechnungsnummer": {
"type": "string"
},
"rechnungssteller": {
"type": "string"
}
}
}Ejemplo de salida
{
"rechnungssteller": "Druckerei Weber GmbH",
"ust_idnr": "DE123456789",
"rechnungsnummer": "RE-2026-0412",
"rechnungsdatum": "2026-09-15",
"positionen": [
{
"bezeichnung": "Visitenkarten x500",
"menge": 1,
"netto": 80.0
},
{
"bezeichnung": "Flyer DIN A5 x1000",
"menge": 1,
"netto": 120.0
}
],
"netto": 200.0,
"ust_satz": 19,
"ust_betrag": 38.0,
"brutto": 238.0
}Coste estimado
Tokens de entrada por llamada : ≈ 610
| Modelo | Por llamada | Por 1.000 llamadas |
|---|---|---|
| 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,00107 € | 1,07 € |
| Claude Sonnet 5.5 · Anthropic | 0,00107 € | 1,07 € |
| Claude Opus 5.5 · Anthropic | 0,00215 € | 2,15 € |
| Modelo de código abierto autoalojado (Ollama, vLLM) | 0 € de API (solo el coste del servidor) | |
Solo coste de entrada, sin la respuesta del modelo. Precios públicos estándar de los proveedores (Mistral AI, DeepSeek, OpenAI, Anthropic) convertidos de USD a euros al tipo del BCE del 29 de septiembre de 2026. Estimación: 1 token ≈ 3,6 caracteres.
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 →
Estadísticas
Me gusta : 0 · Comentarios : 0
Haz clic en un contador para mostrarlo u ocultarlo; pasa el ratón por el gráfico para ver el detalle. Una visita por visitante y día, sin robots; recuento iniciado el 30 de septiembre de 2026.
- Identificador
- contextetech--deutsche-rechnung-extrahieren
- Tipo
- Esquemas de salida
- Archivo
- deutsche-rechnung-extrahieren.schema.json
- Formato
- JSON (application/json)
- Tamaño
- 1141 bytes (1,1 KB)
- Codificación
- UTF-8
- Tokens estimados
- ≈ 316
- Idioma
- Alemán
- Licencia
- MIT
- Uso comercial
- Permitido
- Datos personales
- Ninguno
- Versión
- 1.0
- Publicado el
- 3 de octubre de 2026 a las 5:20
- Actualizado el
- 3 de octubre de 2026 a las 5:20
- Almacenamiento
- en base de datos
- Usos
- 0
- Me gusta
- 0
deutsche-rechnung-extrahieren.schema.json
{
"type": "object",
"required": [
"rechnungssteller",
"rechnungsdatum",
"brutto"
],
"properties": {
"netto": {
"type": "number"
},
"brutto": {
"type": "number"
},
"ust_idnr": {
"type": "string",
"description": "Umsatzsteuer-Identifikationsnummer (DE…)"
},
"ust_satz": {
"type": "number",
"description": "Umsatzsteuersatz in Prozent (19 oder 7)"
},
"positionen": {
"type": "array",
"items": {
"type": "object",
"required": [
"bezeichnung",
"netto"
],
"properties": {
"menge": {
"type": "number"
},
"netto": {
"type": "number"
},
"bezeichnung": {
"type": "string"
}
}
}
},
"ust_betrag": {
"type": "number"
},
"rechnungsdatum": {
"type": "string",
"format": "date",
"description": "Ausstellungsdatum (JJJJ-MM-TT)"
},
"rechnungsnummer": {
"type": "string"
},
"rechnungssteller": {
"type": "string"
}
}
}API de Anthropic (Python)
import json, anthropic
schema = json.load(open("deutsche-rechnung-extrahieren.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": "tu entrada aquí"}])
print(resp.content[0].input)Formato OpenAI (response_format)
{
"type": "json_schema",
"json_schema": {
"name": "deutsche-rechnung-extrahieren",
"schema": {
"type": "object",
"required": [
"rechnungssteller",
"rechnungsdatum",
"brutto"
],
"properties": {
"netto": {
"type": "number"
},
"brutto": {
"type": "number"
},
"ust_idnr": {
"type": "string",
"description": "Umsatzsteuer-Identifikationsnummer (DE…)"
},
"ust_satz": {
"type": "number",
"description": "Umsatzsteuersatz in Prozent (19 oder 7)"
},
"positionen": {
"type": "array",
"items": {
"type": "object",
"required": [
"bezeichnung",
"netto"
],
"properties": {
"menge": {
"type": "number"
},
"netto": {
"type": "number"
},
"bezeichnung": {
"type": "string"
}
}
}
},
"ust_betrag": {
"type": "number"
},
"rechnungsdatum": {
"type": "string",
"format": "date",
"description": "Ausstellungsdatum (JJJJ-MM-TT)"
},
"rechnungsnummer": {
"type": "string"
},
"rechnungssteller": {
"type": "string"
}
}
},
"strict": true
}
}
Comunidad
Aún no hay comentarios. Comparte tu opinión, ayudará a los siguientes.