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
Performance & cost
This page session · since page load
- Typical delivery time
- —
- Live input tokens
- 0
- Estimated inference cost · USD
- $0.00
How these numbers work · 0 successful requests
- Live model compute
- —
- Successful requests
- 0
Average per measured successful live request.
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.
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.
npm install @cloudraker/milliseconds
export MS_API_KEY="your-api-key"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 });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.answer(
"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.",
[
"What is the invoice number printed on this invoice?",
"What is the supplier or vendor issuing this invoice, not the company billed?",
"What is the customer or company being billed?",
"What is the date this invoice was issued?",
"What is the purchase order reference number?",
"What is the explicit three letter currency code?",
"What is the subtotal before tax?",
"What is the total tax amount?",
"What is the final total amount due including tax?",
"What is the payment terms printed on the invoice?"
]
).withUsage();
console.log(result);
console.log({ inputTokens: usage.inputTokens, modelMs: usage.inferenceMs });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.verify(
"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.",
{
"name": "total",
"description": "final total amount due including tax"
},
"2520.00"
).withUsage();
console.log(result);
console.log({ inputTokens: usage.inputTokens, modelMs: usage.inferenceMs });pip install cloudraker-milliseconds
export MS_API_KEY="your-api-key"from milliseconds import DecisionMachine
# Reads MS_API_KEY from the environment.
dm = DecisionMachine()
result = 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"
}
}
}
)
print(result)from milliseconds import DecisionMachine
# Reads MS_API_KEY from the environment.
dm = DecisionMachine()
result = dm.answer(
"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.",
[
"What is the invoice number printed on this invoice?",
"What is the supplier or vendor issuing this invoice, not the company billed?",
"What is the customer or company being billed?",
"What is the date this invoice was issued?",
"What is the purchase order reference number?",
"What is the explicit three letter currency code?",
"What is the subtotal before tax?",
"What is the total tax amount?",
"What is the final total amount due including tax?",
"What is the payment terms printed on the invoice?"
]
)
print(result)from milliseconds import DecisionMachine
# Reads MS_API_KEY from the environment.
dm = DecisionMachine()
result = dm.verify(
"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.",
{
"name": "total",
"description": "final total amount due including tax"
},
"2520.00"
)
print(result)npm install -g @cloudraker/milliseconds
export MS_API_KEY="your-api-key"# Reads MS_API_KEY. JSON on stdin supplies the complete request.
dm1 extract --json --usage <<'DM1_REQUEST'
{
"text": "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.",
"schema": {
"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"
}
}
}
}
DM1_REQUEST# Reads MS_API_KEY. JSON on stdin supplies the complete request.
dm1 answer --json --usage <<'DM1_REQUEST'
{
"text": "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.",
"questions": [
"What is the invoice number printed on this invoice?",
"What is the supplier or vendor issuing this invoice, not the company billed?",
"What is the customer or company being billed?",
"What is the date this invoice was issued?",
"What is the purchase order reference number?",
"What is the explicit three letter currency code?",
"What is the subtotal before tax?",
"What is the total tax amount?",
"What is the final total amount due including tax?",
"What is the payment terms printed on the invoice?"
]
}
DM1_REQUEST# Reads MS_API_KEY. JSON on stdin supplies the complete request.
dm1 verify --json --usage <<'DM1_REQUEST'
{
"text": "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.",
"field": {
"name": "total",
"description": "final total amount due including tax"
},
"value": "2520.00"
}
DM1_REQUESTFrom 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.