All demosReturns Desk
Returns Desk
Turn a return request, order facts and your store policy into a clear next step—with every policy check visible.
Powered by/classify/answer
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 request free and adjust the order or policy. Use your key for a custom customer message.
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.classify(
"Hello, I would like to return order RD-1042. The jacket is too small. It is unworn with its tags attached.",
{
"return_or_exchange": "return a purchase, refund a product, exchange for another size",
"delivery_status": "parcel tracking, when will my order arrive",
"other": "unrelated or unclear customer request"
}
).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(
"Hello, I would like to return order RD-1042. The jacket is too small. It is unworn with its tags attached.",
[
"What is the order number?"
]
).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(
"Hello, I would like to return order RD-1042. The jacket is too small. It is unworn with its tags attached.",
{
"return_or_exchange": "return a purchase, refund a product, exchange for another size",
"delivery_status": "parcel tracking, when will my order arrive",
"other": "unrelated or unclear customer request"
}
)
print(result)from milliseconds import DecisionMachine
# Reads MS_API_KEY from the environment.
dm = DecisionMachine()
result = dm.answer(
"Hello, I would like to return order RD-1042. The jacket is too small. It is unworn with its tags attached.",
[
"What is the order number?"
]
)
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'
{
"text": "Hello, I would like to return order RD-1042. The jacket is too small. It is unworn with its tags attached.",
"labels": {
"return_or_exchange": "return a purchase, refund a product, exchange for another size",
"delivery_status": "parcel tracking, when will my order arrive",
"other": "unrelated or unclear customer request"
}
}
DM1_REQUEST# Reads MS_API_KEY. JSON on stdin supplies the complete request.
dm1 answer --json --usage <<'DM1_REQUEST'
{
"text": "Hello, I would like to return order RD-1042. The jacket is too small. It is unworn with its tags attached.",
"questions": [
"What is the order number?"
]
}
DM1_REQUESTRead the request. Apply your rules.
The model classifies customer intent and finds source wording. Code compares the order number and applies the supplied dates, USD amount, condition and store policy. The request date is explicit, so examples stay reproducible.
A draft for your team
Order facts are supplied by you; the model does not verify them against a store. Model readings can be wrong or omit evidence. A person must confirm the request and facts before any action. This demo does not issue refunds, contact customers or determine legal eligibility.