Performance & cost
This session
- Delivery time · median
- —
- Live model compute
- —
- Live input tokens
- 0
- Est. cost · USD
- $0.00
Bypass examples to measure live inference. Uses your quota.
Measurement details · 0 successful requests
- Successful requests
- 0
Run an example for free to see its measurements.
Model compute is the average per measured request. 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.
Pick an invoice and hit Process invoice.
Build with the SDKTypeScript · Python · dm1
One request from this demo. Copy it into your app.
Uses your MS_API_KEY and quota. Keep the key on your server.
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_REQUESTUnder the hood How it works & limitations
API calls/extract/answer/verify
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.