invoice_numbertextConfidence del proveedor
0.99Probabilidad de que falte
0.01Playground
¿Cuál es el número y el importe de la factura? Clairic extrae ambos del texto. Si el total a pagar dice «to be confirmed», el importe vuelve null: Clairic devuelve null cuando la entrada no determina un valor; el número sí se extrae.
INVOICE INV-2291From: Northwind SupplyTo: Contoso LtdIssued: 2026-09-02Total due: 1080.00
{ "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." }}Estos dos ejemplos difieren en un solo detalle. El resultado cambia con ellos.
Qué cambióFactura completa → importe ausente
invoice_numbertext0.990.01amountnumber0.960.02Configura SYSTEM_ONE_API_KEY. El fragmento usa un ID de modelo publicado en el catálogo.
{"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 "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."}}}'// 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;