All demosInvoice Desk

Invoice Desk

Turn invoice text into an editable draft, trace fields to their source, and catch missing details or amount discrepancies.

Powered by/extract/answer/verify

Run the examples for free. Use your API key for your own inputs. Get a free key

Performance & cost

This page session · since page load

Ready to run
Typical delivery time
Live input tokens
0
Estimated inference cost · USD
$0.00
How these numbers work · 0 successful requests
Live model compute

Average per measured successful live request.

Successful requests
0

Run an example for free to see its measurements.

Delivery time is the median browser time for successful requests, including queue, network, and retries. Cached delivery speed is not inference speed. Model compute can exceed browser time when one request processes many inputs.

Tokens come from response headers. Inference costs use $0.04 per million input tokens, before plan credits. The estimate includes live and recorded tokens at the same rate; cached examples are not charged again. Missing usage is unavailable or a partial total (≥). Demo resets keep these totals; reload to start a new session.

Try it

Run a stock invoice free, inspect its source evidence, then use your key for custom text or amounts.

Build with the SDKTypeScript · Python · dm1

Use these API building blocks in your own app. Each sample is one request from this demo’s supplied inputs. Your code owns the surrounding workflow, validation and actions.

Copied samples call the live API with MS_API_KEY and use your quota. Keep the key on your server. The free demo cache is only for this site.

Install · set your key
npm install @cloudraker/milliseconds
export MS_API_KEY="your-api-key"
example.ts
import { DecisionMachine } from "@cloudraker/milliseconds";

// Run on your server; reads MS_API_KEY from the environment.
const dm = new DecisionMachine();

const { result, usage } = await dm.extract(
  "INVOICE\n\nInvoice number: NB-1042\nVendor: Northstar Studio\nBilled to: Harbor Works\nInvoice date: 2026-09-12\nPurchase order: PO-208\nCurrency: USD\nSubtotal: 2400.00\nTax: 120.00\nTotal due: 2520.00\nPayment terms: Net 30\n\nServices: Brand identity design\nThank you for your business.",
  {
    "type": "object",
    "title": "invoice headers",
    "properties": {
      "invoice_number": {
        "type": "string",
        "description": "invoice number printed on this invoice"
      },
      "vendor": {
        "type": "string",
        "description": "supplier or vendor issuing this invoice, not the company billed"
      },
      "customer": {
        "type": "string",
        "description": "customer or company being billed"
      },
      "date": {
        "type": "string",
        "description": "date this invoice was issued"
      },
      "po": {
        "type": "string",
        "description": "purchase order reference number"
      },
      "currency": {
        "type": "string",
        "description": "explicit three letter currency code"
      },
      "subtotal": {
        "type": "number",
        "description": "subtotal before tax"
      },
      "tax": {
        "type": "number",
        "description": "total tax amount"
      },
      "total": {
        "type": "number",
        "description": "final total amount due including tax"
      },
      "terms": {
        "type": "string",
        "description": "payment terms printed on the invoice"
      }
    }
  }
).withUsage();

console.log(result);
console.log({ inputTokens: usage.inputTokens, modelMs: usage.inferenceMs });

From invoice to exception review

Extract fills a draft record. Answer locates supporting spans. Verify checks the total against the source. Code compares required fields, subtotal plus tax, purchase-order details and a supplied prior record.

Keep a person in the loop

Model spans can select the wrong company or amount. Scores describe the model’s span confidence, not guaranteed correctness. Sample-preview evidence is curated. Runs use real model responses, with cached or live provenance shown in Performance & cost. A draft is never a payment authorization.

This demo handles text headers and US-style decimal formatting. It does not parse PDFs, extract line items, connect to accounting systems or send payments.