All demosReturns Desk

Returns Desk

Read the request. Apply your return policy.

Examples are free. Bring a key for your own inputs. Get a free key

Performance & cost

This session

Ready to run
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.

Try it

Check a request, then change the policy and try again.

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.

Install · set your key
npm install @cloudraker/milliseconds
export MS_API_KEY="your-api-key"
example.ts
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 });

Under the hood How it works & limitations

API calls/classify/answer

Read 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.