Developer tools
Ship the idea. Skip the ceremony.
TypeScript, Python, or your terminal. A few lines to get a decision. The rest is up to your imagination.
Create an API key in the console, then set it in your server or shell environment.
export MS_API_KEY="your-api-key"TypeScript
Your labels.
Your types.
Result types follow the labels you supply. Inspect the winning label, the full score distribution, and confidence without unpacking an HTTP response.
npm install @cloudraker/millisecondsimport { DecisionMachine } from '@cloudraker/milliseconds';
const dm = new DecisionMachine(); // reads MS_API_KEY
const result = await dm.classify('I was charged twice.', {
billing: 'payments, invoices, charges and refunds',
shipping: 'delivery, tracking and packages',
account: 'login, passwords and profile settings',
});
console.log(result.label);
console.log(result.probability, result.confidence);Python
From a notebook
to your pipeline.
Use sync or async clients for classification, extraction, and source checks. Keep your labels, schemas, and thresholds in code.
pip install cloudraker-millisecondsfrom milliseconds import DecisionMachine
with DecisionMachine() as dm: # reads MS_API_KEY
result = dm.classify('I was charged twice.', {
'billing': 'payments, invoices, charges and refunds',
'shipping': 'delivery, tracking and packages',
'account': 'login, passwords and profile settings',
})
print(result.label)
print(result.probability, result.confidence)dm1 CLI
Your terminal
can make the call.
Read text from a file or a pipe. Write JSON for another program. Use exit codes to gate a script and inspect token usage on stderr.
npm install -g @cloudraker/millisecondsdm1 classify "I was charged twice." \
billing="payments, invoices, charges and refunds" \
shipping="delivery, tracking and packages" \
account="login, passwords and profile settings" \
--json --usageKeep building
The next useful link.
Take a working example into your project, then evaluate it on your own inputs.
Using an OpenAI client? The API supports JSON-schema extraction and tool-call requests through its compatibility endpoint. Read the supported request shapes.