Zum Inhalt springen

Playground

Rechnungsextraktion: Was sind Rechnungsnummer und Betrag?

Was sind Rechnungsnummer und Betrag? Clairic extrahiert beides aus Rechnungstext. Steht beim fälligen Betrag „to be confirmed“, kommt der Betrag als null — Clairic liefert null, wenn die Eingabe keinen Wert festlegt; die Nummer wird trotzdem extrahiert.

Beispieldaten ändern sich nicht mit dem gewählten Modell.

Abrechnung Clairic: je 4KB Anfrageinhalt = 1 Block, unter 4KB ebenfalls 1 Block; 2 Credits pro Block. Einmal pro Anfrage berechnet, unabhängig von der Feldanzahl.

Anfrage

state
text/plain
INVOICE INV-2291From: Northwind SupplyTo: Contoso LtdIssued: 2026-09-02Total due: 1080.00

Felder

fields
application/json
{  "invoice_number": {    "type": "text",    "instructions": "The invoice id printed on the document."  },  "amount": {    "type": "number",    "instructions": "The total amount due. Do not invent a currency symbol."  }}

Ergebnisse

Beispieldaten
Zwei Beispiele vergleichen

Diese beiden Beispiele unterscheiden sich in einem Detail. Das Ergebnis ändert sich mit ihnen.

Was sich geändert hatVollständige Rechnung → Betrag fehlt

Diese Ergebnisse sind Beispieldaten, kein Live-Modelllauf. Melden Sie sich an, um eigene Inhalte zu testen.
invoice_number: INV-4402 → INV-2291 amount: null → 1080
invoice_numbertext
INV-2291Wert
Anbieter-Confidence0.99
Chance, dass es fehlt0.01
amountnumber
1080Wert
Anbieter-Confidence0.96
Chance, dass es fehlt0.02

Code kopieren

SYSTEM_ONE_API_KEY setzen. Das Snippet nutzt eine veröffentlichte Katalog-Modell-ID.

Request-JSON
application/json
{"model":"clairic","state":"INVOICE INV-2291\nFrom: Northwind Supply\nTo: Contoso Ltd\nIssued: 2026-09-02\nTotal due: 1080.00","fields":{"invoice_number":{"type":"text","instructions":"The invoice id printed on the document."},"amount":{"type":"number","instructions":"The total amount due. Do not invent a currency symbol."}}}
cURL · POST /v1/systemone
sh
curl "https://system-one.dev/v1/systemone" \  -H "Authorization: Bearer $SYSTEM_ONE_API_KEY" \  -H 'Content-Type: application/json' \  -H 'Idempotency-Key: saved-operation-id' \  --data '{"model":"clairic","state":"INVOICE INV-2291\nFrom: Northwind Supply\nTo: Contoso Ltd\nIssued: 2026-09-02\nTotal due: 1080.00","fields":{"invoice_number":{"type":"text","instructions":"The invoice id printed on the document."},"amount":{"type":"number","instructions":"The total amount due. Do not invent a currency symbol."}}}'
TypeScript
TypeScript
// npm install @system-one-ai/core@0.8.0 @system-one-ai/adapter-system-one@0.7.0 @system-one-ai/transport-fetch@0.8.0import { createSystemOne } from '@system-one-ai/core';import { systemOneAdapter } from '@system-one-ai/adapter-system-one';import { createFetchTransport } from '@system-one-ai/transport-fetch';const client = createSystemOne({  baseURL: "https://system-one.dev/v1",  apiKey: process.env.SYSTEM_ONE_API_KEY!,  model: "clairic",  adapter: systemOneAdapter,  transport: createFetchTransport(),  timeoutMs: 30_000,  maxRetries: 0,});const result = await client.extract({  model: "clairic",  state: "INVOICE INV-2291\nFrom: Northwind Supply\nTo: Contoso Ltd\nIssued: 2026-09-02\nTotal due: 1080.00",  fields: {    "invoice_number": {      "type": "text",      "instructions": "The invoice id printed on the document."    },    "amount": {      "type": "number",      "instructions": "The total amount due. Do not invent a currency symbol."    }  },}, { headers: { 'Idempotency-Key': crypto.randomUUID() } });result.answers.invoice_number.valueresult.answers.amount.valueresult.response.requestId;