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.
Start a session and follow the turn decisions.
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.classify(
[
"set",
"set a",
"set a timer",
"set a timer for",
"set a timer for ten",
"set a timer for ten minutes",
"a",
"a timer",
"a timer for",
"a timer for ten",
"a timer for ten minutes",
"timer",
"timer for",
"timer for ten",
"timer for ten minutes",
"for",
"for ten",
"for ten minutes",
"ten",
"ten minutes",
"minutes",
"what's",
"what's the",
"what's the weather",
"what's the weather like",
"what's the weather like in",
"what's the weather like in Boston",
"what's the weather like in Boston tomorrow",
"the",
"the weather",
"the weather like",
"the weather like in"
],
{
"set_timer": "Start a timer, alarm or countdown for a duration",
"weather": "Ask about weather, temperature or forecast",
"play_music": "Play a song, artist, genre or playlist",
"lights": "Turn lights on, off, dim them, or change their color",
"send_message": "Send a text or message to a person",
"question": "A general knowledge or factual question",
"chit_chat": "Greeting, small talk or thanks with no task",
"incomplete": "Too little said so far to tell what the speaker wants"
}
).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.yesNo(
[
"Assistant is speaking. Speaker says: \"set\"",
"Assistant is speaking. Speaker says: \"set a\"",
"Assistant is speaking. Speaker says: \"set a timer\"",
"Assistant is speaking. Speaker says: \"set a timer for\"",
"Assistant is speaking. Speaker says: \"set a timer for ten\"",
"Assistant is speaking. Speaker says: \"set a timer for ten minutes\"",
"Assistant is speaking. Speaker says: \"a\"",
"Assistant is speaking. Speaker says: \"a timer\"",
"Assistant is speaking. Speaker says: \"a timer for\"",
"Assistant is speaking. Speaker says: \"a timer for ten\"",
"Assistant is speaking. Speaker says: \"a timer for ten minutes\"",
"Assistant is speaking. Speaker says: \"timer\"",
"Assistant is speaking. Speaker says: \"timer for\"",
"Assistant is speaking. Speaker says: \"timer for ten\"",
"Assistant is speaking. Speaker says: \"timer for ten minutes\"",
"Assistant is speaking. Speaker says: \"for\"",
"Assistant is speaking. Speaker says: \"for ten\"",
"Assistant is speaking. Speaker says: \"for ten minutes\"",
"Assistant is speaking. Speaker says: \"ten\"",
"Assistant is speaking. Speaker says: \"ten minutes\"",
"Assistant is speaking. Speaker says: \"minutes\"",
"Assistant is speaking. Speaker says: \"what's\"",
"Assistant is speaking. Speaker says: \"what's the\"",
"Assistant is speaking. Speaker says: \"what's the weather\"",
"Assistant is speaking. Speaker says: \"what's the weather like\"",
"Assistant is speaking. Speaker says: \"what's the weather like in\"",
"Assistant is speaking. Speaker says: \"what's the weather like in Boston\"",
"Assistant is speaking. Speaker says: \"what's the weather like in Boston tomorrow\"",
"Assistant is speaking. Speaker says: \"the\"",
"Assistant is speaking. Speaker says: \"the weather\"",
"Assistant is speaking. Speaker says: \"the weather like\"",
"Assistant is speaking. Speaker says: \"the weather like in\""
],
[
"The speaker cuts the assistant off."
],
{
"when_true": "the speaker tells the assistant to stop, wait, cancel or be quiet",
"when_false": "the speaker lets the assistant finish: a filler sound, a thanks, or nothing at all"
}
).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.classify(
[
"set",
"set a",
"set a timer",
"set a timer for",
"set a timer for ten",
"set a timer for ten minutes",
"a",
"a timer",
"a timer for",
"a timer for ten",
"a timer for ten minutes",
"timer",
"timer for",
"timer for ten",
"timer for ten minutes",
"for",
"for ten",
"for ten minutes",
"ten",
"ten minutes",
"minutes",
"what's",
"what's the",
"what's the weather",
"what's the weather like",
"what's the weather like in",
"what's the weather like in Boston",
"what's the weather like in Boston tomorrow",
"the",
"the weather",
"the weather like",
"the weather like in"
],
{
"set_timer": "Start a timer, alarm or countdown for a duration",
"weather": "Ask about weather, temperature or forecast",
"play_music": "Play a song, artist, genre or playlist",
"lights": "Turn lights on, off, dim them, or change their color",
"send_message": "Send a text or message to a person",
"question": "A general knowledge or factual question",
"chit_chat": "Greeting, small talk or thanks with no task",
"incomplete": "Too little said so far to tell what the speaker wants"
}
)
print(result)from milliseconds import DecisionMachine
# Reads MS_API_KEY from the environment.
dm = DecisionMachine()
result = dm.yes_no(
[
"Assistant is speaking. Speaker says: \"set\"",
"Assistant is speaking. Speaker says: \"set a\"",
"Assistant is speaking. Speaker says: \"set a timer\"",
"Assistant is speaking. Speaker says: \"set a timer for\"",
"Assistant is speaking. Speaker says: \"set a timer for ten\"",
"Assistant is speaking. Speaker says: \"set a timer for ten minutes\"",
"Assistant is speaking. Speaker says: \"a\"",
"Assistant is speaking. Speaker says: \"a timer\"",
"Assistant is speaking. Speaker says: \"a timer for\"",
"Assistant is speaking. Speaker says: \"a timer for ten\"",
"Assistant is speaking. Speaker says: \"a timer for ten minutes\"",
"Assistant is speaking. Speaker says: \"timer\"",
"Assistant is speaking. Speaker says: \"timer for\"",
"Assistant is speaking. Speaker says: \"timer for ten\"",
"Assistant is speaking. Speaker says: \"timer for ten minutes\"",
"Assistant is speaking. Speaker says: \"for\"",
"Assistant is speaking. Speaker says: \"for ten\"",
"Assistant is speaking. Speaker says: \"for ten minutes\"",
"Assistant is speaking. Speaker says: \"ten\"",
"Assistant is speaking. Speaker says: \"ten minutes\"",
"Assistant is speaking. Speaker says: \"minutes\"",
"Assistant is speaking. Speaker says: \"what's\"",
"Assistant is speaking. Speaker says: \"what's the\"",
"Assistant is speaking. Speaker says: \"what's the weather\"",
"Assistant is speaking. Speaker says: \"what's the weather like\"",
"Assistant is speaking. Speaker says: \"what's the weather like in\"",
"Assistant is speaking. Speaker says: \"what's the weather like in Boston\"",
"Assistant is speaking. Speaker says: \"what's the weather like in Boston tomorrow\"",
"Assistant is speaking. Speaker says: \"the\"",
"Assistant is speaking. Speaker says: \"the weather\"",
"Assistant is speaking. Speaker says: \"the weather like\"",
"Assistant is speaking. Speaker says: \"the weather like in\""
],
[
"The speaker cuts the assistant off."
],
when_true="the speaker tells the assistant to stop, wait, cancel or be quiet",
when_false="the speaker lets the assistant finish: a filler sound, a thanks, or nothing at all"
)
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 classify --json --usage <<'DM1_REQUEST'
{
"texts": [
"set",
"set a",
"set a timer",
"set a timer for",
"set a timer for ten",
"set a timer for ten minutes",
"a",
"a timer",
"a timer for",
"a timer for ten",
"a timer for ten minutes",
"timer",
"timer for",
"timer for ten",
"timer for ten minutes",
"for",
"for ten",
"for ten minutes",
"ten",
"ten minutes",
"minutes",
"what's",
"what's the",
"what's the weather",
"what's the weather like",
"what's the weather like in",
"what's the weather like in Boston",
"what's the weather like in Boston tomorrow",
"the",
"the weather",
"the weather like",
"the weather like in"
],
"labels": {
"set_timer": "Start a timer, alarm or countdown for a duration",
"weather": "Ask about weather, temperature or forecast",
"play_music": "Play a song, artist, genre or playlist",
"lights": "Turn lights on, off, dim them, or change their color",
"send_message": "Send a text or message to a person",
"question": "A general knowledge or factual question",
"chit_chat": "Greeting, small talk or thanks with no task",
"incomplete": "Too little said so far to tell what the speaker wants"
}
}
DM1_REQUEST# Reads MS_API_KEY. JSON on stdin supplies the complete request.
dm1 yes-no --json --usage <<'DM1_REQUEST'
{
"texts": [
"Assistant is speaking. Speaker says: \"set\"",
"Assistant is speaking. Speaker says: \"set a\"",
"Assistant is speaking. Speaker says: \"set a timer\"",
"Assistant is speaking. Speaker says: \"set a timer for\"",
"Assistant is speaking. Speaker says: \"set a timer for ten\"",
"Assistant is speaking. Speaker says: \"set a timer for ten minutes\"",
"Assistant is speaking. Speaker says: \"a\"",
"Assistant is speaking. Speaker says: \"a timer\"",
"Assistant is speaking. Speaker says: \"a timer for\"",
"Assistant is speaking. Speaker says: \"a timer for ten\"",
"Assistant is speaking. Speaker says: \"a timer for ten minutes\"",
"Assistant is speaking. Speaker says: \"timer\"",
"Assistant is speaking. Speaker says: \"timer for\"",
"Assistant is speaking. Speaker says: \"timer for ten\"",
"Assistant is speaking. Speaker says: \"timer for ten minutes\"",
"Assistant is speaking. Speaker says: \"for\"",
"Assistant is speaking. Speaker says: \"for ten\"",
"Assistant is speaking. Speaker says: \"for ten minutes\"",
"Assistant is speaking. Speaker says: \"ten\"",
"Assistant is speaking. Speaker says: \"ten minutes\"",
"Assistant is speaking. Speaker says: \"minutes\"",
"Assistant is speaking. Speaker says: \"what's\"",
"Assistant is speaking. Speaker says: \"what's the\"",
"Assistant is speaking. Speaker says: \"what's the weather\"",
"Assistant is speaking. Speaker says: \"what's the weather like\"",
"Assistant is speaking. Speaker says: \"what's the weather like in\"",
"Assistant is speaking. Speaker says: \"what's the weather like in Boston\"",
"Assistant is speaking. Speaker says: \"what's the weather like in Boston tomorrow\"",
"Assistant is speaking. Speaker says: \"the\"",
"Assistant is speaking. Speaker says: \"the weather\"",
"Assistant is speaking. Speaker says: \"the weather like\"",
"Assistant is speaking. Speaker says: \"the weather like in\""
],
"statements": [
"The speaker cuts the assistant off."
],
"when_true": "the speaker tells the assistant to stop, wait, cancel or be quiet",
"when_false": "the speaker lets the assistant finish: a filler sound, a thanks, or nothing at all"
}
DM1_REQUESTUnder the hood How it works & limitations
API calls/classify/yes-no
How it works
The model identifies intent as transcript fragments arrive. Local rules check that required details are present before responding. While a reply is playing, a separate check detects an interruption.
Demo scope
The microphone and speech are simulated with a scripted transcript. Nothing is recorded; only transcript text is sent. Intent confidence describes the model’s judgment, not certainty that a request is complete.
Inspired by the work of dabit3.