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.
Write a message or start the replay.
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.yesNo(
"Channel: #customer-acme. Audience: external customer (a Slack Connect channel shared with Acme Corp, a paying customer).\n\nDraft message:\nhey can someone check why the webhook is 500ing? use this to repro: sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e",
[
"The key or token in this message is a real one taken from a running system.",
"This draft repeats a real person's name together with their email address or phone number.",
"The author promises a refund, a specific delivery or fix date, a discount or price, or that a feature will definitely ship.",
"The draft tells outsiders about the unannounced roadmap, internal costs or margins.",
"The draft tells outsiders about other customers' deals, staffing or internal legal matters.",
"The author would be embarrassed if this channel's audience read this draft.",
"The author hedges in a way that undermines their own message, such as 'I think maybe', 'not sure but' or apologising for asking.",
"The tone toward the reader is warm and appreciative.",
"The tone toward the reader is curt, dismissive or impatient.",
"The draft blames, belittles or talks down to the reader.",
"The fragment \"sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e\" is a real credential taken from a running system, not an illustration."
]
).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.classify(
"Channel: #customer-acme. Audience: external customer (a Slack Connect channel shared with Acme Corp, a paying customer).\n\nDraft message:\nhey can someone check why the webhook is 500ing? use this to repro: sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e",
{
"send": "Nothing in the draft is a problem for this audience.",
"warn": "The draft has something the author should double-check: a promise, a sharp tone, or unfinished text.",
"block": "The draft would do real harm here: a leaked credential, personal data, confidential information, or an abusive message."
}
).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.rate(
[
"Channel: #customer-acme. Audience: external customer (a Slack Connect channel shared with Acme Corp, a paying customer).\n\nDraft message:\nhey can someone check why the webhook is 500ing? use this to repro: sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e"
],
[
"No legal exposure: routine work talk - a status update, a question, scheduling, an engineering note.",
"Low: informal wording a lawyer would tighten, but no promise, no private data and no secret.",
"Moderate: the message makes a promise the company must keep, admits fault, or passes on one person's private contact details.",
"High: the message exposes a working credential, or puts a named person's private details where strangers can read them, or defames someone."
]
).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.yes_no(
"Channel: #customer-acme. Audience: external customer (a Slack Connect channel shared with Acme Corp, a paying customer).\n\nDraft message:\nhey can someone check why the webhook is 500ing? use this to repro: sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e",
[
"The key or token in this message is a real one taken from a running system.",
"This draft repeats a real person's name together with their email address or phone number.",
"The author promises a refund, a specific delivery or fix date, a discount or price, or that a feature will definitely ship.",
"The draft tells outsiders about the unannounced roadmap, internal costs or margins.",
"The draft tells outsiders about other customers' deals, staffing or internal legal matters.",
"The author would be embarrassed if this channel's audience read this draft.",
"The author hedges in a way that undermines their own message, such as 'I think maybe', 'not sure but' or apologising for asking.",
"The tone toward the reader is warm and appreciative.",
"The tone toward the reader is curt, dismissive or impatient.",
"The draft blames, belittles or talks down to the reader.",
"The fragment \"sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e\" is a real credential taken from a running system, not an illustration."
]
)
print(result)from milliseconds import DecisionMachine
# Reads MS_API_KEY from the environment.
dm = DecisionMachine()
result = dm.classify(
"Channel: #customer-acme. Audience: external customer (a Slack Connect channel shared with Acme Corp, a paying customer).\n\nDraft message:\nhey can someone check why the webhook is 500ing? use this to repro: sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e",
{
"send": "Nothing in the draft is a problem for this audience.",
"warn": "The draft has something the author should double-check: a promise, a sharp tone, or unfinished text.",
"block": "The draft would do real harm here: a leaked credential, personal data, confidential information, or an abusive message."
}
)
print(result)from milliseconds import DecisionMachine
# Reads MS_API_KEY from the environment.
dm = DecisionMachine()
result = dm.rate(
[
"Channel: #customer-acme. Audience: external customer (a Slack Connect channel shared with Acme Corp, a paying customer).\n\nDraft message:\nhey can someone check why the webhook is 500ing? use this to repro: sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e"
],
[
"No legal exposure: routine work talk - a status update, a question, scheduling, an engineering note.",
"Low: informal wording a lawyer would tighten, but no promise, no private data and no secret.",
"Moderate: the message makes a promise the company must keep, admits fault, or passes on one person's private contact details.",
"High: the message exposes a working credential, or puts a named person's private details where strangers can read them, or defames someone."
]
)
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 yes-no --json --usage <<'DM1_REQUEST'
{
"text": "Channel: #customer-acme. Audience: external customer (a Slack Connect channel shared with Acme Corp, a paying customer).\n\nDraft message:\nhey can someone check why the webhook is 500ing? use this to repro: sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e",
"statements": [
"The key or token in this message is a real one taken from a running system.",
"This draft repeats a real person's name together with their email address or phone number.",
"The author promises a refund, a specific delivery or fix date, a discount or price, or that a feature will definitely ship.",
"The draft tells outsiders about the unannounced roadmap, internal costs or margins.",
"The draft tells outsiders about other customers' deals, staffing or internal legal matters.",
"The author would be embarrassed if this channel's audience read this draft.",
"The author hedges in a way that undermines their own message, such as 'I think maybe', 'not sure but' or apologising for asking.",
"The tone toward the reader is warm and appreciative.",
"The tone toward the reader is curt, dismissive or impatient.",
"The draft blames, belittles or talks down to the reader.",
"The fragment \"sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e\" is a real credential taken from a running system, not an illustration."
]
}
DM1_REQUEST# Reads MS_API_KEY. JSON on stdin supplies the complete request.
dm1 classify --json --usage <<'DM1_REQUEST'
{
"text": "Channel: #customer-acme. Audience: external customer (a Slack Connect channel shared with Acme Corp, a paying customer).\n\nDraft message:\nhey can someone check why the webhook is 500ing? use this to repro: sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e",
"labels": {
"send": "Nothing in the draft is a problem for this audience.",
"warn": "The draft has something the author should double-check: a promise, a sharp tone, or unfinished text.",
"block": "The draft would do real harm here: a leaked credential, personal data, confidential information, or an abusive message."
}
}
DM1_REQUEST# Reads MS_API_KEY. JSON on stdin supplies the complete request.
dm1 rate --json --usage <<'DM1_REQUEST'
{
"texts": [
"Channel: #customer-acme. Audience: external customer (a Slack Connect channel shared with Acme Corp, a paying customer).\n\nDraft message:\nhey can someone check why the webhook is 500ing? use this to repro: sk-live-4f9a2c7e1b8d6a3f0c5e9b2d7a1f4c8e"
],
"scale": [
"No legal exposure: routine work talk - a status update, a question, scheduling, an engineering note.",
"Low: informal wording a lawyer would tighten, but no promise, no private data and no secret.",
"Moderate: the message makes a promise the company must keep, admits fault, or passes on one person's private contact details.",
"High: the message exposes a working credential, or puts a named person's private details where strangers can read them, or defames someone."
]
}
DM1_REQUESTUnder the hood How it works & limitations
API calls/yes-no/classify/rate
How it works
After a typing pause, the model checks the draft and relevant text fragments. Channel context and local policy combine the results into an allow, warning or block decision.
Demo scope
This is a simulated chat composer. Audience-fit scores are advisory and can miss a mismatch. The guard can make mistakes; a green verdict does not guarantee that a message is safe to share.
Inspired by the work of dabit3.